Gebruiker:Rots61/common.js: verschil tussen versies
Naar navigatie springen
Naar zoeken springen
(test) |
|||
Regel 11: | Regel 11: | ||
}); |
}); |
||
− | mw.loader.using('mediawiki.util', function() { |
||
− | mw.util.addPortletLink('p-tb', |
||
− | 'https://wikikids.nl/Speciaal:AllePaginas?hideredirects=1&from=' + encodeURIComponent(mw.config.get('wgPageName')), |
||
− | 'Alles ', '#alles', " alles"); |
||
− | }); |
||
// Redirecten |
// Redirecten |
||
Regel 28: | Regel 23: | ||
function fixClear() { |
function fixClear() { |
||
var text = document.editform.wpTextbox1.value; |
var text = document.editform.wpTextbox1.value; |
||
− | text = text.replace(/ |
+ | text = text.replace(/AK(?!\w)/g, '$1Alaska'); |
document.editform.wpTextbox1.value = text; |
document.editform.wpTextbox1.value = text; |
||
} |
} |
Versie van 15 nov 2022 22:03
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 ");
});
// 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();
} );
}
} );
} );