Added the ability to bookmark the extension, along with some visual adjustments
This commit is contained in:
@@ -9,6 +9,7 @@ const distDir = path.join(rootDir, "dist");
|
||||
const contentScript = composition.composeScript("content");
|
||||
const backgroundScript = composition.composeScript("background");
|
||||
const spaPageScript = composition.composeScript("spa-page");
|
||||
const shortcutScript = await readFile(path.join(rootDir, "src/content/shortcut-intent.js"), "utf8");
|
||||
const checkOnly = process.argv.includes("--check");
|
||||
|
||||
const baseManifest = {
|
||||
@@ -17,6 +18,7 @@ const baseManifest = {
|
||||
description: "Adiciona um atalho de Opportunities Extension nas paginas Oracle Fusion permitidas.",
|
||||
version: "1.0.9",
|
||||
permissions: [
|
||||
"bookmarks",
|
||||
"cookies",
|
||||
"storage",
|
||||
"webRequest",
|
||||
@@ -28,6 +30,12 @@ const baseManifest = {
|
||||
"https://comcipapic-oalprod.integration.ocp.oraclecloud.com/*"
|
||||
],
|
||||
content_scripts: [
|
||||
{
|
||||
matches: ["https://eeho.fa.us2.oraclecloud.com/hcmUI/faces/FuseWelcome*", "https://eeho.fa.us2.oraclecloud.com/fscmUI/faces/FuseWelcome*"],
|
||||
js: ["shortcut-intent.js"],
|
||||
all_frames: false,
|
||||
run_at: "document_start"
|
||||
},
|
||||
{
|
||||
matches: [
|
||||
"https://eeho.fa.us2.oraclecloud.com/hcmUI/faces/FuseWelcome*",
|
||||
@@ -77,7 +85,7 @@ for (const target of targets) {
|
||||
JSON.parse(manifestJson);
|
||||
|
||||
if (checkOnly) {
|
||||
const expected = { "manifest.json": manifestJson, "content.js": contentScript, "background.js": backgroundScript, "spa-page.js": spaPageScript };
|
||||
const expected = { "manifest.json": manifestJson, "content.js": contentScript, "background.js": backgroundScript, "spa-page.js": spaPageScript, "shortcut-intent.js": shortcutScript };
|
||||
for (const [file, contents] of Object.entries(expected)) {
|
||||
const actual = await readFile(path.join(distDir, target.name, file), "utf8");
|
||||
if (actual !== contents) throw new Error(`Stale output: dist/${target.name}/${file}. Run npm run build.`);
|
||||
@@ -90,6 +98,7 @@ for (const target of targets) {
|
||||
await output.writeOutput(path.join(outputDir, "content.js"), contentScript);
|
||||
await output.writeOutput(path.join(outputDir, "background.js"), backgroundScript);
|
||||
await output.writeOutput(path.join(outputDir, "spa-page.js"), spaPageScript);
|
||||
await output.writeOutput(path.join(outputDir, "shortcut-intent.js"), shortcutScript);
|
||||
await output.writeOutput(path.join(outputDir, "manifest.json"), manifestJson);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ module.exports = {
|
||||
"src/content/icons.js",
|
||||
"src/content/svg.js",
|
||||
"src/content/styles.js",
|
||||
"src/content/dialog-drag.js",
|
||||
"src/auth/content-session.js",
|
||||
"src/auth/current-user.js",
|
||||
"src/auth/token-relay.js",
|
||||
|
||||
Reference in New Issue
Block a user