MediaWiki talk:Gadget-rightsfilter.js: Difference between revisions

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Content deleted Content added
→‎Update: new section
Line 51: Line 51:


== JS Errors ==
== JS Errors ==
{{editprotected}}
{{tlx|1=editprotected|2=technical=yes}}
The script is generating the error
The script is generating the error
trailing \ in regular expression
trailing \ in regular expression
Line 85: Line 85:


Could some admin replicate [https://secure.wikimedia.org/wikibooks/pt/w/index.php/?diff=220261&oldid=218821 this update] to the original script? It adds a link which the user can use to get a url to the filtered list, making it easier to share specific sublists of logs and other pages. [[b:pt:User:Helder.wiki|Helder]] 21:07, 16 May 2011 (UTC)
Could some admin replicate [https://secure.wikimedia.org/wikibooks/pt/w/index.php/?diff=220261&oldid=218821 this update] to the original script? It adds a link which the user can use to get a url to the filtered list, making it easier to share specific sublists of logs and other pages. [[b:pt:User:Helder.wiki|Helder]] 21:07, 16 May 2011 (UTC)

== Update ==
{{editprotected}}
Hello! Could someone apply [https://secure.wikimedia.org/wikipedia/commons/w/index.php?title=MediaWiki:Gadget-rightsfilter.js&oldid=57959850&diff=57977420 these changes] to the script? The new version includes fixes to the problems mentioned in the sections above (i18n, bug fixes, backward compatibility, button to get links to filtered lists ). Feel free to add other translations as well. [[b:pt:User:Helder.wiki|Helder]] 04:15, 13 August 2011 (UTC)

Revision as of 04:15, 13 August 2011

lifilter

FYI, I've updated this to work on any page that has any <li> (and renamed it accordingly), and to work on demand via querystring as well. w:User:Splarka/lifilter.js. Splarka 06:10, 11 February 2008 (UTC)[reply]

Updated it again, to play nice on almost any page (via &lifilter=true url) and in any skin (in theory). Same link. Splarka 10:51, 24 February 2008 (UTC)[reply]

Typo and suggestion

Hello!

I've noticed there is a typo at this line:

if(wgAction == 'history' || wgCanonicalSpecialPageName == 'Search' || wgCanonicalSpecialPageName == 'Log'
|| wgCanonicalSpecialPageName == 'CheckUser' || wgCanonicalSpecialPageName == 'LinkSearch'
|| wgCanonicalSpecialPageName == 'Contributions' || wgCanonicalSpecialPageName == 'IPBlockList' || queryString('lifilter'))
addOnloadHook(filterLiButton)

When we go to Special:IPBlockList, the variable wgCanonicalSpecialPageName has the value "Ipblocklist", with 'pb' instead of 'PB'.

Could you correct this? Helder 17:48, 29 October 2009 (UTC)

By the way, is it possible to "submit" the filter when the user press ENTER? Currently it is needed to click at the "Filter" button... I think this could be useful. Helder 17:48, 29 October 2009 (UTC)
By the way (2), I've made a translation of the messages to Portuguese, if you want to add it here... ;) Helder 17:56, 29 October 2009 (UTC)
✓ Done, first request done, for the other ones someone with more JavaScript knowledge is necessary. --The Evil IP address (talk) 22:17, 30 October 2009 (UTC)[reply]
Would it be possible to have the script filtering after the user press ENTER? Helder 21:06, 19 May 2010 (UTC)
✓ Done. Don't forget to reload your browser's cache. Lupo 07:12, 20 May 2010 (UTC)[reply]

Localization

Hi!

Could anyone please make the script localizable?

We already have the Portuguese translation ('pt' and 'pt-br') which could be incorpored in commons version too. Helder 20:22, 27 December 2010 (UTC)

By the way, in the translated version, the line became too long horizontally:

Could someone add a linebreak in the text of variable "instructions"?
Another option would be to move the text of that variable to the caption:
$legend.text('Filter <li> list: ' + instructions );
Helder 20:42, 27 December 2010 (UTC)

Missing parenthesis

{{editprotected}}

Hi!

It seems to be missing some parenthesis around this code:

	if (wgAction == 'history' || wgCanonicalSpecialPageName && wgCanonicalSpecialPageName.match(/^(Activeusers|CheckUser|Contributions|Ipblocklist|LinkSearch|Log|Search|(Uncategoriz|Unus|Want)ed(categori|templat)es|Wantedfiles|(Short|Long|Ancient|Uncategorized|Unwatched|Wanted|Protected|Deadend|Lonely|New)pages|Fewestrevisions|Withoutinterwiki|(Double|Broken)Redirects|Protectedtitles|CrossNamespaceLinks|Recentchanges|Categories|Disambiguations|Listredirects|GlobalUsers|GlobalBlockList|Listusers|Watchlist|Most(linked|revisions|categories)|Nuke|Whatlinkshere)$/i) || getParamValue('lifilter')) {

It should be

	if (wgAction == 'history' || (wgCanonicalSpecialPageName && wgCanonicalSpecialPageName.match(/^(Activeusers|CheckUser|Contributions|Ipblocklist|LinkSearch|Log|Search|(Uncategoriz|Unus|Want)ed(categori|templat)es|Wantedfiles|(Short|Long|Ancient|Uncategorized|Unwatched|Wanted|Protected|Deadend|Lonely|New)pages|Fewestrevisions|Withoutinterwiki|(Double|Broken)Redirects|Protectedtitles|CrossNamespaceLinks|Recentchanges|Categories|Disambiguations|Listredirects|GlobalUsers|GlobalBlockList|Listusers|Watchlist|Most(linked|revisions|categories)|Nuke|Whatlinkshere)$/i)) || getParamValue('lifilter')) {

Could someone add them, please? Helder 14:00, 9 January 2011 (UTC)

✓ Done http://commons.wikimedia.org/wiki/?diff=53522120Krinkletalk 20:10, 23 April 2011 (UTC)[reply]

JS Errors

{{editprotected|technical=yes}} The script is generating the error

trailing \ in regular expression
http://commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-rightsfilter.js&action=raw&ctype=text/javascript&283-19
Line 85

when I start to fill in the form with the regex "\d", because it try to use "\" as a regex.

I think if the code of filterLi() or

$('#rightsFilter input').bind('keyup change', function () {
	filterLists.filterLi();
});

validated the input to see if it is a valid regular expression this error wouldn't happen.

Could someone fix it? Helder 14:35, 9 January 2011 (UTC)

Backward compatibilities

{{editprotected|technical=yes}} Hi!

I would like to know if it is really wanted that this edit breaks old links in which there was no 'lifilter' parameter needed to activate the form when clicking in the links. For example:

Could it check for the presence of any of the accepted parameters to decide if the form should be shown (instead of checking by &lifilter=1)? Helder 15:04, 9 January 2011 (UTC)

 Not done This has been open for 6 months - let's admit it isn't going to be fulfilled. I suggest following it up by posting at COM:VP or approaching a user directly who might be able to help. Rd232 (talk) 10:55, 20 July 2011 (UTC)[reply]

Links to filtered lists

Hi!

Could some admin replicate this update to the original script? It adds a link which the user can use to get a url to the filtered list, making it easier to share specific sublists of logs and other pages. Helder 21:07, 16 May 2011 (UTC)

Update

It is requested that an edit or modification be made to this protected page.
Administrators: Please apply <nowiki> or {{Tl}} to the tag after the request is fulfilled.

He7d3r

Hello! Could someone apply these changes to the script? The new version includes fixes to the problems mentioned in the sections above (i18n, bug fixes, backward compatibility, button to get links to filtered lists ). Feel free to add other translations as well. Helder 04:15, 13 August 2011 (UTC)