Vikidia currently has 4,627 articles. Improve it! |
Join Vikidia: create your account now and improve it! |
User:Southparkfan/buttons.js
Jump to navigation
Jump to search
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
// From http://wikikids.wiki.kennisnet.nl/Gebruiker:Apoo/editscripts.js, CC-BY-SA/GFDL
function textfieldmagic4() {
$('#wpTextbox1').val( function(i,val) {
$('#wpSummary').val( "+{{welcome}}" );
if( val.length ) {
return "{{welcome}} ~~" + "~~\n\n" + val;
}
else {
return "{{welcome}} ~~" + "~~";
}
} );
}
addOnloadHook( function() {
$('<input></input>').attr('type','button').attr('id','wpCustomHello').val('+{{welcome}}').click( textfieldmagic4 ).insertBefore( $('#wpDiff') );
} );