Created
February 10, 2021 14:54
-
-
Save ertrzyiks/8d6d00d8675c9ce951272363480a3530 to your computer and use it in GitHub Desktop.
Revisions
-
ertrzyiks revised this gist
Feb 10, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ { "name": "Throw error", "description": "This extension throws exception handled by Rollbar.", "version": "1.0.0", "background": { "scripts": ["background.js"], "persistent": false -
ertrzyiks created this gist
Feb 10, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ It creates a browser action that throws an exception captured by Rollbar 1. Go to extensions 2. Enable developer mode 3. Load this extensions from a folder This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ // Called when the user clicks on the browser action icon. chrome.browserAction.onClicked.addListener(function(tab) { chrome.tabs.executeScript(null, {file: "content_script.js"}); }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ ;(function() { const script = document.createElement('script') script.src = chrome.extension.getURL('inject.js') document.documentElement.appendChild(script) })() This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ throw new Error('Extension error') This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ { "name": "Throw error", "description": "This extension throws exception handled by Rollbar.", "version": "1.2.6", "background": { "scripts": ["background.js"], "persistent": false }, "permissions": [ "tabs", "http://*/*", "https://*/*" ], "browser_action": { "default_title": "Throw extension error" }, "web_accessible_resources": [ "inject.js" ], "manifest_version": 2 }