User:Deltaneos/FastDelete.js

From Yugipedia
Jump to: navigation, search

Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: hold down Ctrl and click the Refresh or Reload button. Firefox: hold down ⇧ Shift while clicking Reload (or press Ctrl+⇧ Shift+R). Google Chrome and Safari users can just click the Reload button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.

/* fast delete 

[[w:c:dev:FastDelete]]

Originally by [[w:user:Splarka]]

Re-written in 2009 by [[w:User:Uberfuzzy]], using code ganked from PurgeButton, for which jQuery code credit goes to [[User:Dantman]].

*/
var fdButtons = [];

/* All namespaces */

fdButtons[fdButtons.length] = {
  'summary': 'Copy and paste move',
  'label': 'c'};

fdButtons[fdButtons.length] = {
  'summary': 'Redirect left from pagemove',
  'label': 'r'};

fdButtons[fdButtons.length] = {
  'summary': 'Fan made. Please visit the [[w:c:ycm|Yu-Gi-Oh! Card Maker Wiki]] to post your own creations.',
  'label': 'f'};

fdButtons[fdButtons.length] = {
  'summary': '[[w:c:help:Help:Spam|spam]]',
  'label': 's'};

fdButtons[fdButtons.length] = {
  'summary': '[[w:c:help:Help:Vandalism|vandalism]]',
  'label': 'v'};

fdButtons[fdButtons.length] = {
  'summary': 'Irrelevant to this site.',
  'label': 'i'};

fdButtons[fdButtons.length] = {
  'summary': 'Misused preload',
  'label': 'p'};

fdButtons[fdButtons.length] = {
  'summary': 'Author request',
  'label': 'a'};


/* Main only */

if(wgNamespaceNumber == 0) {

  fdButtons[fdButtons.length] = {
    'summary': 'Please use the [[Forum:Yu-Gi-Oh! Deck Help|forum]] to post your own Decks.',
    'label': 'd'};

}

/* User (talk) only */

if(wgNamespaceNumber == 2 || wgNamespaceNumber == 3) {

  fdButtons[fdButtons.length] = {
    'summary': '[[wikipedia:Fair use|Fair use]] images [[Project:User page#Images on user pages|cannot]] be used on your user page.',
    'label': 'fu'};
}

/* File only */

if(wgNamespaceNumber == 6) {

  fdButtons[fdButtons.length] = {
    'summary': 'Duplicated/superseded file.',
    'label': 'ds'};
}

/* Tips only */

if(wgNamespaceNumber == 106) {

  fdButtons[fdButtons.length] = {
    'summary': 'Not a real life card.',
    'label': 'n'};

  fdButtons[fdButtons.length] = {
    'summary': 'Doesn\'t work.',
    'label': 'dw'};
}

/* Rulings only */

if(wgNamespaceNumber == 102) {

  fdButtons[fdButtons.length] = {
    'summary': 'Unofficial/unsourced. See [[Project:Card Rulings]] for more information.',
    'label': 'u'};
}