MediaWiki talk:Gadget-RfDHelper.js

From Wikidata
Jump to navigation Jump to search

Resource loader[edit]

In reply to bugzilla:60536#c4:

the gadget has a dependency upon 'mediawiki.language', which is loaded on every page [...] fix that by wrapping the script in a mw.loader.using call

@Legoktm: Currently the script simply assumes mw.language to be loaded. Even without checking if it really is loaded. Which is not a big problem since it's most probably loaded anyway. ;-) Be careful when adding the mw.loader.using call. This may load the dependency even if it's not needed. --Thiemo Mättig (WMDE) 20:29, 12 February 2014 (UTC)[reply]

✓ Doneebraminiotalk 10:00, 16 June 2014 (UTC)[reply]

The Game[edit]

Hi, I wrote The Game which has caused some upheaval on RfD lately. Merging through The Game is temporarily deactivated, but when I turn it back on, I'll add "The Game" as a key phrase. If you agree, can you add this as a button marker, by changing line 106 from

if (deleteQuery.wpReason.indexOf('Merge.js') === -1 && window.rfdHero !== true) {

to

if (deleteQuery.wpReason.indexOf('Merge.js') === -1 && deleteQuery.wpReason.indexOf('The Game') === -1 && window.rfdHero !== true) {

--Magnus Manske (talk) 09:36, 30 May 2014 (UTC)[reply]

✓ Done and thanks. JurgenNL (talk) 11:12, 30 May 2014 (UTC)[reply]
@Magnus Manske: RfDs like this doesn't have edit summary. Maybe you should fix code.... by Revicomplaint? at 09:03, 31 May 2014 (UTC)[reply]
Like this? --Magnus Manske (talk) 14:50, 31 May 2014 (UTC)[reply]

Icon for moving backlinks?[edit]

Is someone able to suggest an icon moving backlink, just like the delete button currently we have? Currently stub code for moving backlink on RfD: –ebraminiotalk 10:00, 16 June 2014 (UTC)[reply]

$('a[title="User:BeneBot*/movelinks.js"]').each(function () {
  var query = new mw.Uri($(this).parent().parent().parent().prev().prev().find('a:first')[0].href).query;
  console.log(query.title, query.wpReason.match(/\[\[(Q\d+)\]\]/)[1]);
})
File:Symbol userfy vote.svg.--Çalak talk 19:18, 20 June 2014 (UTC)[reply]

Warn if there exists a talk page[edit]

Is it possible to implement a check whether there exists a talk page of the page requested for deletion? Matěj Suchánek (talk) 15:08, 22 June 2014 (UTC)[reply]

@Matěj Suchánek: Expensive for a user script, this should be done from Template:Rfd links but it has this feature. –ebraminiotalk 18:38, 22 June 2014 (UTC)[reply]
I asked because I thought script would be less expensive then parser function like {{#ifexist:. Matěj Suchánek (talk) 06:27, 23 June 2014 (UTC)[reply]
Is expensive there also but theoretically can be done with one database query there or at least parsed and cached but here will contain one at least one ajax request with some code complexity –ebraminiotalk 10:19, 25 June 2014 (UTC)[reply]
Reviewing this discussion and revising my comment, talk page existence could be done on 50 pages batches so was not that much expensive, but I think now the whole gadget is irrelevant as merges took place of RfD mostly, feel free to let me know if this speculation is not right. −ebrahimtalk 22:16, 2 April 2017 (UTC)[reply]
Yeah, nowadays RfD is not that busy. The only useful features left are backlinks count and regular check of page existence. Backlinks don't have to be moved anymore (and the old bot is not working anymore) and the usage of the mentioned parser function could be reduced by using it only on RfD, not the archiving subpages. Matěj Suchánek (talk) 14:14, 3 April 2017 (UTC)[reply]
Anyway, this had already been integrated to the template before I made this suggestion :) Matěj Suchánek (talk) 14:19, 3 April 2017 (UTC)[reply]

Self closing HTML tags[edit]

The code of the script uses invalid self closing HTML tags at some points (e.g. <span />). These aren't allowed anymore when Tidy is phased out. Can they be replaced now or after Tidy has been phased out? Mbch331 (talk) 20:26, 6 February 2017 (UTC)[reply]

✓ Done Matěj Suchánek (talk) 12:32, 7 February 2017 (UTC)[reply]