User:K bus/common.js
Jump to navigation
Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
The accompanying .css page for this skin can be added at User:K bus/common.css. |
- Report page listing warnings and errors.
/* SaveButton on top of textareaeditformthingalike */
function EatPizzaWithMustard() {
if( wgAction == "edit" || wgAction == "submit" ) {
// We are editing a page, so most likely we meet the editform
o1 = document.getElementById('editform')
div = document.createElement('div')
//o2 = document.getElementById('wpSave').outerHTML
o2 = '<input id="wpSave" name="wpSave" type="submit" tabindex="5" value="Pagina opslaan" accesskey="s" title="Save your changes [s]" />'
div.innerHTML = o2
//o3 = document.getElementById('wpTextbox1')
o3 = document.getElementsByClassName('wikiEditor-ui')[0]
o1.insertBefore(div, o3)
}
}
$(EatPizzaWithMustard);
// Commons sum-it-up
$(function() {
if ((wgNamespaceNumber == 0)||(wgNamespaceNumber == 14)) {
mw.util.addPortletLink('p-tb', "http://toolserver.org/~magnus/commons_sumitup.php?title=" + encodeURIComponent(wgTitle)+"&baseon=nl", 'Sum-it-up', 't-sumitup', "Make description with Commons sum-it-up", '1');
}
});
$( function() {
if(mw.config.get('wgNamespaceNumber') == 6) {
if(wgTitle.match(/(.*)\.(jpg|jpeg)/gi)) {
var croplink = "//toolserver.org/~luxo/cropbot/cropbot.php?img="+wgTitle;
mw.util.addPortletLink("p-tb", croplink, "Crop", "p-crop", "Crop this image", "o", false);
}
}
});
/** &withJS= URL parameter *******
* Allow to try custom scripts on the MediaWiki namespace without
* editing [[Special:Mypage/monobook.js]]
*
* Maintainer: [[User:Platonides]]
*/
{
var extraJS = getParamValue("withJS");
if (extraJS)
if (extraJS.match("^MediaWiki:[^&<>=%]*\.js$"))
importScript(extraJS);
else
alert(extraJS + " javascript not allowed to be loaded.");
}
$(function() {
if ((wgNamespaceNumber == 0)) {
addLink('p-tb', "//toolserver.org/~locator/coordinates.php?type=landmark&template=coordinaten&wiki=nl.wikipedia.org&page=" + encodeURIComponent(mw.config.get('wgPageName')), "Coördinaten", "add_coor", "Voeg coördinaten toe aan dit artikel");
}
});