Add logo, manifest and types files.
This commit is contained in:
parent
d3d65ea050
commit
64fed8ef87
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
|
@ -0,0 +1,16 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 100 100">
|
||||||
|
<rect fill="#E6DEFF" width="100" height="100" />
|
||||||
|
|
||||||
|
<text
|
||||||
|
fill="#1F1731"
|
||||||
|
font-family="Inter"
|
||||||
|
font-size="75"
|
||||||
|
font-weight="900"
|
||||||
|
x="51"
|
||||||
|
y="75"
|
||||||
|
alignment-baseline="middle"
|
||||||
|
text-anchor="middle"
|
||||||
|
>
|
||||||
|
↩
|
||||||
|
</text>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 340 B |
|
@ -0,0 +1,45 @@
|
||||||
|
/* eslint-disable @typescript-eslint/naming-convention */
|
||||||
|
|
||||||
|
export default function createManifest(
|
||||||
|
target: string,
|
||||||
|
): Record<string, unknown> {
|
||||||
|
const manifest: Record<string, unknown> = {
|
||||||
|
name: 're-nav',
|
||||||
|
description: 'Navigation redirects for the masses.',
|
||||||
|
version: '0.1.0',
|
||||||
|
permissions: ['storage', 'webNavigation'],
|
||||||
|
options_ui: {
|
||||||
|
page: 'options/index.html',
|
||||||
|
open_in_tab: true,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const icons = {
|
||||||
|
128: 'assets/re-nav.png',
|
||||||
|
};
|
||||||
|
|
||||||
|
manifest.icons = icons;
|
||||||
|
|
||||||
|
const browserAction = {
|
||||||
|
default_icon: icons,
|
||||||
|
};
|
||||||
|
|
||||||
|
const backgroundScript = 'background-scripts/initialize.ts';
|
||||||
|
|
||||||
|
if (target === 'chromium') {
|
||||||
|
manifest.manifest_version = 3;
|
||||||
|
manifest.action = browserAction;
|
||||||
|
manifest.background = {
|
||||||
|
service_worker: backgroundScript,
|
||||||
|
type: 'module',
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
manifest.manifest_version = 2;
|
||||||
|
manifest.browser_action = browserAction;
|
||||||
|
manifest.background = {
|
||||||
|
scripts: [backgroundScript],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return manifest;
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import {html} from 'htm/preact';
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
// See Vite documentation for `import.meta.env` usage.
|
||||||
|
// https://vitejs.dev/guide/env-and-mode.html
|
||||||
|
|
||||||
|
interface ImportMeta {
|
||||||
|
readonly env: ImportMetaEnv;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImportMetaEnv {
|
||||||
|
readonly BASE_URL: string;
|
||||||
|
readonly DEV: boolean;
|
||||||
|
readonly MODE: string;
|
||||||
|
readonly PROD: boolean;
|
||||||
|
readonly VITE_BROWSER: 'chromium' | 'firefox';
|
||||||
|
}
|
||||||
|
|
||||||
|
type HtmComponent = ReturnType<typeof html>;
|
||||||
|
}
|
Loading…
Reference in New Issue