User talk:V111P/js/What Links Here link filter

Testing
Well, it works! I had to figure out what the templates were actually called, but once I did that, it went from 2008 links to 900. (I forgot to set it to article space only.) So less than half. Still a lot of links to wade through, but more accessible than going through pages and pages of cities in Texas! I'll try it on some place in California next.

Thanks for the pointer to F12 for the console--I never knew that was there! How would I access the log if I wanted to send it to you? (This is Firefox 28, on Windows XP.) There were a bunch of errors from loading the page; would those be germane?

Thank you for this! It's like magic. :-) - Gorthian (talk) 07:20, 23 April 2014 (UTC)


 * You are welcome. :) No, these errors have nothing to do with my script. As long as it's working there's no need to send logs. Ideally I would print the info somewhere on the page, instead of in the console - I should change the script later to do that. --V111P (talk) 11:03, 23 April 2014 (UTC)

Bug report!
Hello there ! Your script interested me because I'm in the process of creating a new WLH userscript that will allow users to filter and sort the results delivered by WLH. In the process of trying out your testcase, I discovered what seems to be a bug. The terminating error I get in the console is  and when I click on it to see where it is, I get: The only reference I see to what log may be defined as anywhere else in the script is: I'd just dump line 9 and replace all instances of log with console.log; I also wouldn't concatenate the pieces of the output together, I'd use the formatted method.

Anyways, happy scripting! — &#123;&#123;U&#124;Technical 13&#125;&#125; (e • t • c) 21:33, 30 November 2014 (UTC)


 * Thank you, Technical 13. I probably didn't test that script in all browsers as I should have. I still want to check for the console because otherwise you get an error in some browsers without a console or if the console is not opened (IE I think did that). --V111P (talk) 07:50, 1 December 2014 (UTC)

Transclusion
Hello. Is template calling transclusion? If yes, then It does not work. If not, can it be implemented? (hiding pages that use certain templates) Thanks.--Dixtosa (talk) 20:54, 19 March 2015 (UTC)
 * Hi, Dixtosa. Thanks for reporting this, but please give an example so I can verify it and try to understand what the problem is. --V111P (talk) 01:13, 21 March 2015 (UTC)
 * Is it possible to exclude pages calling (thus, using curly braces rather than square brackets) some specific templates?--Dixtosa (talk) 19:05, 22 March 2015 (UTC)
 * Yes, that's what transclusion is. I don't know if it will work if Lua is used to create the links in the template. But the example given in the instructions with Wichita Falls, Texas and Template:Texas|Template:Texas_counties works when I test it. --V111P (talk) 00:08, 23 March 2015 (UTC)
 * Doh, I found out what caused the confusion: I thought this worked for every template but it only works for -type of templates because they link to themselves (the links V·T·E in the upper-left corner). Still useful script.--Dixtosa (talk) 16:28, 23 March 2015 (UTC)
 * I corrected the documentation with your explanation. Hiding all pages that use a given template can also easily be implemented. Can you explain in what cases would that be useful? --V111P (talk) 04:56, 25 March 2015 (UTC)
 * I can foresee its usage in English Wiktionary (where I work), but it is not vital (if it gets so important we can always change the template temporarily so that it links to itself) and, thus, it is a matter of how difficult it is to implement it. Can you hint me? I myself create user scripts too, so I can help. --Dixtosa (talk) 19:02, 25 March 2015 (UTC)
 * It can be done with this: . You can test this script: User:V111P/js/wlhFilters.js. But this isn't a very efficient way of doing it — to get all pages where a template is embedded in (could be many thousands of pages, and you can only get 500 at a time (but the limit is 5000 for a bot)) and see if any of these pages is in your list and remove it if it is. The difference with the navigation templates is that they are not used on that many pages as some other templates are. --V111P (talk) 13:09, 26 March 2015 (UTC)