User:Seidenstud/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:Seidenstud/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|Seidenstud|{{sub'+'st:CURRENTDAY}}-{{sub'+'st:CURRENTMONTHNAME}}-{{sub'+'st:CURRENTYEAR}}}}');
if (autoAppend && needAppend==document.editform.wpTextbox1.value)
document.editform.wpTextbox1.value+='{'+'{flickrreview|Seidenstud|{{sub'+'st:CURRENTDAY}}-{{sub'+'st:CURRENTMONTHNAME}}-{{sub'+'st:CURRENTYEAR}}}}'
document.editform.wpSummary.value = '[[Commons:Flickr images|Flickrreview]] passed';
document.editform.wpMinoredit.checked = true;
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 (wgCanonicalNamespace == "Image" && document.editform) '+
'addPortletLink("p-cactions", "javascript:'+functionNameString+'()", "' +buttonDisplayName+'", ""); ' +
'else if(wgCanonicalNamespace == "Image")'+
'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 (wgCanonicalNamespace=="Image")
addFunction(functionNameString, buttonDisplayName, true);
}
addImageFunction("flickrOK", "{"+"{flickrreview}}");