diff --git a/README.md b/README.md index c7cc05d..11cd650 100644 --- a/README.md +++ b/README.md @@ -4,26 +4,6 @@ A WebExtension wrapper for [Illuminate](https://github.com/bongikairu/illuminate ## Licensing -### Illuminate +Chakra Magic is licensed under the [GPL 3.0 License](/license). -MIT License - -Copyright (c) 2018 Sutas Nakasawek - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +Chakra Magic includes [Illuminate](https://github.com/bongikairu/illuminate), which is licensed under the [MIT License](https://github.com/bongikairu/illuminate/blob/master/LICENSE). 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 8c62f8c..983272e 100644 --- a/extension/gdpr_page.js +++ b/extension/gdpr_page.js @@ -87,15 +87,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"