Jump to content

User:APPER/monobook.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by APPER (talk | contribs) at 05:51, 2 September 2005. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// ==UserScript==
// @name          Wikiwyg.Wikipedia
// @namespace     http://www.wikiwyg.net
// @description   Wikiwyg for Wikipedia
// @include       http://*.wikipedia.org/wiki*
// ==/UserScript==

use = function(urls) {
    var url = urls.shift();
    if (!url) return;

    var fetch_eval = function(response) {
        var javascript = response.responseText;
        try {
            eval(javascript);
        } catch(e) {
            alert('Javascript use failed:\n' + url + '\n' + e);
        }
        use(urls);
    }

    GM_xmlhttpRequest({
        method: 'GET',
        'url': url,
        onload: fetch_eval,
    });
}

use([
    'http://www.wikiwyg.net/download/bleed/lib/Wikiwyg.js',
    'http://www.wikiwyg.net/download/bleed/demo/wikipedia/wikipedia.js'
]);