Fix performance issue (#2143)

* Fix #2140

Remove inpage js.

* Remove the two culprit

I removed Criteo & Carbon Ads which were the original culprit.
I also removed the beginning of Sizmek pattern as it looks useless and potentially dangerous.
I would add that any pattern matching some close to <code>\[\^(.).{0,3}\].{0,3}\1</code> in the beggining should look suspicious.
There are several good candidate in HTML..
main
Camille Barneaud 7 years ago committed by Elbert Alias
parent 1fd9273e3a
commit 27e1fa17a4

@ -1532,7 +1532,7 @@
}, },
"html": "<[a-z]+ [^>]*id=\"carbonads-container\"", "html": "<[a-z]+ [^>]*id=\"carbonads-container\"",
"icon": "Carbon Ads.png", "icon": "Carbon Ads.png",
"script": "[^\\/]*\\/\\/(?:engine|srv)\\.carbonads\\.com\\/", "script": "//(?:engine|srv)\\.carbonads\\.com\\/",
"website": "http://carbonads.net" "website": "http://carbonads.net"
}, },
"Cargo": { "Cargo": {
@ -2100,7 +2100,7 @@
"criteo_q": "" "criteo_q": ""
}, },
"icon": "Criteo.svg", "icon": "Criteo.svg",
"script": "[^/]*//(?:cas\\.criteo\\.com|(?:[^/]\\.)?criteo\\.net)/", "script": "//(?:cas\\.criteo\\.com|(?:[^/]\\.)?criteo\\.net)/",
"website": "http://criteo.com" "website": "http://criteo.com"
}, },
"Cross Pixel": { "Cross Pixel": {
@ -8793,7 +8793,7 @@
], ],
"html": "(?:<a [^>]*href=\"[^/]*//[^/]*serving-sys\\.com/|<img [^>]*src=\"[^/]*//[^/]*serving-sys\\.com/)", "html": "(?:<a [^>]*href=\"[^/]*//[^/]*serving-sys\\.com/|<img [^>]*src=\"[^/]*//[^/]*serving-sys\\.com/)",
"icon": "Sizmek.png", "icon": "Sizmek.png",
"script": "[^/]*//[^/]*serving-sys\\.com/", "script": "serving-sys\\.com/",
"website": "http://sizmek.com" "website": "http://sizmek.com"
}, },
"Slimbox": { "Slimbox": {

@ -13,7 +13,8 @@ if ( typeof browser !== 'undefined' && typeof document.body !== 'undefined' ) {
const scripts = Array.prototype.slice const scripts = Array.prototype.slice
.apply(document.scripts) .apply(document.scripts)
.filter(script => script.src) .filter(script => script.src)
.map(script => script.src); .map(script => script.src)
.filter(script => script.indexOf("data:text/javascript;") != 0);;
browser.runtime.sendMessage({ browser.runtime.sendMessage({
id: 'analyze', id: 'analyze',