Gebruiker:Rots61/common.js: verschil tussen versies
Naar navigatie springen
Naar zoeken springen
(test) |
|||
Regel 11: | Regel 11: | ||
}); |
}); |
||
+ | mw.loader.load('//wikikids.nl/index.php?title=User:Rots61/Clear.js&action=raw&ctype=text/javascript'); // [[User:Rots61/Clear.js]] |
||
− | // Redirecten |
||
− | |||
− | var mpTitle = "Wikikids:Visuele tekstverwerker"; |
||
− | var isMainPage = wgPageName == mpTitle |
||
− | if (isMainPage) |
||
− | {window.location="https://wikikids.nl/";} |
||
− | |||
− | |||
− | // Verander tekst in tekstveld |
||
− | |||
− | function fixClear() { |
||
− | var text = document.editform.wpTextbox1.value; |
||
− | text = text.replace(/AK(?!\w)/g, '$1Alaska'); |
||
− | document.editform.wpTextbox1.value = text; |
||
− | } |
||
− | |||
− | mw.loader.using( 'mediawiki.util', function () { |
||
− | |||
− | // Wait for the page to be parsed |
||
− | $( document ).ready( function () { |
||
− | |||
− | if (document.editform) { |
||
− | var link = mw.util.addPortletLink("p-tb", "#", "Clear", "tb-clear", "Verander kleine foutjes. ", ""); |
||
− | $( link ).click( function ( event ) { |
||
− | event.preventDefault(); |
||
− | fixClear(); |
||
− | |||
− | } ); |
||
− | } |
||
− | } ); |
||
− | } ); |
Versie van 15 nov 2022 22:08
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]]