|
@@ -1,3 +1,4 @@
|
|
|
|
+import browser from 'webextension-polyfill';
|
|
import initApp from './main';
|
|
import initApp from './main';
|
|
import injectAppStyles from '../injectAppStyles';
|
|
import injectAppStyles from '../injectAppStyles';
|
|
|
|
|
|
@@ -21,6 +22,14 @@ export default async function () {
|
|
const isMainFrame = window.self === window.top;
|
|
const isMainFrame = window.self === window.top;
|
|
if (!isMainFrame) return;
|
|
if (!isMainFrame) return;
|
|
|
|
|
|
|
|
+ const isInvalidURL = /.(json|xml)$/.test(window.location.pathname);
|
|
|
|
+ if (isInvalidURL) return;
|
|
|
|
+
|
|
|
|
+ const { automaShortcut } = await browser.storage.local.get(
|
|
|
|
+ 'automaShortcut'
|
|
|
|
+ );
|
|
|
|
+ if (Array.isArray(automaShortcut) && automaShortcut.length === 0) return;
|
|
|
|
+
|
|
await pageLoaded();
|
|
await pageLoaded();
|
|
|
|
|
|
const instanceExist = document.querySelector('automa-palette');
|
|
const instanceExist = document.querySelector('automa-palette');
|