We should put these scripts and CSS's available in the website (like in dwm patches)

Enno Boland (Gottox) wrote:
for now there's a user-javascript which can be used to hide most
flashbanners/javaapplets. Later there will be also something like
noscript/adblock.

Here's an example to hide flash/java. put it into ~/.surf/script.js:

var elementNames = new Array("object","applet");

for(var i = 0; i < elementNames.length; i++) {
        elements = document.getElementsByTagName(elementNames[i]);
        for(var j = 0; j < elements.length; j++) {
                var button = document.createElement("button");
                button.appendChild(document.createTextNode("<" +
elementNames[i] + ">"));
                elements[j].parentNode.insertBefore(button, elements[j]);
                button.onclick = function() {
                        this.nextSibling.style.display="";
                        this.style.display="None";
                        return false;
                }
                elements[j].style.display="None";
        }
}


2009/9/18 Uriel <lost.gob...@gmail.com>:
What every browser should come with built in by default is something
like NoScript.


uriel

On Fri, Sep 18, 2009 at 3:49 AM, joshua shaw <shaw.j...@gmail.com> wrote:
I'm tired of flash everywhere.  Here's a patch with compile time
option to disable plugins and keybindings to toggle plugins during
browsing.

josh





Reply via email to