All pastes #17923 Raw Edit

destandaard.user.js

public javascript v1 · immutable
#17923 ·published 2005-07-17 18:50 UTC
rendered paste body
// ==UserScript==// @include http://destandaard.be/*// ==/UserScript==(function() {    var tags = document.evaluate(                '//img[contains(@src,"betalend.gif")] | //a[@href]',                document,                null,                XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,                null);    var flag = false;    for (var i = 0; i < tags.snapshotLength; i++) {        var tag = tags.snapshotItem(i);        var type = tag.nodeName.toUpperCase();        if (type == 'IMG') {            flag = true;        } else if (flag && type == 'A') {            flag = false;            tag.href =                tag.href.replace(/.*articleID=/, '/Misc/print.asp?articleID=');        }    }    window.print = function() { };})();