Content deleted Content added
Closedmouth (talk | contribs) use labs |
m Maintenance: Replacing addPortletLink() with mw.util.addPortletLink() (mw:ResourceLoader/Migration_guide_(users)#addPortletLink) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1:
function movetocommons()
{
var url="http://bots.wmflabs.org/~richs/commonshelper.php?interface=en&image=" + encodeURIComponent( mw.config.get('wgTitle') ) + "&lang=en&username=" + encodeURIComponent( mw.config.get('wgUserName') ) + "&tusc_user=" + encodeURIComponent( mw.config.get('wgUserName') );
window.open(url);
}
Line 7:
{
if(mw.config.get('wgCanonicalNamespace') == "Image" || mw.config.get('wgCanonicalNamespace') == "File")
{
mw.util.addPortletLink("p-cactions","javascript:movetocommons()","move to commons","ca-mcom");
}
}
|