User:Cuckooman4/statustab.js: Difference between revisions

Content deleted Content added
Cuckooman4 (talk | contribs)
created script.
 
m Maintenance: Replacing addPortletLink() with mw.util.addPortletLink() (mw:ResourceLoader/Migration_guide_(users)#addPortletLink)
 
(10 intermediate revisions by one other user not shown)
Line 1:
//Made by cuckooman4.
//
//See User:Cuckooman4/statustab.js/doc for instructions.
//<pre><nowiki>
 
if(!statuspageurl) var statuspageurl = "Status"
if(!statustemplateurl) var statussyntaxstatustemplateurl = "{{User:{{BASEPAGENAME}}/StatusTemplate|%STATUSPARAMS%}}"
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') {
Line 12 ⟶ 16:
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
}
}