Jump to content

User:Project FMF/vector.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Project FMF (talk | contribs) at 22:02, 14 February 2008 (adjust). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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.
importScript('User:AzaToth/morebits.js');
importScript('User:AzaToth/twinkleunlink.js');

/**** quick image delete ****/
document.write('<script type="text/javascript"' +
  'src="http://en.wikipedia.org/w/index.php?title=User:Howcheng/quickimgdelete.js' +
  '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
 
/* This is to keep track of who is using this extension: [[User:Howcheng/quickimgdelete.js]] */

function substNRD() {
  if (document.editform) {
    document.editform.wpTextbox1.value += "\n{{" + "subst:nrd}}";
    document.editform.wpSummary.value = "{{subst:[[Template:Nrd|nrd]]}}";
    document.editform.submit();
  } else
    document.location = wgServer + wgScript + "?title=" + wgPageName + "&action=edit&substNRD=1";
}
function addSubstNRD(){
  if (wgCanonicalNamespace == "Image")
    addPortletLink("p-cactions", "javascript:substNRD()", "{{" + "subst:nrd}}", "");
  if (document.location.href.indexOf("substNRD=1") > 0)
    substNRD();
}
addOnloadHook(addSubstNRD);