Jump to content

User:Jj137/csd.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 csd()
{
  // Only add for pages with the right string somewhere in the title
  if (wgCanonicalNamespace == "Talk") {
  if (document.title.indexOf("Delete ") != -1)
    {
     var title = encodeURIComponent( wgTitle );
     mw.util.addPortletLink("p-cactions", wgServer + "/w/index.php?title=Talk:" + title + "&action=delete&wpReason=%5B%5BWP%3ACSD%23G8%7CCSD+G8%5D%5D", "g8", "ca-talkpage", "Delete per CSD G8");
}
}
}
$(csd);