diff --git a/README.md b/README.md index 66aa201..432b4f4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Piwik Browser Injector +Matomo Browser Injector ======== [![Chrome Web Store](https://img.shields.io/chrome-web-store/v/bglodhjbeeolbfpodfacccmnjledmggn.svg)](https://chrome.google.com/webstore/detail/piwik-injector/bglodhjbeeolbfpodfacccmnjledmggn) @@ -8,19 +8,19 @@ Piwik Browser Injector [![Mozilla Add-on](https://img.shields.io/amo/v/piwik-injector.svg)](https://addons.mozilla.org/de/firefox/addon/piwik-injector/) [![Mozilla Add-on](https://img.shields.io/badge/mozilla%20addon-download%20now-brightgreen.svg)](https://addons.mozilla.org/de/firefox/addon/piwik-injector/) -Piwik Browser Injector helps you to try out [Piwik](https://piwik.org/), the leading open source web analytics software, in cases where it isn't possible to modify the source of a website or when you just want to quickly see how the visitor data of your website would look like in Piwik. +Matomo Browser Injector helps you to try out [Matomo](https://matomo.org/), the leading open source web analytics software, in cases where it isn't possible to modify the source of a website or when you just want to quickly see how the visitor data of your website would look like in Piwik. ### Usage: * open the domain, where you want to include the tracking code localy -* click on the Piwik Browser Injector icon in your toolbar and enter the URL to your piwik instance and the ID of your website +* click on the Matomo Browser Injector icon in your toolbar and enter the URL to your piwik instance and the ID of your website * if you want to try out advanced features you can enable the expert mode where you can freely modify the tracking code This extention is in an early development state and may include backward-incompatible changes in future versions. If you notice any bugs or have wishes for features open an issue on the github repository: -https://github.com/Findus23/piwik-injector +https://github.com/Findus23/matomo-injector Licended under [the MIT License](https://github.com/Findus23/piwik-injector/blob/master/LICENSE) and based on the work of [hromadadan](https://github.com/guzart/customjs) and [xcv58](https://github.com/xcv58/Custom-JavaScript-for-Websites-2) -![screenshot](docs/screenshot_chrome_1.png) \ No newline at end of file +![screenshot](docs/screenshot_chrome_1.png) diff --git a/_locales/de/messages.json b/_locales/de/messages.json index ebc3aa6..07b5364 100644 --- a/_locales/de/messages.json +++ b/_locales/de/messages.json @@ -1,10 +1,10 @@ { "extension_name": { - "message": "Piwik Injector", + "message": "Matomo Injector", "description": "name of the extension" }, "extension_description": { - "message": "Teste Piwik, die Open Source, auf Datenschutz spezialisierte Web-Analytics-Software, ohne auch nur eine Datei ändern zu müssen.", + "message": "Teste Matomo, die Open Source, auf Datenschutz spezialisierte Web-Analytics-Software, ohne auch nur eine Datei ändern zu müssen.", "description": "a short description shown in the extension list" }, "host_title": { @@ -63,4 +63,4 @@ "message": "aktivieren", "description": "label for checkbox" } -} \ No newline at end of file +} diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 6f71f9a..539a94a 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1,27 +1,27 @@ { "extension_name": { - "message": "Piwik Browser Injector", + "message": "Matomo Browser Injector", "description": "name of the extension" }, "extension_description": { - "message": "Try out Piwik, the open source, privacy aware web analytics software, without the need to modify anything.", + "message": "Try out Matomo, the open source, privacy aware web analytics software, without the need to modify anything.", "description": "a short description shown in the extension list; should be pretty short, but descriptive" }, "extension_tags": { - "message": "piwik, analytics, javascript, debugging, injecting, open source,", + "message": "matomo, analytics, javascript, debugging, injecting, open source,", "description": "tags for Firefox addon description (maximum 20)" }, "extension_screenshot_1": { - "message": "Add the piwik tracking code to every website without access to the website source", - "description": "description for the first screenshot (https://github.com/Findus23/piwik-injector/blob/master/docs/screenshot_firefox_1.png)" + "message": "Add the matomo tracking code to every website without access to the website source", + "description": "description for the first screenshot (https://github.com/Findus23/matomo-injector/blob/master/docs/screenshot_firefox_1.png)" }, "extension_screenshot_2": { "message": "Future visits to this domain will be tracked ...", - "description": "description for the second screenshot (https://github.com/Findus23/piwik-injector/blob/master/docs/screenshot_firefox_2.png)" + "description": "description for the second screenshot (https://github.com/Findus23/matomo-injector/blob/master/docs/screenshot_firefox_2.png)" }, "extension_screenshot_3": { - "message": "... and processed by Piwik", - "description": "description for the third screenshot (https://github.com/Findus23/piwik-injector/blob/master/docs/screenshot_firefox_3.png)" + "message": "... and processed by Matomo", + "description": "description for the third screenshot (https://github.com/Findus23/matomo-injector/blob/master/docs/screenshot_firefox_3.png)" }, "host_label": { "message": "hosts", @@ -83,16 +83,16 @@ "message": "enable", "description": "label for checkbox" }, - "piwik_url_title": { - "message": "the URL to your piwik instance without trailing piwik.php or piwik.js", - "description": "title text of piwik URL input" + "matomo_url_title": { + "message": "the URL to your matomo instance without trailing matomo.php or matomo.js", + "description": "title text of matomo URL input" }, - "piwik_url_placeholder": { - "message": "piwik URL", - "description": "placeholder text of piwik URL input" + "matomo_url_placeholder": { + "message": "matomo URL", + "description": "placeholder text of matomo URL input" }, "site_id_title": { - "message": "the id of your website in Piwik", + "message": "the id of your website in Matomo", "description": "title text of site ID input" }, "site_id_placeholder": { @@ -108,7 +108,7 @@ "description": "checkbox on settings page" }, "enabled_badge_title": { - "message": "This website is modified by Piwik Browser Injector.", + "message": "This website is modified by Matomo Browser Injector.", "description": "title text of attention icon on every page where extention is enabled." } -} \ No newline at end of file +} diff --git a/docs/chrome_large_marquee.png b/docs/chrome_large_marquee.png index 207a253..9ed5dd6 100644 Binary files a/docs/chrome_large_marquee.png and b/docs/chrome_large_marquee.png differ diff --git a/docs/chrome_large_marquee.svg b/docs/chrome_large_marquee.svg index d605d72..9fce841 100644 --- a/docs/chrome_large_marquee.svg +++ b/docs/chrome_large_marquee.svg @@ -14,9 +14,9 @@ viewBox="0 0 1400 560" version="1.1" id="svg8" - inkscape:version="0.92.2 (5c3e80d, 2017-08-06)" - sodipodi:docname="large_chrome_marquee.svg" - inkscape:export-filename="/home/lukas/git/piwik-injector/docs/large_chrome_marquee.png" + inkscape:version="0.92.3 (2405546, 2018-03-11)" + sodipodi:docname="chrome_large_marquee.svg" + inkscape:export-filename="/home/lukas/git/piwik-injector/docs/chrome_large_marquee.png" inkscape:export-xdpi="25.4" inkscape:export-ydpi="25.4"> image/svg+xml - + @@ -78,36 +78,6 @@ y="-262.79681" ry="0" rx="0" /> - - - - - - - Browser Injector + diff --git a/docs/chrome_large_tile.png b/docs/chrome_large_tile.png index 81e34c6..2ab05d4 100644 Binary files a/docs/chrome_large_tile.png and b/docs/chrome_large_tile.png differ diff --git a/docs/chrome_large_tile.svg b/docs/chrome_large_tile.svg index 448c38b..ab54c20 100644 --- a/docs/chrome_large_tile.svg +++ b/docs/chrome_large_tile.svg @@ -14,9 +14,9 @@ viewBox="0 0 920 680" version="1.1" id="svg8" - inkscape:version="0.92.2 (5c3e80d, 2017-08-06)" - sodipodi:docname="large_chrome_tile.svg" - inkscape:export-filename="/home/lukas/git/piwik-injector/docs/large_chrome_tile.png" + inkscape:version="0.92.3 (2405546, 2018-03-11)" + sodipodi:docname="chrome_large_tile.svg" + inkscape:export-filename="/home/lukas/git/piwik-injector/docs/chrome_large_tile.png" inkscape:export-xdpi="25.4" inkscape:export-ydpi="25.4"> image/svg+xml - + @@ -78,36 +78,6 @@ y="-382.79684" ry="0" rx="0" /> - - - - - - - Browser Injector + diff --git a/docs/chrome_small_tile.png b/docs/chrome_small_tile.png index f80f870..4c3f8d1 100644 Binary files a/docs/chrome_small_tile.png and b/docs/chrome_small_tile.png differ diff --git a/docs/chrome_small_tile.svg b/docs/chrome_small_tile.svg index 99e320d..e5f2fbb 100644 --- a/docs/chrome_small_tile.svg +++ b/docs/chrome_small_tile.svg @@ -14,9 +14,9 @@ viewBox="0 0 440 280" version="1.1" id="svg8" - inkscape:version="0.92.2 (5c3e80d, 2017-08-06)" - sodipodi:docname="small_chrome_tile.svg" - inkscape:export-filename="/home/lukas/git/piwik-injector/docs/small_chrome_tile.png" + inkscape:version="0.92.3 (2405546, 2018-03-11)" + sodipodi:docname="chrome_small_tile.svg" + inkscape:export-filename="/home/lukas/git/piwik-injector/docs/chrome_small_tile.png" inkscape:export-xdpi="25.4" inkscape:export-ydpi="25.4"> image/svg+xml - + @@ -78,34 +78,6 @@ y="17.203205" ry="0" rx="0" /> - - - - - - - Browser Injector + diff --git a/img/icon.svg b/img/icon.svg index e4f6f4f..145a2e0 100644 --- a/img/icon.svg +++ b/img/icon.svg @@ -15,8 +15,8 @@ width="300" height="300" viewBox="0 0 300 300" - sodipodi:docname="logo.svg" - inkscape:version="0.92.2 (5c3e80d, 2017-08-06)" + sodipodi:docname="icon.svg" + inkscape:version="0.92.3 (2405546, 2018-03-11)" inkscape:export-filename="/home/lukas/git/piwik-injector/img/icon256.png" inkscape:export-xdpi="81.919998" inkscape:export-ydpi="81.919998"> \ No newline at end of file + transform="matrix(1.3333333,0,0,-1.3333333,0,300.00001)"> \ No newline at end of file diff --git a/img/logo-128x128.png b/img/logo-128x128.png index 0bd0273..1f24794 100644 Binary files a/img/logo-128x128.png and b/img/logo-128x128.png differ diff --git a/img/logo-256x256.png b/img/logo-256x256.png index 55707c0..251acad 100644 Binary files a/img/logo-256x256.png and b/img/logo-256x256.png differ diff --git a/img/logo-512x512.png b/img/logo-512x512.png index adeb817..051e3de 100644 Binary files a/img/logo-512x512.png and b/img/logo-512x512.png differ diff --git a/js/popup.js b/js/popup.js index b3b41df..b69c326 100644 --- a/js/popup.js +++ b/js/popup.js @@ -12,8 +12,8 @@ document.addEventListener('DOMContentLoaded', function() { resetBtn: document.getElementById("reset"), draftRemoveLink: document.getElementById("draft-remove"), error: document.getElementById("error"), - piwikForm: document.getElementById("piwik-form"), - piwikURL: document.getElementById("piwik-url"), + matomoForm: document.getElementById("matomo-form"), + matomoURL: document.getElementById("matomo-url"), siteID: document.getElementById("site-id"), expertMode: document.getElementById("expert-mode") }, @@ -23,12 +23,12 @@ document.addEventListener('DOMContentLoaded', function() { var translateKey = id.replace(/-/g, "_"); document.getElementById(id).innerText = chrome.i18n.getMessage(translateKey); }); - var translatableTitles = ["host", "goto-host", "save", "reset", "draft-remove", "piwik-url", "site-id"]; + var translatableTitles = ["host", "goto-host", "save", "reset", "draft-remove", "matomo-url", "site-id"]; translatableTitles.forEach(function(id) { var translateKey = id.replace("-", "_") + "_title"; document.getElementById(id).setAttribute('title', chrome.i18n.getMessage(translateKey)); }); - popup.el.piwikURL.setAttribute("placeholder", chrome.i18n.getMessage("piwik_url_placeholder")); + popup.el.matomoURL.setAttribute("placeholder", chrome.i18n.getMessage("matomo_url_placeholder")); popup.el.siteID.setAttribute("placeholder", chrome.i18n.getMessage("site_id_placeholder")); document.title = chrome.i18n.getMessage("extension_name"); }, @@ -114,11 +114,11 @@ document.addEventListener('DOMContentLoaded', function() { // Merge host's data to defaults popup.data = Object.assign(popup.data, response); - popup.piwik.loadExpertMode(); + popup.matomo.loadExpertMode(); console.warn("HALLO"); - if (popup.data.piwik) { - popup.el.piwikURL.value = popup.data.piwik.piwikURL; - popup.el.siteID.value = popup.data.piwik.siteID; + if (popup.data.matomo) { + popup.el.matomoURL.value = popup.data.matomo.matomoURL; + popup.el.siteID.value = popup.data.matomo.siteID; } popup.data.originalSource = popup.data.source; @@ -135,32 +135,32 @@ document.addEventListener('DOMContentLoaded', function() { } }, - piwik: { + matomo: { defaultTrackingCode: "var _paq = _paq || [];\n" + "/* tracker methods like \"setCustomDimension\" should be called before \"trackPageView\" */\n" + "_paq.push(['trackPageView']);\n" + "_paq.push(['enableLinkTracking']);\n" + "(function() {\n" + - " var u=\"{{PIWIKURL}}\";\n" + - " _paq.push(['setTrackerUrl', u+'piwik.php']);\n" + + " var u=\"{{MATOMOURL}}\";\n" + + " _paq.push(['setTrackerUrl', u+'matomo.php']);\n" + " _paq.push(['setSiteId', '{{SITEID}}']);\n" + " var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];\n" + - " g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);\n" + + " g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);\n" + "})();", handleTrackingCode: function() { - var piwikURL = encodeURI(popup.el.piwikURL.value); - if (!piwikURL.endsWith("/")) { - piwikURL += "/"; + var matomoURL = encodeURI(popup.el.matomoURL.value); + if (!matomoURL.endsWith("/")) { + matomoURL += "/"; } var siteID = parseInt(popup.el.siteID.value, 10); - if (!siteID || !piwikURL) { + if (!siteID || !matomoURL) { return false; } - var js = popup.piwik.defaultTrackingCode; - js = js.replace("{{PIWIKURL}}", piwikURL); + var js = popup.matomo.defaultTrackingCode; + js = js.replace("{{MATOMOURL}}", matomoURL); js = js.replace("{{SITEID}}", String(siteID)); popup.editor.apply(js); - popup.data.piwik = {piwikURL: piwikURL, siteID: siteID}; + popup.data.matomo = {matomoURL: matomoURL, siteID: siteID}; }, setExpertMode: function(expertMode, onLoad) { popup.editor.editorInstance.setOptions({ @@ -169,7 +169,7 @@ document.addEventListener('DOMContentLoaded', function() { highlightGutterLine: expertMode }); popup.editor.editorInstance.container.style.backgroundColor = expertMode ? "white" : "#eaeded"; - popup.el.piwikForm.querySelectorAll("input").forEach(function(input) { + popup.el.matomoForm.querySelectorAll("input").forEach(function(input) { input.disabled = expertMode; }); popup.el.expertMode.checked = expertMode; @@ -182,7 +182,7 @@ document.addEventListener('DOMContentLoaded', function() { }, loadExpertMode: function() { var expertMode = (typeof popup.data.expertMode === "undefined") ? false : popup.data.expertMode; - popup.piwik.setExpertMode(expertMode); + popup.matomo.setExpertMode(expertMode); } }, applyData: function(data, notDraft) { @@ -316,8 +316,8 @@ document.addEventListener('DOMContentLoaded', function() { }, popup.apiclb.onSelectedTab); - popup.el.piwikForm.querySelectorAll("input").forEach(function(input) { - input.addEventListener("change", popup.piwik.handleTrackingCode); + popup.el.matomoForm.querySelectorAll("input").forEach(function(input) { + input.addEventListener("change", popup.matomo.handleTrackingCode); }); /** @@ -438,7 +438,7 @@ document.addEventListener('DOMContentLoaded', function() { popup.el.expertMode.addEventListener("change", function(event) { var enabled = event.target.checked; - popup.piwik.setExpertMode(enabled); + popup.matomo.setExpertMode(enabled); }); }, false); diff --git a/manifest.json b/manifest.json index 2d8953f..425ed76 100644 --- a/manifest.json +++ b/manifest.json @@ -1,8 +1,8 @@ { "manifest_version": 2, "name": "__MSG_extension_name__", - "short_name": "piwik-injector", - "version": "3.2.4", + "short_name": "matomo-injector", + "version": "3.3.0", "author": "Lukas Winkler, xcv58, hromadadan", "description": "__MSG_extension_description__", "icons": { diff --git a/package.json b/package.json index 6149e7e..80409b3 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "piwik-injector", + "name": "matomo-injector", "version": "1.0.0", "description": "", "main": "index.js", diff --git a/popup.html b/popup.html index 093832a..2ffc0fe 100644 --- a/popup.html +++ b/popup.html @@ -28,8 +28,8 @@ -
- +
+