Suggestions
|
|
let's discuss here your suggestions..about everything! |
|
|
Remove function:
remove=function(tagName, attribute, regex) {
var nodes = document.getElementsByTagName(tagName), i=-1;
while (obj = nodes[i++])
if (regex.test(obj.getAttribute(attribute))) obj.parentNode.removeChild(obj);
};
? |
|
|
for sure it would be more compact, but I don't like to lose clearness. Anyway today I realized I could do a better job using an hybrid approach. So when the pattern is really simple why should I avoid the css styles you suggested before? the selectors let me do what I need in that case. So I divided the script in 2 phases, in the first one it obfuscates the ads overriding the style via css. Then it cleans everything looking for Iframes matching the regular expression. I'm going to upload last version. |
|
|
Oooh.. not sure if you want to block all |
|
|
what I found so far were empty iframes that facebook as a whole needed to work. But if I hide them instead of removing everything keeps working. And all the iframes with visible content seem to be advertisments. ...just while I was writing I forgot that some applications actually use iframes with content, Realm of Empires for example. It's a mess...I have to go back, I really hoped I solved definitely the problem. Now the pattern again, it's a nightmare :) |
|
|
How about blocking the new Poll's that show up on the news feed? |