From bd96ecf2c796e22cc20df7ed4377579a06d5962f Mon Sep 17 00:00:00 2001 From: Joachim Schuler Date: Fri, 4 Jun 2021 12:59:48 -0400 Subject: [PATCH] remove chrome package --- packages/chrome/background.js | 9 --------- packages/chrome/inject.js | 24 ------------------------ packages/chrome/manifest.json | 22 ---------------------- 3 files changed, 55 deletions(-) delete mode 100644 packages/chrome/background.js delete mode 100644 packages/chrome/inject.js delete mode 100644 packages/chrome/manifest.json diff --git a/packages/chrome/background.js b/packages/chrome/background.js deleted file mode 100644 index ac7bd86e..00000000 --- a/packages/chrome/background.js +++ /dev/null @@ -1,9 +0,0 @@ -// this is the background code... - -// listen for our browerAction to be clicked -chrome.browserAction.onClicked.addListener(function (tab) { - // for the current tab, inject the "inject.js" file & execute it - chrome.tabs.executeScript(tab.id, { - file: 'inject.js' - }); -}); \ No newline at end of file diff --git a/packages/chrome/inject.js b/packages/chrome/inject.js deleted file mode 100644 index 94e1de2e..00000000 --- a/packages/chrome/inject.js +++ /dev/null @@ -1,24 +0,0 @@ -// this is the code which will be injected into a given page... - -function codeToInject() { - // just place a div at top right - var div = document.createElement('div'); - div.style.position = 'fixed'; - div.style.top = 0; - div.style.right = 0; - div.style.backgroundColor = 'yellow'; - div.textContent = 'Quick starts injected!'; - document.body.appendChild(div); - - window.quickstarts = 'true'; - - alert('Injected quick starts'); -} - -function embed(fn) { - const script = document.createElement("script"); - script.text = `(${fn.toString()})();`; - document.documentElement.appendChild(script); -} - -embed(codeToInject); \ No newline at end of file diff --git a/packages/chrome/manifest.json b/packages/chrome/manifest.json deleted file mode 100644 index c8d142de..00000000 --- a/packages/chrome/manifest.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "quickstarts-injector", - "version": "0.0.1", - "manifest_version": 2, - "description": "Injects quick starts", - "homepage_url": "https://github.com/patternfly/patternfly-quickstarts", - "background": { - "scripts": [ - "background.js" - ], - "persistent": true - }, - "browser_action": { - "default_title": "Activate quick starts" - }, - "permissions": [ - "https://*/*", - "http://*/*", - "tabs", - "activeTab" - ] - } \ No newline at end of file