Jump to content

User:Cuckooman4/statustab.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//Made by cuckooman4.
//
//See User:Cuckooman4/statustab.js/doc for instructions.
//<pre><nowiki>

if(!statuspageurl) var statuspageurl = "Status"
if(!statustemplateurl) var statustemplateurl = "StatusTemplate"
if(!statussyntax) var statussyntax = "{{User:" + wgUserName + "/" + statustemplateurl + "|%STATUSPARAMS%}}"

addOnloadHook(
  function() {
    mw.util.addPortletLink('p-cactions', 'http://en.wikipedia.org/w/index.php?title=Special:Mypage/'+statuspageurl+'&action=edit', 'edit status', 'ca-status')

    if(location.href=='http://en.wikipedia.org/w/index.php?title=User:'+wgUserName+'/'+statuspageurl+'&action=edit') {
      var statusprompt = prompt("Status?")
      document.getElementById("wpTextbox1").innerText = statussyntax.split("%STATUSPARAMS%")[0] + statusprompt + statussyntax.split("%STATUSPARAMS%")[1]
      document.getElementById("wpSummary").value = "Changing status: " + statusprompt
      document.getElementById("wpMinoredit").checked = false
    }
  }
)

//</nowiki></pre>