MediaWiki talk:Gadget-QuickDelete.js/Archive 1

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Top

Not a copy... Please check the diff. Siebrand 11:26, 5 December 2007 (UTC)

Hmmm, sh**... can you fix this please ? I don't know how not to subst stuff... le Korrigan bla 11:38, 5 December 2007 (UTC)

includePage is not defined

includePage is not defined includePage( 'MediaWiki:Quick-delete2.js/' + wgUserLanguage );

I am using a non-English UI. Please fix... Siebrand 01:09, 21 January 2008 (UTC)

It seem that the mediawiki software run the gadgets before than common.js (where the includePage is defined). Giro720 18:10, 20 April 2008 (UTC)
Yes, that's true. AFAIK, it is not harmful to define functions more than once, so I will add that to the script. – Mike.lifeguard | @en.wb 19:38, 20 April 2008 (UTC)
importScript was introduced rev:35064 in wikibits.js () making includePage obsolete! --Dschwen 16:42, 22 May 2008 (UTC)

errors

There is at least one bug in this script, according to Firebug. "QuickDeleteLoadCount is not defined (line 289)" on the line "289QuickDeleteLoadCount++; //We keep track in QuickDeleteLoadCount how many times this file was loaded."

As well, "includePage is not defined (line 1)" – Mike.lifeguard | @en.wb 22:20, 22 January 2008 (UTC)

Safari has the same issue, I suggest changing "QuickDeleteLoadCount++;" at the bottom to
if( QuickDeleteLoadCount )
  QuickDeleteLoadCount++;
else
  QuickDeleteLoadcount = 1;

TheDJ 13:19, 29 February 2008 (UTC)

Now it says "QuickDeleteLoadCount is not defined" at "if( QuickDeleteLoadCount )" (ie the first line of the code above :( – Mike.lifeguard | @en.wb 17:54, 3 March 2008 (UTC)
Hmm, well we could try using the following instead. That's the official way I think. TheDJ 22:34, 3 March 2008 (UTC)
if( typeof( QuickDeleteLoadCount ) == 'undefined' )
  var QuickDeleteLoadcount = 1;
else
   QuickDeleteLoadCount++;

OK, so it looks like MediaWiki:Quick-delete.js is included once by MediaWiki:Monobook.js to add the deletion nomination link, and there was concern that people would use it improperly if given the no license/source/permission links by default (so restrict those to opt-in). I don't really see the justification for that, so I'd like to do one of the following:

  1. Enable full functionality for everyone using monobook by including it. Depending on whether this works in other skins, it should maybe be moved to common.js instead and/or removed from gadgets (if it only works in monobook and it's included by default for everyone with monobook, then it's useless as a gadget)
  2. Remove it from monobook, but enable full functionality for people who opt-in. This sounds like a good option if there is legitimate concern that people will abuse the script - but if that's really the case then why is one part ok to hand out, but the other part not?!

Either of those would remove the need for the QuickDeleteLoadCount black magic at the bottom, which would make lives easier. – Mike.lifeguard | @en.wb 12:02, 3 April 2008 (UTC)

extra } at the bottom?

if (fakeaction == 'mnx_warn') {
  mnx_addUserWarningTemplate(decodeURIComponent(getParamValue('target')), template_type); }
}

near line 318 or so

the original has ^^^; was wondering if the } on the end was extra, since it didn't seem to match anything, and firebug kept complaining of "syntax error: }\n" when it was there in my wiki's copy.

Isn't that the closing bracket of "if ((typeof x == 'undefined') || !QuickDeleteLoadCount)" ??? TheDJ 08:44, 7 March 2008 (UTC)

Cross-linking to improve chances someone will see this before I try to attempt it myself. :) Rocket000 (talk) 15:48, 4 August 2008 (UTC)

The Gadget version of this seems redundant now...

At some point I activated the "Quick delete" gadget from my preferences menu, but I guess this is now part of the default setup so when I look at an image page now I have two "Nominate for deletion" links in the toolbox and when I click on either one of them I post the deletion template twise on the page as well (see this diff for example). Granted it was easy enough to fix by just unchecking the quick delete gadget in my preferences once I figured out what was happening, but if this functionality is now on by default for everyone it seems kinds redundant to have it as a gadget option. --Sherool (talk) 18:38, 5 October 2008 (UTC)