Gebruiker:Rots61/common.js
Naar navigatie springen
Naar zoeken springen
Let op! Nadat je de veranderingen hebt opgeslagen, moet je de cache van je browser nog legen om ze daadwerkelijk te zien.
Mozilla (incl. Firefox) | ctrl-shift-r |
IE | ctrl-f5 |
Opera | f5 |
Safari | cmd-r |
Konqueror | f5 |
mw.loader.using('mediawiki.util', function() {
mw.util.addPortletLink('p-tb',
'https://nl.wikipedia.org/wiki/' + encodeURIComponent(mw.config.get('wgPageName')),
'Wikipedia ', '#wikipedialink', mw.config.get('wgPageName') + " op Wikipedia ");
});
mw.loader.using('mediawiki.util', function() {
mw.util.addPortletLink('p-tb',
'https://www.google.nl/search?q=' + encodeURIComponent(mw.config.get('wgPageName')),
'Google ', '#googlelink', mw.config.get('wgPageName') + " op Google ");
});
mw.loader.load('//wikikids.nl/index.php?title=User:Rots61/Clear.js&action=raw&ctype=text/javascript'); // [[User:Rots61/Clear.js]]
/**
* Load withJS & withCSS
*
* @source www.mediawiki.org/wiki/Snippets/Load_JS_and_CSS_by_URL
* @rev 3
*/
mw.loader.using( ['mediawiki.util'], function () {
var extraJS = mw.util.getParamValue( 'withJS' );
if ( extraJS ) {
// Disallow some characters in file name
if ( extraJS.match( /\.js$/ ) ) {
mw.log(extraJS);
console.log(importScript(extraJS));
importScript( extraJS );
// Show message after DOM is ready.
} else {
$( function() {
mw.notify( 'Invalid javascript URL; only javascript pages from MediaWiki: space are allowed.', { title: 'Error' } );
} );
}
}
var extraCSS = mw.util.getParamValue( 'withCSS' );
if ( extraCSS ) {
// Disallow some characters in file name
if ( extraCSS.match( /\.css$/ ) ) {
importStylesheet( extraCSS );
// Show message after DOM is ready.
} else {
$( function() {
mw.notify( 'Invalid stylesheet URL', { title: 'Error' } );
} );
}
}
} );