Fandom Developers Wiki
Register
(missing letter not -> note)
(No longer as important, so moving section down.)
(15 intermediate revisions by 7 users not shown)
Line 5: Line 5:
 
| Description = Provides a RecentChanges view of multiple wikis at once
 
| Description = Provides a RecentChanges view of multiple wikis at once
 
| Scope = ps
 
| Scope = ps
| Updated = 25 August 2018 (V2.11)
+
| Updated = 8 October 2019 (V2.12b)
 
| Author = [[User:Fewfre|Fewfre]]
 
| Author = [[User:Fewfre|Fewfre]]
 
| Code = [[MediaWiki:RecentChangesMultiple/code.2.js|code.2.js]]<br />[[MediaWiki:RecentChangesMultiple/core.js|core.js]]<br />[[MediaWiki:RecentChangesMultiple.css|css]]
 
| Code = [[MediaWiki:RecentChangesMultiple/code.2.js|code.2.js]]<br />[[MediaWiki:RecentChangesMultiple/core.js|core.js]]<br />[[MediaWiki:RecentChangesMultiple.css|css]]
| Languages = ([[#Translation|see below for details]])<br />{{l|collapse=yes|en|be|ca|de|es|gl|it|ja|nl|oc|pl|pt|pt-br|ro|ru|uk|val|vi|zh|zh-hant}}<br />
+
| Languages = ([[#Translation|see below for details]])<br />{{l|collapse=yes|en|be|ca|de|es|gl|it|ja|nl|oc|pl|pt|pt-br|ro|ru|tr|uk|val|vi|zh|zh-hant}}<br />
 
'''All Others''': [[#Translation|Partial]]
 
'''All Others''': [[#Translation|Partial]]
  +
| Type = user
 
}}
 
}}
 
'''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 RecentChanges as close as possible, there are many subtle differences (see [[#Notes|Notes]] below).
 
'''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 RecentChanges as close as possible, there are many subtle differences (see [[#Notes|Notes]] below).
   
This tool is designed primarily with '''FANDOM''' wikis in mind, but should work for many wikis by default, and has some settings to handle special cases for certain non-FANDOM wikis (such as "&scriptdir=" below). When adding non-FANDOM wikis, it's important to note that this script is designed for MediaWiki wikis, and requires the [[mw:API:Main page|Mediawiki Api]] to be enabled on a wiki to run.
+
This tool is designed primarily with '''Fandom''' wikis in mind, but should work for many wikis by default, and has some settings to handle special cases for certain non-Fandom wikis (such as "[[#scriptdir-row|&scriptdir=]]" below). When adding non-Fandom wikis, it's important to note that this script is designed for MediaWiki wikis, and requires the [[mw:API:Main page|Mediawiki API]] to be enabled on a wiki to run.
   
 
* [[w:c:fewfre:RecentChangesMultipleExample|Example Page]]
 
* [[w:c:fewfre:RecentChangesMultipleExample|Example Page]]
Line 20: Line 21:
   
 
This script can be found [[github:fewfre/RecentChangesMultiple|on Github]], along with a [[github:fewfre/RecentChangesMultiple/blob/master/changelog|changelog]] as of V1.2.0.
 
This script can be found [[github:fewfre/RecentChangesMultiple|on Github]], along with a [[github:fewfre/RecentChangesMultiple/blob/master/changelog|changelog]] as of V1.2.0.
 
== HTTPS ==
 
<span class="error">If this script is run on a wikia with HTTPS enabled, you will not be able to load content from wikis using HTTP.</span> This is a security feature enabled by the browser. Currently this can cause issues even between wikia wikis as non-English wikis currently do not use the HTTPS protocol while English wikis do (if enabled in user settings). This issue can currently be worked around in the following two ways:
 
*Disable HTTPS in user settings
 
*Run this script on a non-English wikia that uses HTTP.
 
Once HTTPS is enabled across all wikia wikis this issue will be fixed for wikia monitoring.
 
 
This issue will still effect some external wikis however that will continue to run on HTTP. For now this can be bypassed like mentioned above, but once HTTPS is enabled on all wikia wikis, these wikis will no longer be able to be loaded until they update to the HTTPS protocol.
 
 
__TOC__
 
   
 
== Install ==
 
== Install ==
Line 39: Line 30:
 
All that's truly need after the script is installed is a div with the "rc-content-multiple" <code>class</code> 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:
 
All that's truly need after the script is installed is a div with the "rc-content-multiple" <code>class</code> 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:
 
<pre><div class="rc-content-multiple">
 
<pre><div class="rc-content-multiple">
*runescape.wikia.com
+
*https://runescape.fandom.com/fr/
*wowwiki.com
+
*wowwiki.fandom.com
*dev.wikia.com
+
*https://dev.fandom.com &bgcolor=green
 
</div></pre>
 
</div></pre>
<span class="error">''Do '''not''' include <code><nowiki>http://</nowiki></code> or <code><nowiki>https://</nowiki></code> before the url.''</span>
 
   
 
== Basic Features ==
 
== Basic Features ==
Line 50: Line 40:
 
** 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.
 
** 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 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 AjaxGallery icon.png]] '''AjaxGallery''': By clicking the photo icon next to files changes (be it upload log or 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.
 
* [[File:RecentChangesMultiple AjaxPagePreview icon.png]] '''AjaxPagePreview''': Allows you to view the page without leaving your current page.
 
** '''<span style="color:red">Note</span>''': 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 the page may appear broken / different than expected.
 
** '''<span style="color:red">Note</span>''': 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 the page may appear broken / different than expected.
Line 59: Line 49:
 
** It is possible to have each instance only load 1 wiki, thus allowing a more typical RecentChanges design while still viewing multiple wikis on 1 page. It's also possible to refresh all instances using the <code>rcm-refresh-all</code> [[#Refresh All|feature]].
 
** It is possible to have each instance only load 1 wiki, thus allowing a more typical RecentChanges design while still viewing multiple wikis on 1 page. It's also possible to refresh all instances using the <code>rcm-refresh-all</code> [[#Refresh All|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, data-timezone).
 
** 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, data-timezone).
  +
 
== HTTPS ==
  +
Since all fandom wikis have HTTPS enabled, you will not be able to load content from wikis without HTTPS.
  +
  +
'''If you are having HTTPS loading issues running the script on a fandom.com wiki, try changing any wikia.com wiki links in your list to fandom.com. All wikia wikis are now converted to fandom, so shouldn't be an issue.'''
  +
  +
This issue will still effect some external wikis however that will continue to run without HTTPS. There is currently no workaround for this issue.
   
 
== Additional Parameters ==
 
== Additional Parameters ==
Line 66: Line 63:
 
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|RC Params below]].
 
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|RC Params below]].
   
ex: <code><nowiki>http://yourwiki.wikia.com/wiki/RecentChangesMultiplePage</nowiki>'''?hidemyself=1&days=7'''</code>
+
ex: <code><nowiki>https://yourwiki.fandom.com/wiki/RecentChangesMultiplePage</nowiki>'''?hidemyself=1&days=7'''</code>
   
 
=== Dataset ===
 
=== Dataset ===
Line 114: Line 111:
 
| style="text-align:center;"|Boolean
 
| style="text-align:center;"|Boolean
 
| style="text-align:center;"|''true''
 
| style="text-align:center;"|''true''
|Lists FANDOM discussions for each wiki. Set to "false" to disable (options panel toggle overrides this). See [[#Discussions|below]] for more info.
+
|Lists Fandom discussions for each wiki. Set to "false" to disable (options panel toggle overrides this). See [[#Discussions|below]] for more info.
 
|}
 
|}
   
Line 177: Line 174:
   
 
=== On List Items ===
 
=== 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.
+
Every item on the list must start with the wiki's base url, in the format "name.fandom.com" (or name.fandom.com/lang/, or "wikiname.com" (or other top level domain if the wiki doesn't have "fandom"/"wikia" in it).
   
 
These allow you to customize a specific wiki's results, instead of requiring every wiki listed to use the same options.
 
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.
+
Each list item may have parameters added to add additional functionality for how that wiki is displayed / loaded. This can be done in one of two ways:
  +
*Adding <code>&paramname=</code> after the url. ex: <code>dev.fandom.com &bgcolor=green</code>
  +
*Adding a sub list below the entry (with or without a "&" in front of param name). ex:
  +
<pre>
  +
*dev.fandom.com
  +
**bgcolor=green
  +
</pre>
 
{| class="wikitable"
 
{| class="wikitable"
 
!Name
 
!Name
Line 214: Line 217:
 
|-
 
|-
 
! colspan="4"|Special cases for properly displaying wikis
 
! colspan="4"|Special cases for properly displaying wikis
  +
|- id="scriptdir-row"
|-
 
 
|'''&scriptdir='''
 
|'''&scriptdir='''
 
| style="text-align:center;"|text
 
| style="text-align:center;"|text
 
| style="text-align:center;"| -
 
| style="text-align:center;"| -
|('''for non-FANDOM wikis''') The sub-directory of the wiki scripts should access for the api. Ending "/" should not be included. By default the script checks the root of the domain (as this is how it is on FANDOM), but for some wikis it may be something else (popular directories are "/w" and "/wiki"). An easy way to find a wiki's api directory is to enter "<code><nowiki>console.log(mw.config.get("wgScriptPath"));</nowiki></code>" in your [//webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers browser's console] on that respective wiki. Or for newer wikis, go to [[Special:Version]] and select "Script path" under the "Entry point URLs" section.
+
|('''for non-Fandom wikis''') The sub-directory of the wiki scripts should access for the api. Ending "/" should not be included. By default the script checks the root of the domain (as this is how it is on Fandom), but for some wikis it may be something else (popular directories are "/w" and "/wiki"). An easy way to find a wiki's api directory is to enter "<code><nowiki>console.log(mw.config.get("wgScriptPath"));</nowiki></code>" in your [//webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers browser's console] on that respective wiki. Or for newer wikis, go to [[Special:Version]] and select "Script path" under the "Entry point URLs" section.
 
|-
 
|-
 
|'''&username='''
 
|'''&username='''
 
| style="text-align:center;"|text
 
| style="text-align:center;"|text
 
| style="text-align:center;"| -
 
| style="text-align:center;"| -
| '''This is only "required" for non-FANDOM wikis'''. Since external usernames are not known, this allows you to specify it for a wiki. This allows "hidemyself" to work, as well as detecting user rights (for displaying "block" links and such). If you don't care about these features, this can be left out. When a FANDOM wiki is listed, this is '''not''' required as it checks the currently logged in user (although if you have a different accounts for a different FANDOM wikis, this could be used).
+
| '''This is only "required" for non-Fandom wikis'''. Since external usernames are not known, this allows you to specify it for a wiki. This allows "hidemyself" to work, as well as detecting user rights (for displaying "block" links and such). If you don't care about these features, this can be left out. When a Fandom wiki is listed, this is '''not''' required as it checks the currently logged in user (although if you have a different accounts for a different Fandom wikis, this could be used).
 
|-
 
|-
 
|'''&favicon='''
 
|'''&favicon='''
| style="text-align:center;"| URL (without http://)
+
| style="text-align:center;"| URL (without https://)
 
| style="text-align:center;"| -
 
| style="text-align:center;"| -
|Replaces the favicon used for the wiki with the one specified. Simply include the full url '''without''' the "http://". Intended for wikis that don't have favicons or if the default one is too similar to another wiki on the list.
+
|Replaces the favicon used for the wiki with the one specified. Simply include the full url '''without''' the "https://". Intended for wikis that don't have favicons or if the default one is too similar to another wiki on the list.
 
|-
 
|-
 
|'''&bgcolor='''
 
|'''&bgcolor='''
Line 238: Line 241:
 
; Examples
 
; Examples
 
<nowiki><div class="rc-content-multiple"></nowiki>
 
<nowiki><div class="rc-content-multiple"></nowiki>
*fewfre.wikia.com<span style="color:red;">&hideusers=Fewfre,FewBot</span>
+
*<nowiki>https://fewfre.fandom.com</nowiki> <span style="color:red;">&hideusers=Fewfre,FewBot</span>
*wiki.guildwars2.com<span style="color:red;">&favicon=wiki.guildwars2.com/images/thumb/d/df/GW2Logo_new.png/180px-GW2Logo_new.png</span>
+
*<nowiki>https://pixelmonmod.com</nowiki> <span style="color:red;">&scriptdir=wiki</span><span style="color:blue;">&params=hidemyself:1,limit:5</span>
  +
*<nowiki>https://wiki.guildwars2.com</nowiki>
*pixelmonmod.com<span style="color:red;">&scriptdir=wiki</span><span style="color:blue;">&params=hidemyself:1,limit:5</span>
 
  +
**<span style="color:red;">favicon=wiki.guildwars2.com/images/thumb/d/df/GW2Logo_new.png/180px-GW2Logo_new.png</span>
 
<nowiki></div></nowiki>
 
<nowiki></div></nowiki>
   
 
=== Options Panel ===
 
=== 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. The options panel also allows a way to toggle FANDOM Discussions on/off.
+
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. The options panel also allows a way to toggle Fandom Discussions on/off.
   
 
Due to these options changing display requirements, all current changes listed on the page will be cleared and then refreshed.
 
Due to these options changing display requirements, all current changes listed on the page will be cleared and then refreshed.
Line 296: Line 300:
 
|'''hideenhanced'''
 
|'''hideenhanced'''
 
| style="text-align:center;"|0<br /><small>(false)</small>
 
| style="text-align:center;"|0<br /><small>(false)</small>
|Doesn't group edits, instead showing each edit in the order they were done. '''Note:''' Isn't supported on a wiki-per-wiki basis (all or nothing).
+
|Doesn't show group edits, instead showing each edit in the order they were done. '''Note:''' Isn't supported on a wiki-per-wiki basis (all or nothing).
 
|-
 
|-
 
|'''hidelogs'''
 
|'''hidelogs'''
Line 304: Line 308:
 
|'''namespace'''
 
|'''namespace'''
 
| style="text-align:center;"|''none''
 
| style="text-align:center;"|''none''
|By default, all namespaces are shown. Shown namespaces can be limited by adding the namespace number to be shown. If more than one namespace is to be shown, the namespaces must be separated with a "<code>&#124;</code>" and no spaces (ex: <code>1&#124;10&#124;2001</code> to only show Talk, Template, and Board Threads)
+
|By default, all namespaces are shown. Shown namespaces can be limited by adding the [[help:namespace|namespace]] number to be shown. If more than one namespace is to be shown, the namespaces must be separated with a "<code>&#124;</code>" and no spaces (ex: <code>1&#124;10&#124;2001</code> to only show Talk, Template, and Board Threads)
 
|-
 
|-
 
! colspan="3"|Unsupported Parameters
 
! colspan="3"|Unsupported Parameters
Line 318: Line 322:
 
=== CSS Styling ===
 
=== CSS Styling ===
 
This script uses as many default [[Special:RecentChanges|RecentChanges]] classes as possible to allow styling to be consistent. Most RCM-specific features also use class names to allow for customization. Some useful classes are:
 
This script uses as many default [[Special:RecentChanges|RecentChanges]] classes as possible to allow styling to be consistent. Most RCM-specific features also use class names to allow for customization. Some useful classes are:
* <code>.rc-entry-$1</code> surrounds an entire entry / entry group, with $1 being the url domain with dots as dashes (ex: "dev-wikia-com"). By default this is used to style ".rcm-tiled-favicon", but it can be used to customize any data different based on it's wiki.
+
* <code>.rc-entry-$1</code> surrounds an entire entry / entry group, with $1 being the url domain with dots as dashes (ex: "dev-fandom-com"). By default this is used to style ".rcm-tiled-favicon", but it can be used to customize any data different based on it's wiki.
 
* <code>.rc-entry-ns-$1</code> surrounds an entire entry / entry group, with $1 being the number of a [[Help:namespace|namespace]] (ex: 0 for mainspace, 1 for talk, etc).
 
* <code>.rc-entry-ns-$1</code> surrounds an entire entry / entry group, with $1 being the number of a [[Help:namespace|namespace]] (ex: 0 for mainspace, 1 for talk, etc).
 
* <code>.rcm-favicon-goto-button</code> represents the icon to the left of each entry. Can be used to modify the icon / remove it.
 
* <code>.rcm-favicon-goto-button</code> represents the icon to the left of each entry. Can be used to modify the icon / remove it.
   
So long as "data-extraLoadingEnabled" is not turned off, user links also have attributes added once the data is fetched. <code>.rcm-userblocked</code> signifies a user is blocked on that wiki, <code>.rcm-usergroup-$1</code> allows you to customize names based on the user's group (with "$1" being the uniq ID for that group), and <code>.rcm-useranon</code> is added for anonymous users. You can find common group ids [{{FULLURL:Special:ListUsers|uselang=qqx&debug=true}} here] (listed as"group-$1]") and you can find a list of all groups (and the rights that come with them if curious) <span class="plainlinks">[//dev.wikia.com/api.php?action=query&format=xml&list=&meta=siteinfo&siprop=usergroups here]</span>; simple change the wiki in the url to see it for your target wiki (if it has a custom group). ex: <code>.rcm-usergroup-content-moderator</code>
+
So long as "data-extraLoadingEnabled" is not turned off, user links also have attributes added once the data is fetched. <code>.rcm-userblocked</code> signifies a user is blocked on that wiki, <code>.rcm-usergroup-$1</code> allows you to customize names based on the user's group (with "$1" being the uniq ID for that group), and <code>.rcm-useranon</code> is added for anonymous users. You can find common group ids [{{FULLURL:Special:ListUsers|uselang=qqx&debug=true}} here] (listed as "group-$1]") and you can find a list of all groups (and the rights that come with them if curious) <span class="plainlinks">[//dev.fandom.com/api.php?action=query&format=xml&list=&meta=siteinfo&siprop=usergroups here]</span>; simply change the wiki in the url to see it for your target wiki (if it has a custom group). ex: <code>.rcm-usergroup-content-moderator</code>
   
 
There are many other classes (either custom or RecentChanges classes) that can be utilized to customize the script. Best way to find them is to just inspect the element you want to customize and go from there.
 
There are many other classes (either custom or RecentChanges classes) that can be utilized to customize the script. Best way to find them is to just inspect the element you want to customize and go from there.
   
 
== Discussions ==
 
== Discussions ==
In late 2016 FANDOM started pushing their discussion system onto new wikis, eventually working towards placing it on all wikis. Edits made inside the discussion area do not show up inside RecentChanges, so support has to be tacked on. This has a few potentially unexpected results:
+
In late 2016 Fandom started pushing their discussion system onto new wikis, eventually working towards placing it on all wikis. Edits made inside the discussion area do not show up inside RecentChanges, so support has to be tacked on. This has a few potentially unexpected results:
 
* Discussions are turned on by default. It can be toggled off on the option panel, or via the <code>data-discussions-enabled</code> attribute.
 
* Discussions are turned on by default. It can be toggled off on the option panel, or via the <code>data-discussions-enabled</code> attribute.
 
* Not all discussions have titles, so if a title is not present, the first 35 characters of the original post are used to identify it instead.
 
* Not all discussions have titles, so if a title is not present, the first 35 characters of the original post are used to identify it instead.
* As the title of a thread is not included in the api information returned for a specific post, titles often need to be retrieved separately (using the same second-load mechanic as wall/forum titles; just like those, this feature can be disabled via the <code>data-extraLoadingEnabled</code> attribute.
+
* As the title of a thread is not included in the api information returned for a specific post, titles often need to be retrieved separately (using the same second-load mechanic as wall/forum titles; just like those, this feature can be disabled via the <code>data-extraLoadingEnabled</code> attribute).
 
* Many options do not affect discussions. Some that do work are: hidemyself, hideusers, onlyshowusers, limit & days (see below for specifics).
 
* Many options do not affect discussions. Some that do work are: hidemyself, hideusers, onlyshowusers, limit & days (see below for specifics).
 
** Limit - only goes up to 50. Having a limit less than 50 will work.
 
** Limit - only goes up to 50. Having a limit less than 50 will work.
 
** hidemyself / hideusers - will affect the max number of discussions you see (since these are removed from the loaded list).
 
** hidemyself / hideusers - will affect the max number of discussions you see (since these are removed from the loaded list).
 
* These changes are loaded '''in addition to''' normal changes. If a limit is set to less than or equal to 50, this can possibly double the results displayed for that wiki.
 
* These changes are loaded '''in addition to''' normal changes. If a limit is set to less than or equal to 50, this can possibly double the results displayed for that wiki.
* Discussions are only checked for on FANDOM wikis (as they are FANDOM-specific). However, the first time a script loads changes it needs to check '''all''' wikis to see if they exist. If they return a 404, an attempt to load that specific wiki will not happen again.
+
* Discussions are only checked for on Fandom wikis (as they are Fandom-specific). However, the first time a script loads changes it needs to check '''all''' wikis to see if they exist. If they return a 404, an attempt to load that specific wiki will not happen again.
 
* Since the api returns avatars and vote totals, this information is included as well. They can be removed with custom css using the <code>.rcm-avatar</code> and <code>.rcm-upvotes</code> classes respectively.
 
* Since the api returns avatars and vote totals, this information is included as well. They can be removed with custom css using the <code>.rcm-avatar</code> and <code>.rcm-upvotes</code> classes respectively.
 
* Due to how the API works, edits to posts are not shown as a separate change. Instead the post will simply appear higher up on the list ('''if''' it's creation date is still within the top 50). One possible unexpected side-effect this has is that if someone edits a post the day after they created it, it won't show up under both days.
 
* Due to how the API works, edits to posts are not shown as a separate change. Instead the post will simply appear higher up on the list ('''if''' it's creation date is still within the top 50). One possible unexpected side-effect this has is that if someone edits a post the day after they created it, it won't show up under both days.
Line 342: Line 346:
 
This script is translated in two separate ways:
 
This script is translated in two separate ways:
 
# '''Script Text''' ("TEXT" in code) – normal translation stuff like any other script that needs to be updated by hand.
 
# '''Script Text''' ("TEXT" in code) – normal translation stuff like any other script that needs to be updated by hand.
# '''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 FANDOM should be supported by this script for this type of translation.
+
# '''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 Fandom should be supported by this script for this type of translation.
 
The js file for translations can be found [[github:fewfre/RecentChangesMultiple/blob/master/src/js/i18n.ts|on Github]], and translations may be posted on the talk page or [[w:c:fewfre:Thread:2301|here]]. Only translate the first "TEXT" section, not "MESSAGES".
 
The js file for translations can be found [[github:fewfre/RecentChangesMultiple/blob/master/src/js/i18n.ts|on Github]], and translations may be posted on the talk page or [[w:c:fewfre:Thread:2301|here]]. Only translate the first "TEXT" section, not "MESSAGES".
   
Line 370: Line 374:
   
 
* Important notes:
 
* Important notes:
** "&subdir" removed, and "&scriptdir" added (may be necessary for non-FANDOM wikis, see above). ex: <code>&scriptdir=w/</code>
+
** "&subdir" removed, and "&scriptdir" added (may be necessary for non-Fandom wikis, see above). ex: <code>&scriptdir=w/</code>
 
** "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"
 
** "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:
 
* Changes:
** Changed translating to use the exact i18n info from FANDOM's github for RC_TEXT. Loads RC_TEXT from the server based on your language.
+
** Changed translating to use the exact i18n info from Fandom'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.
 
** 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 "<s>hideenhanced</s>", "from", and viewing a select namespace.
 
** All (normal) RecentChanges params supported, except "<s>hideenhanced</s>", "from", and viewing a select namespace.
Line 381: Line 385:
 
*** 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)
 
*** 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.
 
** Additional Special:RecentChanges CSS classes used.
** Rewrote RC / RCList objects (to bring a little more inline with how it's structure in mw system)
+
** Rewrote RC / RCList objects (to bring a little more inline with how it's structured in MW system)
 
** New "WikiData" class for storing wiki-specific data in a more understandable way, while also providing helper methods
 
** New "WikiData" class for storing wiki-specific data in a more understandable way, while also providing helper methods
 
</div>
 
</div>
Line 391: Line 395:
 
** Logs may do weird things on "rare" cases (like staff-only actions and rare extension-only actions). Support for these can be added, but aren't in by default since each needs to be manually checked for each type (and sometimes each specific action).
 
** Logs may do weird things on "rare" cases (like staff-only actions and rare extension-only actions). Support for these can be added, but aren't in by default since each needs to be manually checked for each type (and sometimes each specific action).
 
** (Rights log) – the rights will be listed using their "id" instead of a translation of the user group. So it'll be things like "sysop". Not all wikis have same groups, so getting translations from each wiki is more of a burden than it's worth.
 
** (Rights log) – the rights will be listed using their "id" instead of a translation of the user group. So it'll be things like "sysop". Not all wikis have same groups, so getting translations from each wiki is more of a burden than it's worth.
* This script retrieves RecentChanges translations directly from the server. As such translations might differ when using non-FANDOM wikis. If the loading failed enough times, it'll just default to English text.
+
* This script retrieves RecentChanges translations directly from the server. As such translations might differ when using non-Fandom wikis. If the loading failed enough times, it'll just default to English text.
   
 
== Other ==
 
== 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).
 
* "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 FANDOM wikis, but should work for any wiki (assuming it's not too out-of-date).
+
* Designed for Fandom wikis, but should work for any wiki (assuming it's not too out-of-date).
* Some non-FANDOM wikis simply do not seem to work, due to how they are setup (MediaWiki version is to old, API disabled, etc.).
+
* Some non-Fandom 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 [[MediaWiki:RecentChangesMultiple/code.js|code.js]], with documentation for it found [[Special:Permalink/28329|here]].
 
* The script should be run using code.2.js. Although no longer supported, the original atom-feed version can be found at [[MediaWiki:RecentChangesMultiple/code.js|code.js]], with documentation for it found [[Special:Permalink/28329|here]].
   
Line 405: Line 409:
 
** Have the [[mw:API:Main page|Mediawiki Api]] available.
 
** Have the [[mw:API:Main page|Mediawiki Api]] available.
 
* Browser that supports various aspects of ECMAScript5 (any up-to-date browser will basically be fine).
 
* Browser that supports various aspects of ECMAScript5 (any up-to-date browser will basically be fine).
* The script has to run on a FANDOM wiki (to make sure it have access to things like the code for collapsing lists).
+
* The script has to run on a Fandom wiki (to make sure it have access to things like the code for collapsing lists).

Revision as of 16:16, 4 January 2020

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 RecentChanges as close as possible, there are many subtle differences (see Notes below).

This tool is designed primarily with Fandom wikis in mind, but should work for many wikis by default, and has some settings to handle special cases for certain non-Fandom wikis (such as "&scriptdir=" below). When adding non-Fandom 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.

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.

Install

Basic Usage

All that's truly need after the script is installed is a div with the "rc-content-multiple" class 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:

<div class="rc-content-multiple">
*https://runescape.fandom.com/fr/
*wowwiki.fandom.com
*https://dev.fandom.com &bgcolor=green
</div>

Basic Features

While not part of Special:RecentChanges, these are some additional 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.
  • RecentChangesMultiple AjaxDiff icon 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.
  • RecentChangesMultiple AjaxGallery icon AjaxGallery: By clicking the photo icon next to files changes (be it upload log or 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.
  • RecentChangesMultiple AjaxPagePreview icon 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 the page may appear broken / different than expected.
  • Discussions: Inspired by DiscussionsFeed, you may now see discussions in the script. See below for information on various caveats.
  • 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 the instance only has one wiki, this panel will open by default.
  • Multiple instances: Multiple instances ("containers") may be run on the same page.
    • This includes those within tabbers and tab views.
    • It is possible to have each instance only load 1 wiki, thus allowing a more typical RecentChanges design while still viewing multiple wikis on 1 page. It's also possible to refresh all instances using the rcm-refresh-all 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, data-timezone).

HTTPS

Since all fandom wikis have HTTPS enabled, you will not be able to load content from wikis without HTTPS.

If you are having HTTPS loading issues running the script on a fandom.com wiki, try changing any wikia.com wiki links in your list to fandom.com. All wikia wikis are now converted to fandom, so shouldn't be an issue.

This issue will still effect some external wikis however that will continue to run without HTTPS. There is currently no workaround for this issue.

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: https://yourwiki.fandom.com/wiki/RecentChangesMultiplePage?hidemyself=1&days=7

Dataset

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

Name Expects Default Description
data-params= RC url params - The exact params you would use on Special:RecentChanges, without the "?" after the title (ex: hidemyself=1&days=10&limit=50). See more at RC Params below.
data-hideusers= Comma separated list - A list of users you like to hide the edits of on all wikis, separated with commas. Do not include "User:", and whitespace may be included before/after the commas (white space/underscores in names is required).
data-timezone= string utc By default this script lists dates in UTC. If this attribute is set to "local", the times listed will be based on the local time as determined by the web browser.
data-timeformat= string 24 By default this script lists times in 24 hour format. If this attribute is set to "12" then times are listed in 12 hour AM/PM format.
data-autorefresh= Whole number 60 The number of seconds for the script to wait to auto-refresh (if the auto-fresh box is checked). Any number above 0 is valid. Note that the time starts after a refresh has completely finished and all results have been added to the screen.
data-autorefresh-evenOnFocus= Boolean true When auto-refresh is enabled, by default it will refresh the script even if you currently have the page open and are clicking / reading things. As this can be annoying, this option (if set to "false") will allow you to prevent the script from refreshing if the page has focus (last window you clicked and your current tab).
data-notifications-hideusers= Comma separated list - A list of users you do not want to see auto-refresh notifications about when they edit, separated with commas. Do not include "User:", and whitespace may be included before/after the commas (white space/underscores in names is required).
data-discussions-enabled= Boolean true Lists Fandom discussions for each wiki. Set to "false" to disable (options panel toggle overrides this). See below for more info.
Show/Hide Advanced options (not necessary for most people)
Advanced options
Name Expects Default Description
data-lang= Country Code auto-detect This is the language used when translating text in the script. By default, this script uses the language set in your user settings (or wiki language if anon) to display a language if supported, or "en" if the language if not supported (except for RecentChanges text, which is taken directly from the server and should always be supported). For those whose language isn't supported but don't wish to use English as the translation, set this to a 2 letter language code ("fr", "pl", etc.).
data-onlyshowusers= Comma separated list - If a list of users exists, the script will only show edits by these user(s), hiding all non-specified user edits. "hideusers" (both dataset (above) and wiki-specific (below)) takes precedence. Do not include "User:", and whitespace may be included before/after the commas (white space/underscores in names is required).
data-ajaxlinks= Boolean false Set to "true" to enable. When enabled, various links will behave the same (on click) as their icon counterpart: "diff" and "changes" links will open ajax diffs, and "Upload log" and file names (when not in a log and is the page that was changed) will open the ajax gallary.
data-hiderail= Boolean true By default any page that includes a ".rc-content-multiple" div will have its rail hidden (so it takes up whole page, like normal RC). This parameter is simply a way to reverse this, if desired, when this parameter is equal to "false".
data-autorefresh-enabled= Boolean false If no cookie is present, this controls whether or not the "Auto refresh" feature is enabled by default. Setting it to "true" will enable it by default.
data-loaddelay= Number 10 The time (in milliseconds) to wait between loading wikis. Only time this is needed to be increased is when loading a large number of wikis (100+) to avoid load limit and being blocked temporarily.
data-extraLoadingEnabled= Boolean true Since not all information can be retrieved in the initial call (since it requires the initial information), it's loaded after all content is added to the screen. Since this is not strictly needed, this offers a way to turn it off (possibly to limit server calls or to save on bandwidth). Currently this is required for:
  • Displaying forum / wall titles as well as fixing the link to the page.
  • Displaying discussion titles.
  • Adding user link classes for user groups / if user is blocked
data-localSystemMessages= Boolean true Some wikis are restricted from public access, including the wiki's api. While this normally wouldn't matter if not monitoring it, running this script on such a wiki prevents access to system messages which the script relies on for language support. Setting this to "false" will instead retrieve system messages from community central. This is not necessary if running the script in English. This is true by default as system messages for a wiki can be personalized and using local ones will allow the script to use them to (for fun / consistency), as well as removing an external dependency.
Example

datasets go directly inside the div, like so:

<div class="rc-content-multiple" data-params="hidemyself=1&days=10&limit=50" data-hideusers="TestUser,My awesome username,ILikePIE">
*list of wikis
</div>

On List Items

Every item on the list must start with the wiki's base url, in the format "name.fandom.com" (or name.fandom.com/lang/, or "wikiname.com" (or other top level domain if the wiki doesn't have "fandom"/"wikia" in it).

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 to add additional functionality for how that wiki is displayed / loaded. This can be done in one of two ways:

  • Adding &paramname= after the url. ex: dev.fandom.com &bgcolor=green
  • Adding a sub list below the entry (with or without a "&" in front of param name). ex:
*dev.fandom.com
**bgcolor=green
Name Expects Default Description
&params= RC url params - Same as data-params, except "&"s must be turned into commas (","), and "="s into colons (":"). See also RC Params below.
&hideusers= Comma separated list - Much like the "data-hideusers=" above, this accepts a comma-separated list of users, but instead they are only hidden for the specified wiki. Do not include "User:".
&onlyshowusers= Comma separated list - Much like the "data-onlyshowusers=" above, this accepts a comma-separated list of users, but instead it only triggers for the specified wiki. Do not include "User:".
&notifications_hideusers= Comma separated list - Much like the "data-notifications-hideusers=" above, this accepts a comma-separated list of users, but instead it only triggers for the specified wiki. Do not include "User:".
&notifications_enabled= Boolean true Set to "false" to prevent edits on this wiki from sending out notifications. Note: if you wish to disable notifications for the whole script, don't use script settings; instead use your native browser way to disable notifications you accepted (usually click the gear icon on a notification that pops up).
Special cases for properly displaying wikis
&scriptdir= text - (for non-Fandom wikis) The sub-directory of the wiki scripts should access for the api. Ending "/" should not be included. By default the script checks the root of the domain (as this is how it is on Fandom), but for some wikis it may be something else (popular directories are "/w" and "/wiki"). An easy way to find a wiki's api directory is to enter "console.log(mw.config.get("wgScriptPath"));" in your browser's console on that respective wiki. Or for newer wikis, go to Special:Version and select "Script path" under the "Entry point URLs" section.
&username= text - This is only "required" for non-Fandom wikis. Since external usernames are not known, this allows you to specify it for a wiki. This allows "hidemyself" to work, as well as detecting user rights (for displaying "block" links and such). If you don't care about these features, this can be left out. When a Fandom wiki is listed, this is not required as it checks the currently logged in user (although if you have a different accounts for a different Fandom wikis, this could be used).
&favicon= URL (without https://) - Replaces the favicon used for the wiki with the one specified. Simply include the full url without the "https://". Intended for wikis that don't have favicons or if the default one is too similar to another wiki on the list.
&bgcolor= CSS background - If set, the RecentChanges for this wiki will show this background color behind them (instead of the favicon tiled). Any valid CSS "background" value will work (even none, rgb(), or url()). It is also possible to tweak other values by chaining CSS (ex: &bgcolor=orange;opacity:0.5). bgcolor opacity is 0.1 by default.
Examples
<div class="rc-content-multiple">
*https://fewfre.fandom.com &hideusers=Fewfre,FewBot
*https://pixelmonmod.com &scriptdir=wiki&params=hidemyself:1,limit:5
*https://wiki.guildwars2.com
**favicon=wiki.guildwars2.com/images/thumb/d/df/GW2Logo_new.png/180px-GW2Logo_new.png
</div>

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. The options panel also allows a way to toggle Fandom Discussions on/off.

Due to these options changing display requirements, all current changes listed on the page will be cleared and then refreshed.

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 note that these effect each wiki individually (so a limit of 50 for 4 wikis is actually a limit of 200 total).

There are a few 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. User settings - uses the 4 settings under "Special:Preferences > Under the Hood > Recent changes"
  3. URL variables – same as a normal RecentChanges page.
  4. data-params
  5. Options panel (run-time options)
  6. &params (note that the "options panel" will not overwrite these)

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

Available parameters
Param Default Description
limit 50 This can be any whole number between 0-500. (may be less depending on "days")
days 7 Number of days. (may be less depending on "limit")
hideminor 0
(false)
Hides edits that were marked as "minor"
hidebots 1
(true)
Hides edits done by a bot
hideanons 0
(false)
Hides edits done by anonymous users.
hideliu 0
(false)
Hides edits done by logged-in users.
hidemyself 0
(false)
Hides edits done by the account you are logged in as. Note: "hide-users=" will override this (even when using options panel). Also note that external wikis require the use of "&username=" (see above) for this to work.
hideenhanced 0
(false)
Doesn't show group edits, instead showing each edit in the order they were done. Note: Isn't supported on a wiki-per-wiki basis (all or nothing).
hidelogs 0
(false)
Hides logs.
namespace none By default, all namespaces are shown. Shown namespaces can be limited by adding the namespace number to be shown. If more than one namespace is to be shown, the namespaces must be separated with a "|" and no spaces (ex: 1|10|2001 to only show Talk, Template, and Board Threads)
Unsupported Parameters
from, invert, associated, tagfilter, hidewikidata, and any others not listed.
Feel free to request support for an unsupported param to be added if you need it; all should be more or less possible.

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:
<span class="rcm-refresh-all button">Refresh All</span>

CSS Styling

This script uses as many default RecentChanges classes as possible to allow styling to be consistent. Most RCM-specific features also use class names to allow for customization. Some useful classes are:

  • .rc-entry-$1 surrounds an entire entry / entry group, with $1 being the url domain with dots as dashes (ex: "dev-fandom-com"). By default this is used to style ".rcm-tiled-favicon", but it can be used to customize any data different based on it's wiki.
  • .rc-entry-ns-$1 surrounds an entire entry / entry group, with $1 being the number of a namespace (ex: 0 for mainspace, 1 for talk, etc).
  • .rcm-favicon-goto-button represents the icon to the left of each entry. Can be used to modify the icon / remove it.

So long as "data-extraLoadingEnabled" is not turned off, user links also have attributes added once the data is fetched. .rcm-userblocked signifies a user is blocked on that wiki, .rcm-usergroup-$1 allows you to customize names based on the user's group (with "$1" being the uniq ID for that group), and .rcm-useranon is added for anonymous users. You can find common group ids here (listed as "group-$1]") and you can find a list of all groups (and the rights that come with them if curious) here; simply change the wiki in the url to see it for your target wiki (if it has a custom group). ex: .rcm-usergroup-content-moderator

There are many other classes (either custom or RecentChanges classes) that can be utilized to customize the script. Best way to find them is to just inspect the element you want to customize and go from there.

Discussions

In late 2016 Fandom started pushing their discussion system onto new wikis, eventually working towards placing it on all wikis. Edits made inside the discussion area do not show up inside RecentChanges, so support has to be tacked on. This has a few potentially unexpected results:

  • Discussions are turned on by default. It can be toggled off on the option panel, or via the data-discussions-enabled attribute.
  • Not all discussions have titles, so if a title is not present, the first 35 characters of the original post are used to identify it instead.
  • As the title of a thread is not included in the api information returned for a specific post, titles often need to be retrieved separately (using the same second-load mechanic as wall/forum titles; just like those, this feature can be disabled via the data-extraLoadingEnabled attribute).
  • Many options do not affect discussions. Some that do work are: hidemyself, hideusers, onlyshowusers, limit & days (see below for specifics).
    • Limit - only goes up to 50. Having a limit less than 50 will work.
    • hidemyself / hideusers - will affect the max number of discussions you see (since these are removed from the loaded list).
  • These changes are loaded in addition to normal changes. If a limit is set to less than or equal to 50, this can possibly double the results displayed for that wiki.
  • Discussions are only checked for on Fandom wikis (as they are Fandom-specific). However, the first time a script loads changes it needs to check all wikis to see if they exist. If they return a 404, an attempt to load that specific wiki will not happen again.
  • Since the api returns avatars and vote totals, this information is included as well. They can be removed with custom css using the .rcm-avatar and .rcm-upvotes classes respectively.
  • Due to how the API works, edits to posts are not shown as a separate change. Instead the post will simply appear higher up on the list (if it's creation date is still within the top 50). One possible unexpected side-effect this has is that if someone edits a post the day after they created it, it won't show up under both days.

Translation

This script is translated in two separate ways:

  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 Fandom should be supported by this script for this type of translation.

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".

Big thanks to various members of the Wikia Language Brigade for many of the translations done for this script.

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.
  • V2.0 - 29 October 2016 - Script rewritten in TypeScript.
  • V2.6 - 28 January 2017 - Refreshing now only fetches and adds new items, instead of fetching and re-adding all changes. Should allow better use of large fetch limits.

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-Fandom wikis, see above). ex: &scriptdir=w/
    • "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 Fandom'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 structured in MW system)
    • New "WikiData" class for storing wiki-specific data in a more understandable way, while also providing helper methods

Notes

  • "Red links" for pages that don't exist won't show up on most logs, since this information would have to be retrieved individually for every page. Ones that do show up red were retrieved that way by default.
  • Patrolling not supported at this time. This is due to mediawiki security that prevents patrol info from being accessed unless authorized (severely breaking to script if it attempts it without authorization). Even if the right exists, the info cannot be accessed due to login being required on that wiki which is not available via cross-domain (browser security).
  • Logs:
    • Logs may do weird things on "rare" cases (like staff-only actions and rare extension-only actions). Support for these can be added, but aren't in by default since each needs to be manually checked for each type (and sometimes each specific action).
    • (Rights log) – the rights will be listed using their "id" instead of a translation of the user group. So it'll be things like "sysop". Not all wikis have same groups, so getting translations from each wiki is more of a burden than it's worth.
  • This script retrieves RecentChanges translations directly from the server. As such translations might differ when using non-Fandom wikis. If the loading failed enough times, it'll just default to English text.

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 Fandom wikis, but should work for any wiki (assuming it's not too out-of-date).
  • Some non-Fandom 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 Fandom wiki (to make sure it have access to things like the code for collapsing lists).