RecentChangesMultiple

RecentChangesMultiple is designed for monitoring multiple wikis at once, giving one central location to view all the edits. While this script is designed to emulate standard Wikia RecentChanges as close as possible, there are many subtle differences (see Notes below).

This tool is designed primarily with Wikia wikis in mind, but should work for many wikis by default, and has some settings to handle special cases for certain non-wikia wikis (such as "&scriptdir=" below). When adding non-wikia wikis, it's important to note that this script is designed for MediaWiki wikis, and requires the Mediawiki Api to be enabled on a wiki to run.


 * Example Page

Translations / bugs can be posted on the talk page (but also make sure to message me so I don't miss it).

This script can be found on Github, along with a changelog as of V1.2.0.

Basic Usage
All that's truly need after the script is installed is a div with the "rc-content-multiple"  and a bullet list with the link of the wiki's domain (the div will need to be added via source mode). Duplicate entries are ignored. Example: Do not include  before the url.
 * runescape.wikia.com
 * wowwiki.com
 * dev.wikia.com

Basic Features
While not part of Special:RecentChanges, these are some additional default features included by default.
 * AjaxRC: Inspired by AjaxRC, an "auto-refresh" option is available, that when ticked will cause the list to be refreshed every 60 seconds. A cookie is used to store the setting of the checkbox once clicked.
 * Upon activating, you'll be prompted to activate HTML5 notifications (optional), which will inform you of updates when you navigate away from the window/tab. To disable them after enabling them, click the gear icon on a notification.
 * [[File:RecentChangesMultiple AjaxDiff icon.png]] AjaxDiff: Inspired by AjaxDiff / LastEdited, you can view the "diff" of a change without changing pages, by hitting the icon to the right of the "diff"/"prev"/"changes" link.
 * [[File:RecentChangesMultiple AjaxGallery icon.png]] AjaxGallery: By clicking the photo icon next to files changes (be it upload log, file page edit), you can preview the image it's related to. For grouped upload logs, you may preview a gallery of all images in the list.
 * [[File:RecentChangesMultiple AjaxPagePreview icon.png]] AjaxPagePreview: Allows you to view the page without leaving your current page.
 *  Note : This feature is fairly unpolished. Multiple CSS and JS files are not run on the preview. Thus the preview only uses the CSS from the current wiki to display pages. On browsers that support editing the shadow dom (Chrome as of writing this) or scoped styles (Firefox) some custom css from the wiki is applied (common.css it seems) as well as some JS is applied (for shadow dom), though still not all. It's still good for viewing comments/walls/board message in most cases, but for article viewing keep in mind it may appear much different.
 * Wiki Link Panel: To help facilitate navigation onto a specific wiki on a list, clicking one of the favicons in the "wikis loaded" section at the top of the script/along the left side of the script will give you a list of links to some common pages for that specific wiki, as well as some statistics for that wiki. If only the instance only has one wiki, this panel will open by default.
 * Multiple instances: Multiple "containers" may be run on the same page (such as in tabbers).
 * Since each container can also display just a single wiki, this would also allow having a tabbed version of "normal" RecentChanges pages for various wikis on one page. It's also possible to refresh them all using the  feature.
 * Keep in mind however that some of the additional parameters below are only checked on the first instance and effect all those on the page (data-lang, data-hiderail, data-loaddelay).

Additional Parameters
While the above works and that's all that may be needed, there are also many other additional parameters that can be added, in 3 ways: 1 that effects every RCM, 1 that effects every wiki on a specific RCM list, and one that effects a specific wiki.

URL variables
This effects every RCM on the page. Currently the only url variables accepted are those used by a standard RecentChanges page. See more at RC Params below.

ex:

Dataset
These effect every wiki / the script as a whole for a single instance.

Show/Hide Advanced options (not necessary for most people)

datasets go directly inside the div, like so:  *list of wikis
 * Example

On List Items
Every item on the list must start with the wiki's base url, in the format "name.wikia.com" (or lang.name.wikia.com, or "wikiname.com" (or other top level domain) if the wiki doesn't have "wikia" in it). Do not include "http://", and anything after or including the first "/" at the root.

These allow you to customize a specific wiki's results, instead of requiring every wiki listed to use the same options.

Each list item may have parameters added after it in the format "&paramname=" to add additional functionality for how that wiki is displayed / loaded.

*fewfre.wikia.com &hideusers=Fewfre,FewBot *wiki.guildwars2.com &favicon=wiki.guildwars2.com/images/thumb/d/df/GW2Logo_new.png/180px-GW2Logo_new.png *pixelmonmod.com &scriptdir=wiki &params=hidemyself:1,limit:5
 * Examples

Options Panel
Offers a way to tweak "data-params=" options in real-time. The options panel does have a setting to remember the options you changed via localStorage (off by default). Any options changed before turning this feature on will also be remembered. Clicking this off again will remove the info from storage. One of the above methods should be used if you want the change to persist on a different computer / without using localStorage.

RC Params
To help emulate Special:RecentChanges as much as possible, this script accepts RC-style url params (used as explained above with "data-params", "&params", URL variables, or the options panel). There are multiple params, as explained below. Please not that these effect each wiki individually (so a limit of 50 for 4 wikis is actually a limit of 200 total).

There are 4 ways to specify params in the script. If more than one is specified, they will "fall through", with the more specific one overwriting the less specific one (ex: "&params" is more specific than "data-params"), but only if they both change the same thing (such as "days"). The order of specificity is as such:
 * 1) [Default values]
 * 2) URL variables – same as a normal RecentChanges page.
 * 3) data-params
 * 4) Options panel (run-time options)
 * 5) &params (note that the "options panel" will not overwrite these)

Note that for "true/false" boolean switches, "0" is false, and "1" is true.

Extra Features
Refresh All
 * If using multiple instances on the same page, they can all be refreshed at once by giving the "rcm-refresh-all" class to an element on the page. ex:

Translation
This script is translated in two separate ways: The js file for translations can be found on Github, and translations may be posted on the talk page or here. Only translate the first "TEXT" section, not "MESSAGES".
 * 1) Script Text ("TEXT" in code) – normal translation stuff like any other script that needs to be updated by hand.
 * 2) RecentChanges Text ("MESSAGES" in code) – this is done automatically, by loading the text normally found in Special:RecentChanges from the server. Any language normally supported by Wikia should be supported by this script for this type of translation.

Changelog
See the changelog for detailed changes, or the history pages for each script (/code.js for V1.0.3 and prior, /code.2.js for V1.1.7 and prior, and /core.js for current).
 * 14 February 2015 – Alpha finished (followed by break).
 * 22-27 May 2015 – Beta finished.
 * 28 June 2015 – Script published.
 * V1.1.0 – 26 July 2015 – Rewrite to use MediaWiki API (see below).
 * V1.2.0 – 12 December 2015 – Script now uses a loader to load in script.

26 July 2015 – MediaWiki API rewrite – V1.1.0
Show Details The main purposes of this rewrite were to:


 * 1) Add automatic translation support for RecentChanges text.
 * 2) Remove YQL dependency (info taken directly from wiki via API). Also results in faster loading.
 * 3) Using API support, add more Special:RecentChanges support (minor edits marked, more control on content ("days", "limit", "showbots", etc.)).
 * 4) Rewrite code to be a bit more efficient.


 * Important notes:
 * "&subdir" removed, and "&scriptdir" added (may be necessary for non-wikia wikis, see above). ex:
 * "data-params" now offers much more support. "days" and "limit" now work up to same amount as normal for each wiki on the list. As such this should be limited to a few days / a lower limit to avoid loading potentially thousands of changes. Individual wikis can have these limits modified using "&params"


 * Changes:
 * Changed translating to use the exact i18n info from Wikia's github for RC_TEXT. Loads RC_TEXT from the server based on your language.
 * Boards/walls now also check for [ restore, delete, remove ] for "replies" instead of assuming it's the actual thread.
 * All (normal) RecentChanges params supported, except " hideenhanced ", "from", and viewing a select namespace.
 * Bot edits can now be shown (off by default), and "minor" edits are now marked.
 * gApp instance turned into the RecentChangesMultiple class (to potentially run multiple for whatever reason, plus I prefer "traditional" OO class structures)
 * As such, #rc-content-multiple id should now be a .rc-content-multiple class to allow for multiple instances (although using ids is still supported)
 * Additional Special:RecentChanges CSS classes used.
 * Rewrote RC / RCList objects (to bring a little more inline with how it's structure in mw system)
 * New "WikiData" class for storing wiki-specific data in a more understandable way, while also providing helper methods

Other

 * "http://" shouldn't be used in this script to avoid it automatically becoming a link (makes it annoying to deal with), and shows up on Special:LinkSearch as a page with an external link (may be undesirable).
 * Designed for Wikia wikis, but should work for any wiki (assuming it's not too out-of-date).
 * Some non-Wikia wikis simply do not seem to work, due to how they are setup (MediaWiki version is to old, API disabled, etc.).
 * The script should be run using code.2.js. Although no longer supported, the original atom-feed version can be found at code.js, with documentation for it found here.

Requirements

 * Jquery
 * All wikis in the script must:
 * Be Mediawiki wikis (Version 1.16+)
 * Have the Mediawiki Api available.
 * Browser that supports various aspects of ECMAScript5 (any up-to-date browser will basically be fine).
 * The script has to run on a Wikia wiki (to make sure it have access to things like the code for collapsing lists).