2022-11-28 15:55:49 +05:00
|
|
|
/*
|
|
|
|
|
This file is part of the Notesnook project (https://notesnook.com/)
|
|
|
|
|
|
2023-01-16 13:44:52 +05:00
|
|
|
Copyright (C) 2023 Streetwriters (Private) Limited
|
2022-11-28 15:55:49 +05:00
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
2022-11-28 15:12:18 +05:00
|
|
|
const ICONS = {
|
|
|
|
|
16: "16x16.png",
|
|
|
|
|
32: "32x32.png",
|
|
|
|
|
48: "48x48.png",
|
|
|
|
|
64: "64x64.png",
|
|
|
|
|
128: "128x128.png",
|
|
|
|
|
256: "256x256.png"
|
|
|
|
|
};
|
|
|
|
|
const BACKGROUND_SCRIPT = "background.bundle.js";
|
|
|
|
|
const ACTION = {
|
|
|
|
|
default_icon: ICONS,
|
|
|
|
|
default_title: "Notesnook Web Clipper",
|
|
|
|
|
default_popup: "popup.html"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const common = {
|
|
|
|
|
name: "Notesnook Web Clipper",
|
2023-05-16 17:39:21 +05:00
|
|
|
version: "0.2",
|
|
|
|
|
description:
|
|
|
|
|
"Clip web pages & save interesting things you find on the web directly into Notesnook in a private & secure way.",
|
2023-05-16 18:05:20 +05:00
|
|
|
permissions: ["activeTab", "tabs", "storage", "notifications", "<all_urls>"],
|
2022-11-28 15:12:18 +05:00
|
|
|
content_scripts: [
|
|
|
|
|
{
|
|
|
|
|
js: ["nnContentScript.bundle.js"],
|
2023-05-13 17:49:38 +05:00
|
|
|
matches:
|
|
|
|
|
process.env.NODE_ENV === "production"
|
|
|
|
|
? ["*://app.notesnook.com/*"]
|
|
|
|
|
: ["*://localhost/*"]
|
2022-11-28 15:12:18 +05:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
js: ["contentScript.bundle.js"],
|
|
|
|
|
matches: ["http://*/*", "https://*/*"],
|
2023-05-13 17:49:38 +05:00
|
|
|
exclude_matches:
|
|
|
|
|
process.env.NODE_ENV === "production"
|
|
|
|
|
? ["*://app.notesnook.com/*"]
|
|
|
|
|
: ["*://localhost/*"]
|
2022-12-03 08:58:01 +05:00
|
|
|
}
|
2022-11-28 15:12:18 +05:00
|
|
|
],
|
2022-12-03 08:58:01 +05:00
|
|
|
icons: ICONS
|
2022-11-28 15:12:18 +05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const v2 = {
|
|
|
|
|
...common,
|
2023-05-13 17:49:38 +05:00
|
|
|
browser_specific_settings: {
|
|
|
|
|
gecko: {
|
|
|
|
|
strict_min_version: "105.0"
|
|
|
|
|
}
|
|
|
|
|
},
|
2022-11-28 15:12:18 +05:00
|
|
|
manifest_version: 2,
|
|
|
|
|
background: {
|
|
|
|
|
scripts: [BACKGROUND_SCRIPT]
|
|
|
|
|
},
|
|
|
|
|
browser_action: ACTION
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const v3 = {
|
|
|
|
|
...common,
|
|
|
|
|
manifest_version: 3,
|
|
|
|
|
background: {
|
|
|
|
|
service_worker: BACKGROUND_SCRIPT
|
|
|
|
|
},
|
|
|
|
|
action: ACTION
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
|
v2,
|
|
|
|
|
v3
|
|
|
|
|
};
|