User talk:Yair rand/interwikiwatchlist.js


 * Note. For more info see Integrated, interwiki, global watchlists.
 * See a variation of this tool here: User:Yair rand/interwikiwatchlist2.js


 * Note. To enable, add
 * ''to Special:MyPage/common.js. Then follow the instructions for purging your browser cache. You should now see an "Import watchlist" link in the top-right corner of Special:Watchlist. Click it. Choose a project from the dropdown menu. Enter a language code ("en" for English). A language code is not needed for the Commons, Meta-Wiki, or MediaWiki. Then click the Special:Preferences link in the sentence below the project dropdown menu. That link will go to the Special:Preferences page of the project you selected in the previous step. Go to the watchlist tab, and copy the watchlist token. Then paste the token in the form on Special:Watchlist to the left of the "Import watchlist" button. Then click that "Import watchlist" button to the right of the form. You will then see the added watchlist above the Wikipedia watchlist. The added watchlist can be expanded, collaped, or removed. If removed, you can add it back by repeating the above steps. You can add multiple watchlists by repeating the above steps.
 * ''to Special:MyPage/common.js. Then follow the instructions for purging your browser cache. You should now see an "Import watchlist" link in the top-right corner of Special:Watchlist. Click it. Choose a project from the dropdown menu. Enter a language code ("en" for English). A language code is not needed for the Commons, Meta-Wiki, or MediaWiki. Then click the Special:Preferences link in the sentence below the project dropdown menu. That link will go to the Special:Preferences page of the project you selected in the previous step. Go to the watchlist tab, and copy the watchlist token. Then paste the token in the form on Special:Watchlist to the left of the "Import watchlist" button. Then click that "Import watchlist" button to the right of the form. You will then see the added watchlist above the Wikipedia watchlist. The added watchlist can be expanded, collaped, or removed. If removed, you can add it back by repeating the above steps. You can add multiple watchlists by repeating the above steps.

Testing
How can I test this? What page do I copy this too?
 * User:Timeshifter/monobook.js ?
 * User:Timeshifter/vector.js ? --Timeshifter (talk) 11:35, 18 May 2011 (UTC)
 * You don't need to copy the whole script, just add importScript("User:Yair rand/interwikiwatchlist.js");. /monobook.js works if you use monobook skin, /vector.js works if you use vector, /common.js works whichever skin you use. --Yair rand (talk) 12:05, 22 May 2011 (UTC)
 * Thanks. How does it work after one gets to the "Import watchlist" page? I added the import script to User:Timeshifter/common.js. I see this: "Watchlist token (can be found be found at Special:Preferences in the Watchlist section)." What do I put in the form? --Timeshifter (talk) 19:00, 23 May 2011 (UTC)
 * You put in your account's watchlist token, which you can find in the Special:Preferences page of the wiki you're importing from, in the Watchlist section, in the middle of the "Advanced options" area, right next to where it says "Watchlist token:". --Yair rand (talk) 20:20, 23 May 2011 (UTC)
 * This is nothing short of great! I got it to work for adding the Commons watchlist to the top of the Wikipedia watchlist. The collapse and expand buttons make this combined watchlist very convenient to use. The Commons watchlist only covers about 24 hours though. Is there a way to select the time period that the added watchlists cover?


 * I couldn't get it to also add the Wiktionary watchlist. There was no token. Here is what was there:


 * "Watchlist token: BLANK . Filling in this field with a secret key will generate an RSS feed for your watchlist. Anyone who knows the key in this field will be able to read your watchlist, so choose a secure value. Here's a randomly-generated value you can use: NUMBER."


 * That number did not work for adding the Wiktionary watchlist. This is what was added:


 * http://en.wiktionary.org/ watchlist [Remove] [Collapse ▲]


 * But there was nothing listed. I edited a talk page at Wiktionary on May 23. --Timeshifter (talk) 14:51, 25 May 2011 (UTC)


 * What is wikt:User:Yair rand/superwatchlist.js? --Timeshifter (talk) 19:00, 23 May 2011 (UTC)
 * That's just the page where I originally wrote the script. --Yair rand (talk) 20:20, 23 May 2011 (UTC)

Comments at top of JS page
Concerning the comments at the top of User:Yair rand/interwikiwatchlist.js

For easier reading, less scrolling, and more info could this:

// newNode from wikt:Mediawiki:Common.js, JsMwApi from wikt:WT:EDIT, interwiki watchlist from wikt:User:Yair rand/superwatchlist.js // To enable, add importScript("User:Yair rand/interwikiwatchlist.js"); to Special:MyPage/common.js. You should see a "Import watchlist" button in the top-right corner of Special:Watchlist.

be changed to this:

// newNode from wikt:Mediawiki:Common.js, JsMwApi from wikt:WT:EDIT, // interwiki watchlist from wikt:User:Yair rand/superwatchlist.js. To enable, add // importScript ("User:Yair rand/interwikiwatchlist.js"); // to Special:MyPage/common.js. You should see an "Import watchlist" button // in the top-right corner of Special:Watchlist. For more info see the notes at the // top of http://en.wikipedia.org/wiki/User_talk:Yair_rand/interwikiwatchlist.js --Timeshifter (talk) 20:33, 24 June 2011 (UTC)


 * Thanks Yair rand for adding that. --Timeshifter (talk) 03:47, 2 July 2011 (UTC)

Implementation via my preferences
Could this be implemented via preferences? If you need help, maybe some other developers could work on it too. Or maybe you could get paid. :) --Timeshifter (talk) 03:49, 2 July 2011 (UTC)
 * Gadgets can be added to Special:Preferences pretty easily, by modifying Mediawiki:Gadgets-definition. New enwp gadgets can be proposed at Gadget/proposals. This script in its current is way too buggy to be made into a gadget, though. I haven't really been working on it as I've been hoping that User:UncleDouggie could merge the script into his smart watchlist script, and then improved from there, but he hasn't been around since April... --Yair rand (talk) 13:59, 3 July 2011 (UTC)
 * I asked at Gadget/proposals and also at User talk:UncleDouggie/smart watchlist.js --Timeshifter (talk) 06:59, 4 July 2011 (UTC)

Re-using by being wiki and language independant
Hi,

There's a few things in this script making it hard to use on other wikis. Consider reviewing the script and watching for anything specific to English and/or en.wikipedia.org

for example: is better written as:

that way it'll work on non-English wikis as well. Krinkle (talk) 22:06, 11 July 2011 (UTC)

Problems and solutions in adding Commons watchlist to Wikipedia watchlist
I noticed today that my Commons watchlist is no longer added to the top of my Wikipedia watchlist. I entered the Commons watchlist token again, and also did the Firefox purges listed here: http://en.wikipedia.org/wiki/User:Timeshifter/common.js --Timeshifter (talk) 15:10, 12 July 2011 (UTC)


 * I got it to work today. I clicked the "remove" link of the incorrect stuff at the top of my Wikipedia watchlist. Then I redid the integrated watchlist installation according to the note at the top of this talk page. This time it worked. --Timeshifter (talk) 23:58, 19 July 2011 (UTC)

Adding a new site
Can someone explain why this didn't work? Bob the WikipediaN (talk • contribs) 21:22, 9 October 2011 (UTC)
 * Probably has something to do with the single = in qw.value=10. --Yair rand (talk) 11:58, 25 October 2011 (UTC)

Can't see the "import..."
Hello, I did what you wrote. I added the code on this page. However even after clearing the cache, on the Special:Watchlist page nowthing changed in the top right corner. Nothing similar to "import...". What else can I do? -- ★ Pikks ★  MsG  12:18, 24 November 2011 (UTC)
 * Hm, I guess the instructions weren't clear enough. You were supposed to add just 'importScript ("User:Yair rand/interwikiwatchlist.js");'. You added 'add importScript ("User:Yair rand/interwikiwatchlist.js");'. --Yair rand (talk) 17:44, 24 November 2011 (UTC)
 * Thank you! It works now :) -- ★ Pikks ★  MsG  18:46, 24 November 2011 (UTC)

Show one's own edits on added watchlists
This is not a big deal, but currently the add-on watchlists only show edits by others. An option to also show one's own edits would be nice. --Timeshifter (talk) 06:33, 27 January 2012 (UTC)
 * Whether it shows one's own edits on imported watchlists is now dependent on one's user preferences. --Yair rand (talk) 00:24, 30 January 2012 (UTC)
 * Thanks! I tested it after editing my Commons user pages, and those edits showed up on the interwiki watchlist. --Timeshifter (talk) 06:42, 30 January 2012 (UTC)

Show more than 10 edits
It would be nice if the add-on watchlists showed 2 or 3 days of entries for the Commons watchlist (or other watchlists) added above the Wikipedia watchlist. 3 days would be perfect for me.

Currently the add-on watchlists sometimes only show part of one day of the added watchlists. They show the entries for today's date. So if one is only a few hours into today one only sees watchlist entries for those few hours. It does not show the last 24 hours. --Timeshifter (talk) 06:32, 27 January 2012 (UTC)


 * I am not sure now about why the added Commons watchlist does not show many entries. Maybe it is set to only show a certain number of entries. It looks like around 10 entries is the max. --Timeshifter (talk) 08:38, 1 February 2012 (UTC)


 * After using this for awhile I see that it is set to show the last 10 edits. But it does not give the date of the edits. It only gives the time of the edits. This is very confusing since it is different from the normal watchlists which also show the date. So multiple dates are shown on the added watchlist, but since those dates are not shown one may not realize that more than one day can be shown on the added watchlist. It took me a long time to figure this out. But since I slowed down editing on the Commons it became clear.


 * A watchlist with added dates is more useful. One needs to know how current an edit is, especially on talk pages, for example. I suggest showing the dates, too, if possible. But much more importantly, please show at least 20 edits. More would be better. Or maybe tell me where to change the number in the JS. This tool has such potential, and every improvement makes it much more useful. --Timeshifter (talk) 18:02, 24 February 2012 (UTC)

Make background color different for added watchlists
I suggest making the background color light yellow, light green, or some other pastel color. I am talking about the background color for the the added watchlists.

This way there is no confusion. It also would allow you to add dates and more entries (see previous section). --Timeshifter (talk) 05:57, 1 April 2012 (UTC)

Table of contents
You might add a table of contents. That way one could click on the watchlist of interest and go right down to it. --Timeshifter (talk) 05:57, 1 April 2012 (UTC)

No-cookie version?
I have my Firefox browser set to delete all cookies on closing. Is it possible to set up a version of this that does not depend on cookies? Maybe a gadget in preferences?

Ever since setting up Firefox to remember my passwords in its encrypted file I have found no need to keep cookies after I shut down Firefox or my computer. --Timeshifter (talk) 05:46, 25 July 2012 (UTC)
 * The watchlist keys and settings are stored in localstorage, which I guess counts as cookies as far as that Firefox setting is concerned. The settings have to be stored somewhere that's accessible, and there isn't any way to store it on the Wikimedia servers as far as I know, so the only place to save it is on the user's computer, in either the localstorage or in cookies. Maybe one day the devs will add a way for scripts to store preferences data on the servers (which would be really useful for a lot of things), but for the time being I don't think this can be fixed. Sorry. --Yair rand (talk) 05:59, 25 July 2012 (UTC)


 * On the Commons there are many gadgets in preferences. Some of then are checked by default. I enabled others. See:
 * commons:Special:Preferences
 * Special:Preferences


 * They all work after I close Firefox and come back later or the next day. At least all the ones I just checked.


 * Maybe the choices for interwiki watchlist need to be in the preferences list itself. One possibility would be a choice for the current-language wikipedia plus the Commons. I think that would be one combination that many people would want. --Timeshifter (talk) 11:47, 25 July 2012 (UTC)
 * The settings from Special:Preferences are stored on the Wikimedia servers, not on your computer (which allows them to also work when you log in from a separate computer). --Yair rand (talk) 08:03, 26 July 2012 (UTC)

Watchlist tab of my preferences
Special:Preferences. This might be a good place to put all the options and choices for the interwiki watchlist. --Timeshifter (talk) 07:44, 26 July 2012 (UTC)
 * There seems to be some rule against any user-made scripts running inside the Special:Preferences page, so modifying those forms directly through a script isn't an option. Anyway, there wouldn't be a way to store the data through that, because Mediawiki doesn't have any custom storage system. The only part that can be modified (and is built to be modified) is the gadgets section, and that's simple on/off scripts and stylesheets. Re having a version for just Commons: It still needs the user's watchlist keys (referred to as "Watchlist token" by the system) available somewhere. Without the keys, there's no way of accessing the watchlist content from another wiki.
 * Coding something like this directly into Mediawiki or as an extension would offer far more options for things like this, without all these limitations and such. Unfortunately, I don't know PHP, so I'm personally unable to do either. The WMF seems to be working on something which might fix the whole problem with split watchlists: See Echo (Notifications). (It's possible that I'm misunderstanding what that's about, though...) --Yair rand (talk) 08:03, 26 July 2012 (UTC)
 * That's too bad that it depends on storage of watchlist tokens. Echo (Notifications) sounds like a good thing though. Looks massive. We may wait 10 years. :)


 * It probably needs more money to be spent on developers. It seems all kinds of money from the WMF is wasted on peripheral stuff instead of being used where it is needed most, which is technical staff.


 * When some money is spend on technical things it often is directed mostly from the top down. After the disaster (in my opinion) of LiquidThreads I have little faith in needed core changes happening much. LiquidThreads seemed to have been designed from the top down, with much input from Wikipedia users ignored.


 * I don't see why watchlist tokens are needed at all. I would think the MediaWiki software could be changed to use unified login as the basis somehow. But then I have noticed that when I close Firefox (thus deleting all cookies) and then launch Firefox again I have to individually log in to Wikipedia and the Commons. So unified login must not be unified cookies. Maybe that is what you can push for: Unifying the cookies and thus maybe not needing multiple watchlist tokens.


 * Maybe that depends on having one domain name for all Wikimedia projects. Instead of having wikipedia.org and wikimedia.org. I don't know. I am just guessing. I have my Firefox options set to only use first-party cookies. No third-party cookies allowed. --Timeshifter (talk) 10:30, 27 July 2012 (UTC)


 * Update: In January the Options API was extended to allow user scripts to store data on the servers, which means that a non-localstorage/cookie -dependent version is now possible. One issue with switching over to that is that anyone currently using this script will have their interwiki watchlist settings wiped, unfortunately. --Yair rand (talk) 09:54, 28 May 2013 (UTC)
 * That is good that a non-local-storage/cookie-dependent version is now possible. --Timeshifter (talk) 11:53, 28 May 2013 (UTC)

usage on other wikis?
Am I doing something wrong when trying to use this script on es.wiki? Because it works for me on en.wiki, but not on es.wiki. I tried just importing this script as is, and then putting the "w:" in front, and neither worked. -- Irn (talk) 15:04, 23 April 2014 (UTC)
 * To import the script from another wiki, you need to use  instead of the normal  . --Yair rand (talk) 01:03, 24 April 2014 (UTC)

Hide Bot Edits?
So I use this script to see my Commons watchlist when I login here, and it works great. Only for the last few months, it seems that "YaCBot" and other bots have been busily fixing headings on image file pages... for every image on the Commons. As such, any edits I actually care about are buried under these "internationalization" edits. Is there a way in my code that I can tell it to hide these edits, as I do with the watchlist here?-- Patrick, o Ѻ ∞ 15:27, 23 April 2014 (UTC)

No longer working?
Did this stop working? I have five other watchlists that I had imported, and for quite some time now, only Metawiki shows any changes. Do I need to change something or is it broken? -- Irn (talk) 19:24, 9 May 2015 (UTC)
 * It broke due to some minor API change that's going on. Should be fixed now. --Yair rand (talk) 14:01, 10 May 2015 (UTC)
 * Yes, it's working now! Thanks! -- Irn (talk) 15:14, 10 May 2015 (UTC)

I was excited to find this script, a script that would serve anyone working cross-wiki well, but I am unable to get it to work.

To make sure interwikiwatchlist.js was not "disturbed" by any other scripts I tried running it as my sole script in my common.js and I blanked my global.js on meta. I can import a watchlist just fine, but nothing shows up here.

I tried installing the script on nl.w to import my watchlist from here. Still nothing shows up. The problem does not seem to be browser or skin related, I have tried with both Chrome and Firefox.

Does it still work for the rest of you? . -Sam Sailor Talk! 00:01, 12 December 2015 (UTC)

Follow-up: I installed User:Yair rand/interwikiwatchlist2.js, and that is working. Thank you very much, Yair rand! Best, Sam Sailor Talk! 02:18, 12 December 2015 (UTC)
 * Likewise I have interwikiwatchlist2 turned on, and it works well.-- Patrick, o Ѻ ∞ 03:42, 12 December 2015 (UTC)
 * I haven't been using either one in awhile. So I don't know. I will have to try it again. The instructions at the top of this talk page and the other talk page may need to be updated by someone other than me. I haven't been keeping up with things. --Timeshifter (talk) 16:21, 12 December 2015 (UTC)

Request?
The script is still working for me, and I use it every day, so thank you so much. I was just wondering if it would be possible to add Wikivoyage to the list of projects? Cheers, -- Irn (talk) 11:19, 17 March 2016 (UTC)
 * Done. --Yair rand (talk) 11:57, 17 March 2016 (UTC)
 * Thanks! -- Irn (talk) 12:03, 17 March 2016 (UTC)

Does anyone know if this script still works?
have tried several times but it wont start, any help is appreciated, thanks--Ozzie10aaaa (talk) 09:27, 28 March 2018 (UTC)
 * I installed it years ago on a couple of projects, and what I installed then and the watchlists I selected then are still working just fine, but when I try to install it now on other projects or add watchlists from additional projects to the ones that I currently have, it doesn't work. This has been the case for at least two years now, but since it's been working well enough and no one else seemed to care/notice, I didn't want to keep pestering Yair rand. Cheers, -- irn (talk) 12:40, 28 March 2018 (UTC)
 * thanks for your reply, I think this is a very useful/important addon for the watchlist, I hope he answers aswell(Id be able to watch at least 11 more pages, and that is very important) thanks--Ozzie10aaaa (talk) 13:50, 28 March 2018 (UTC)