User:Legoktm/secure.js

if(wgAction == 'edit' || wgAction == 'submit') { addOnloadHook(function {    addPortletLink('p-cactions','javascript:dosecure','Go to secure server','ca-secure');    }); } else { addOnloadHook(function {    addPortletLink('p-cactions',url + '','Go to secure server','ca-secure');    var url = 'https://en.wikipedia.org/wiki/' + encodeURIComponent(mw.config.get('wgPageName'));    }); } }