Closed coinzdude closed 1 year ago
yes I need this as well
It's also automatically disabled on Edge (having installed the extension from the google web store). The following error message is reported:
This extension has been disabled because it's been marked unsafe by the Chrome Web Store.
Was there malware in this extension?
Agree with the original poster that this extension was awesome. May need to review the source and install manually if safe.
On Chrome, the message is "This extension violates the Chrome Web Store policy."
I compared master and the installed extension, this is the diff. It looks like the extension has some changes in images, and it adds usage tracking via GA.
Only in /home/wmertens/.config/google-chrome/Default/Extensions/jafmfknfnkoekkdocjiaipcnmkklaajd/3.1.5_0/: _metadata
Only in /home/wmertens/.config/google-chrome/Default/Extensions/jafmfknfnkoekkdocjiaipcnmkklaajd/3.1.5_0/: background.html
diff -ru javascript-errors-notifier-master/background.js /home/wmertens/.config/google-chrome/Default/Extensions/jafmfknfnkoekkdocjiaipcnmkklaajd/3.1.5_0/background.js
--- javascript-errors-notifier-master/background.js 2018-09-06 13:21:53.000000000 +0200
+++ /home/wmertens/.config/google-chrome/Default/Extensions/jafmfknfnkoekkdocjiaipcnmkklaajd/3.1.5_0/background.js 2020-04-19 04:55:56.713181324 +0200
@@ -1,4 +1,8 @@
-function htmlentities(str) {
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-64830728-2']);
+_gaq.push(['_trackPageview']);
+
+function htmlentities(str) {
var div = document.createElement('div');
div.appendChild(document.createTextNode(str));
return div.innerHTML;
@@ -213,6 +217,22 @@
}
else if(data._errors) {
handleErrorsRequest(data, sender, sendResponse);
- }
+
+ if(localStorage['showIcon']) {
+ _gaq.push(['_trackEvent', 'errorWithIcon', 'clicked']);
+ }
+ else {
+ _gaq.push(['_trackEvent', 'errorWithNoIcon', 'clicked']);
+ }
+ }
+ else if(data._popup) {
+ _gaq.push(['_trackEvent', 'errorWithPopup', 'clicked']);
+ }
return true;
});
+
+(function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = 'https://ssl.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
Binary files javascript-errors-notifier-master/img/error_128.png and /home/wmertens/.config/google-chrome/Default/Extensions/jafmfknfnkoekkdocjiaipcnmkklaajd/3.1.5_0/img/error_128.png differ
Binary files javascript-errors-notifier-master/img/error_19_disabled.png and /home/wmertens/.config/google-chrome/Default/Extensions/jafmfknfnkoekkdocjiaipcnmkklaajd/3.1.5_0/img/error_19_disabled.png differ
Binary files javascript-errors-notifier-master/img/error_38_disabled.png and /home/wmertens/.config/google-chrome/Default/Extensions/jafmfknfnkoekkdocjiaipcnmkklaajd/3.1.5_0/img/error_38_disabled.png differ
Binary files javascript-errors-notifier-master/img/error_48.png and /home/wmertens/.config/google-chrome/Default/Extensions/jafmfknfnkoekkdocjiaipcnmkklaajd/3.1.5_0/img/error_48.png differ
diff -ru javascript-errors-notifier-master/manifest.json /home/wmertens/.config/google-chrome/Default/Extensions/jafmfknfnkoekkdocjiaipcnmkklaajd/3.1.5_0/manifest.json
--- javascript-errors-notifier-master/manifest.json 2018-09-06 13:21:53.000000000 +0200
+++ /home/wmertens/.config/google-chrome/Default/Extensions/jafmfknfnkoekkdocjiaipcnmkklaajd/3.1.5_0/manifest.json 2020-04-19 04:55:56.713181324 +0200
@@ -1,51 +1,35 @@
{
- "name": "JavaScript Errors Notifier",
- "short_name": "js_error",
- "description": "Notifies JavaScript errors by icon in toolbar bar or notification popup",
- "version": "3.1.4",
- "manifest_version": 2,
- "background": {
- "scripts": [
- "background.js"
- ]
- },
- "content_scripts": [
- {
- "all_frames": true,
- "js": [
- "content.js"
- ],
- "matches": [
- "<all_urls>"
- ],
- "run_at": "document_start"
- }
- ],
- "options_page": "options.html",
- "icons": {
- "128": "img/error_128.png",
- "16": "img/error_16.png",
- "48": "img/error_48.png"
- },
- "incognito": "spanning",
- "page_action": {
- "default_icon": {
- "19": "img/error_19_disabled.png",
- "38": "img/error_38_disabled.png"
- },
- "default_popup": "popup.html"
- },
- "web_accessible_resources": [
- "img/error_64.png",
- "img/error_38.png",
- "img/error_19.png",
- "popup.html",
- "options.html"
- ],
- "permissions": [
- "<all_urls>",
- "tabs",
- "storage",
- "webRequest"
- ]
+ "background": {
+ "page": "background.html"
+ },
+ "content_scripts": [ {
+ "all_frames": true,
+ "js": [ "content.js" ],
+ "matches": [ "\u003Call_urls>" ],
+ "run_at": "document_start"
+ } ],
+ "content_security_policy": "script-src 'self' https://ssl.google-analytics.com; object-src 'self'",
+ "description": "Notifies JavaScript errors by icon in toolbar bar or notification popup",
+ "icons": {
+ "128": "img/error_128.png",
+ "16": "img/error_16.png",
+ "48": "img/error_48.png"
+ },
+ "incognito": "spanning",
+ "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDRhiOYOSDraMvGibhl/qi0BGYNBExiAuxO+KycUCFp9fgAQ2OOQSnl/aNh5JlBiQf5yMcJXLQ3KkWxctHDJezlOTj1qSHFqttXCMvfMj2cQ1BAJpRLBUp3uSWuGryPBEMv99sGMTpyy3IXyLLvjqGqpK8LOx6PEw8Mv1e4Zsc+0wIDAQAB",
+ "manifest_version": 2,
+ "name": "JavaScript Errors Notifier",
+ "options_page": "options.html",
+ "page_action": {
+ "default_icon": {
+ "19": "img/error_19_disabled.png",
+ "38": "img/error_38_disabled.png"
+ },
+ "default_popup": "popup.html"
+ },
+ "permissions": [ "\u003Call_urls>", "tabs", "storage", "webRequest" ],
+ "short_name": "js_error",
+ "update_url": "https://clients2.google.com/service/update2/crx",
+ "version": "3.1.5",
+ "web_accessible_resources": [ "img/error_64.png", "img/error_38.png", "img/error_19.png", "popup.html", "options.html" ]
}
diff -ru javascript-errors-notifier-master/popup.js /home/wmertens/.config/google-chrome/Default/Extensions/jafmfknfnkoekkdocjiaipcnmkklaajd/3.1.5_0/popup.js
--- javascript-errors-notifier-master/popup.js 2018-09-06 13:21:53.000000000 +0200
+++ /home/wmertens/.config/google-chrome/Default/Extensions/jafmfknfnkoekkdocjiaipcnmkklaajd/3.1.5_0/popup.js 2020-04-19 04:55:56.713181324 +0200
@@ -64,5 +64,12 @@
setTimeout(autoSize, 500); // hot fix for slow CPU
}
});
+
+ chrome.runtime.sendMessage({
+ _popup: true,
+ url: window.location.href
+ }, function(response) {
+ options = response;
+ });
});
I downloaded the code as a .zip, unpacked it and told Chrome to load it as an unpacked extension.
i use this as well, by the diff posted above, looks like it was tracking all javascript errors from all sites being used to the devs GA from every installation.
@chrismccoy Hmm I read that as tracking loads and clicks only? And it doesn't know which page it's loaded on? Pretty innocent IMHO.
@chrismccoy Hmm I read that as tracking loads and clicks only? And it doesn't know which page it's loaded on? Pretty innocent IMHO.
ya just re-read it, hopefully it gets added back or someone forks it without the GA code and submits it, the background.js source here doesnt have the GA code, only the copy in releases does
@chrismccoy "only the copy in releases does"
that's definitely "not nice"
@wmertens "Pretty innocent IMHO."
Maybe, but maybe no: it can give insight into internal vulnerabilities of private software, for example.
Since it's been taken down one option is to just run it locally, I've been doing it for the past week and it's been working without issue:
git clone git@github.com:barbushin/javascript-errors-notifier.git
chrome://extensions/
@barbushin could you republish this extension in chrome extensions store? Пж..
I just now published this for review to the chrome store . Will be interesting to see if it goes through.
I just now published this for review to the chrome store . Will be interesting to see if it goes through.
Any news on this? Thank you.
Yes, some challenges to get this going. I did get the chrome store publishing account. That helped to see what is no longer allowed with this extension. Manifest v2 to v3 conversion turned into a challenge, requiring me to begin learning how this extension works and what it can't do the same in v3. Additionally I'm not certain if it's possible with v3 but I am still interested to try and also to take any code contribution or suggestions.
I'll look to clean up what I have and publish it in my fork.
https://github.com/coinzdude/javascript-errors-notifier/tree/manifest-v3
My most recent fork is here ^. This attempts to get the extension installable and runnable without errors and without store violations (manifest policy, code, broken web links, etc)
I had hoped to simply publish this as-is, but the manifest requirements changed from v2 to v3 which required architectural changes to the code. There are two major changes.
I am guessing the biggest challenge right now is in the custom event handler and how that talks between the front-end loaded code and the service worker.
My next step is likely to identify what is broken and produce the smallest question I can ask StackOverflow with an example and hopefully get some resolution
Here's something very roughly working via manifest v3. It will alert with a clickable icon like below. There's a bit to do from here, as this doesn't use the settings storage, and probably has an overloaded manifest as a landgrab to get a bunch of stuff it likely does not need... and probably a bunch of other things, but it does look like at least it will do what I was using manifest v2 for which was to tell me there's a JS error and let me see easily what it is. I am very happy to get any assistance here, but for now, I will clean this up, try to get it to use the user settings, and see if I can publish it into the store.
https://github.com/coinzdude/javascript-errors-notifier/tree/manifest-v3
This https://github.com/coinzdude/javascript-errors-notifier/tree/manifest-v3 is now beginning to work with storage. There's a bit more to clean up, remove unwanted permissions, and to get some behaviors working like "auto-pop-up notification" user preferences, but the path forward is pretty clear. I'll try to publish this as-is into the chrome store to see what happens.
Got a little more working with popup toggles and local storage. Waiting on chrome store first publish attempt to go through and I'll update it.
Another big update here https://github.com/coinzdude/javascript-errors-notifier/tree/manifest-v3, options panel is working with storage and reload. While JS errors seem to be caught nicely, I see I need to go through a set of tests to see what is not yet getting caught, like 404 errors... So close, almost there.
This is now published here https://chrome.google.com/webstore/detail/javascript-errors-notifie/lplhclpeegjedapdliokcacmphgcnlnd, but this version is just a first pass. A much better working version with options panel support and display issues resolved was just submitted.
I need to detach or extract my github fork so that issues can be submitted to it. I can also fully reset the repo, but I'd prefer to keep some relationship to all the history, etc. Any advice?
Detach - To create a new fork network containing only this repository. All of its sub-forks are re-parented and stay in the original fork network.
Extract - To move the fork and all its subforks into a new network. This repository becomes the new root.
https://stackoverflow.com/questions/16052477/delete-fork-dependency-of-a-github-repository
It seems the Chrome Store has some longer delays for extension updates. I made an initial publish attempt with something that simply runs, just to see what issues there would be to publish. After it went live, I published a more fully working version and am still waiting for it to launch. I'll update here when a much better working version is live.
Working update is live in the Chrome Store! I will look to break off the fork so issues can be submitted, contributions can be merged, etc. Thank you @barbushin for your amazing work!
Fork is separated and taking issues, https://github.com/coinzdude/javascript-errors-notifier/
Another update, 4.04 beta is live on github and pushed to the chrome store (currently, taking about 3 days to go live). The latest allows you to specify domains to apply filtering. Uncheck "show icon on all sites" and then specify the domains you want to be active.
getting not found: https://chrome.google.com/webstore/detail/javascript-errors-notifie/jafmfknfnkoekkdocjiaipcnmkklaajd
Just a note: I have a
partiallymostly working published fork mentioned below in this thread.https://chrome.google.com/webstore/detail/javascript-errors-notifie/lplhclpeegjedapdliokcacmphgcnlnd