Jump to content

User:Lilac Soul/autoformat.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.
function reflink() {
window.document.location.href = 'http://toolserver.org/~dispenser/cgi-bin/webreflinks.py?page='+mw.config.get('wgPageName')+'&citeweb=on';
}
$(function () {
if(mw.config.get('wgNamespaceNumber')==0&&mw.config.get('wgAction')=="view")
  {
    addPortletLink('p-cactions', 'javascript:reflink()', 'reflink', 'ca-reflink', 'Run reflink-bot on article', '', document.getElementById('ca-reflink'));
  }
});

/*</source>

[[Category:Wikipedia scripts]]
*/