diff --git a/extension/background.js b/extension/background.js index e3b517b..bfb2092 100644 --- a/extension/background.js +++ b/extension/background.js @@ -1,7 +1,11 @@ +let thisBrowser = null; +if(!thisBrowser) try { thisBrowser = browser; } catch(e) {} +if(!thisBrowser) try { thisBrowser = chrome; } catch(e) {} + function openPage() { - browser.tabs.create({ + thisBrowser.tabs.create({ url: "https://steamcommunity.com/my/gcpd/570/?category=Account&tab=MatchPlayerReportIncoming" }); } -browser.browserAction.onClicked.addListener(openPage); \ No newline at end of file +thisBrowser.browserAction.onClicked.addListener(openPage); diff --git a/extension/gdpr_page.js b/extension/gdpr_page.js index d925753..2669cd5 100644 --- a/extension/gdpr_page.js +++ b/extension/gdpr_page.js @@ -94,15 +94,13 @@ function chakraMagic() { let chakraElement = document.createElement("button"); parentElement.appendChild(chakraElement); - chakraElement.setAttribute("onclick", "illuminate()") - chakraElement.setAttribute("class", "chakramagic-button") + chakraElement.onclick = illuminate; + chakraElement.setAttribute("class", "chakramagic-button"); - let imageElement = document.createElement("img") + let imageElement = document.createElement("img"); chakraElement.appendChild(imageElement); imageElement.setAttribute("src", "http://cdn.dota2.com/apps/dota2/images/abilities/keeper_of_the_light_illuminate_hp2.png"); - imageElement.setAttribute("class", "chakramagic-image") - - exportFunction(illuminate, window, {defineAs: "illuminate"}); + imageElement.setAttribute("class", "chakramagic-image"); } chakraMagic(); diff --git a/extension/manifest.json b/extension/manifest.json index 8fa703d..0aa3a98 100644 --- a/extension/manifest.json +++ b/extension/manifest.json @@ -8,7 +8,7 @@ }, "name": "Chakra Magic", - "version": "2019.9.30.2", + "version": "2019.10.2.1", "developer": { "name": "Stefano Pigozzi", "url": "https://github.com/Steffo99/chakra-magic"