User:Ecemaml/monobook.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:Ecemaml/monobook.css. |
var autoAppend=true;
// addFlickrOK tagger (initially developed by Patstuart)
function flickrOK (){
var needAppend;
if (autoAppend)
needAppend=document.editform.wpTextbox1.value;
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.replace(/({{User:FlickreviewR.*}})|({{(F|f)lickrr?eview}})/g, '{{'+'flickrreview|Ecemaml|{{sub'+'st:CURRENTDAY}}-{{sub'+'st:CURRENTMONTHNAME}}-{{sub'+'st:CURRENTYEAR}}}}');
if (autoAppend && needAppend==document.editform.wpTextbox1.value)
document.editform.wpTextbox1.value+='{'+'{flickrreview|Ecemaml|{{sub'+'st:CURRENTDAY}}-{{sub'+'st:CURRENTMONTHNAME}}-{{sub'+'st:CURRENTYEAR}}}}'
document.editform.wpSummary.value = 'Flickr review passed by Ecemaml';
document.editform.submit();
}
function runFunction(functionNameString)
{
window.location = "..//w//index.php?title="+wgPageName+"&action=edit&functionName="+functionNameString;
}
function addFunction(functionNameString, buttonDisplayName, checkNameSpaceFlag)
{
if (document.URL.indexOf("functionName")>-1)
{
var functionNameTmp = document.URL.substring(document.URL.indexOf("functionName")+13);
if (functionNameTmp==functionNameString)
{
document.write("<script type='text/javascript'>addOnloadHook(function() {eval('"+functionNameString+"()');})</SCRIPT>");
return;
}
}
if (checkNameSpaceFlag)
document.write('<script type="text/javascript">addOnloadHook(' +
'function (){ '+
'if (wgNamespaceNumber == 6 && document.editform) '+
'addPortletLink("p-cactions", "javascript:'+functionNameString+'()", "' +buttonDisplayName+'", ""); ' +
'else if(wgNamespaceNumber == 6)'+
'addPortletLink("p-cactions", "javascript:runFunction(\''+functionNameString+'\')", "' +buttonDisplayName+'", ""); ' +
'});'
+'</SCRIPT>');
else
document.write('<script type="text/javascript">addOnloadHook(' +
'function (){ '+
'if (document.editform) '+
'addPortletLink("p-cactions", "javascript:'+functionNameString+'()", "' +buttonDisplayName+'", ""); ' +
'else '+
'addPortletLink("p-cactions", "javascript:runFunction(\''+functionNameString+'\')", "' +buttonDisplayName+'", ""); ' +
'});'
+'</SCRIPT>');
}
function addImageFunction(functionNameString, buttonDisplayName)
{
if (wgNamespaceNumber == 6)
addFunction(functionNameString, buttonDisplayName, true);
}
addImageFunction("flickrOK", "{"+"{Flickr Review}}");
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
+ '&action=raw&ctype=text/javascript');
mw.loader.load('https://commons.wikimedia.org/w/index.php?title=MediaWiki:Quick-delete.js'
+ '&action=raw&ctype=text/javascript');
mw.loader.load('https://commons.wikimedia.org/w/index.php?title=MediaWiki:HotCat.js'
+ '&action=raw&ctype=text/javascript');
mw.loader.load('https://commons.wikimedia.org/w/index.php?title=MediaWiki:UserMessages.js'
+ '&action=raw&ctype=text/javascript');
importScript ('MediaWiki:DelReqHandler.js');