FANDOM


RevealAnonIP unmasks "A FANDOM contributor" so that their actual IP address can be seen. This works on article/blog comments and on the Special:WikiActivity page. You can also set special permissions so that this tool is only available to, for example, site administrators. Please note that this script has two different installations depending on how you want to use it.

Site-wide installation

See Help:JavaScript and CSS Cheatsheet for basic information about where you put JavaScript codes to make them work. See Help:Including additional JavaScript and CSS for more information about importArticles()

If you are an administrator of a wiki who would like to apply this script to your entire wiki, you should import RevealAnonIP/code.js. You can copy/paste the following into your wiki's MediaWiki:Common.js to install the script for all users on your wiki (to change it so that it only works for users with specific rights, see the Configuration section below):

importArticles({
    type: "script",
    articles: [
        "w:c:dev:RevealAnonIP/code.js"
    ]
});
importArticles — Best Practices for installing JavaScript on FANDOM
The importArticles statement is designed to combine multiple HTTP requests into a single data transfer, allowing multiple scripts to load and execute faster. If you've been installing several different scripts, your JavaScript file has probably accumulated unnecessary import statements. Click "Expand" to learn how to efficiently batch import scripts to speed up performance and make your code look cleaner. One other approach is by using the MediaWiki:ImportJS.
If your JavaScript file has several lines of code that say importScript, importScriptPage, or importArticles, you may be able to combine them! By batch importing a collection of scripts with a single import, your JavaScript code will load faster and look cleaner. Consider the example below. On the left is an example of what your JavaScript file might currently look like. On the right is how you could improve that code.
Multiple imports — messy and slow One import — clean and efficient
importScriptPage('AjaxRC/code.js','dev');
 
importScript('MediaWiki:localScript.js');
 
importArticle({
  type: 'script',
  article: 'u:dev:FloatingToc/code.js'
});
 
importScriptPage('page1.js', 'wikiname');
 
importScriptPage('page2.js', 'wikiname');
importArticles({
    type: 'script',
    articles: [
        'u:dev:AjaxRC/code.js',
        'MediaWiki:localScript.js',
        'u:dev:FloatingToc/code.js',
        'u:wikiname:page1.js',
        'u:wikiname:page2.js'
    ]
});
Note: In this example, pay close attention to the placement of commas and other punctuation. For people who aren't familiar with programming (and even those who are!), a common mistake when writing code is to accidentally delete, forget, or misplace critical symbols like commas or quotation marks. This can cause a syntax error that breaks the code. Carefully follow the convention shown here when using importArticles.
But there's much more to importArticles than just this! For more examples and advanced usage, see the help page at Help:Including additional JavaScript and CSS.


User installation

See Help:JavaScript and CSS Cheatsheet for basic information about where you put JavaScript codes to make them work. See Help:Including additional JavaScript and CSS for more information about importArticles()

If you are a user who would like to install this script just for yourself, you must include the RevealAnonIP/usercode.js file instead of the /code.js version used in site-wide scripts. This will allow the script to work properly for you in cases where local wiki has set permissions that would otherwise block you. If you're using this script for just yourself, you wouldn't want a local wiki to prevent you from using it with their permissions settings, would you?

To install this script for just yourself on all FANDOM wikis, please copy/paste the following into your global.js:

importArticles({
    type: "script",
    articles: [
        "w:c:dev:RevealAnonIP/usercode.js"
    ]
});

Configuration

There is a setting which allows this script to run only for users in specific user groups. To use this configuration setting, you have to add user groups as strings to the permissions array. Here is how the basic syntax works:

// http://dev.wikia.com/wiki/RevealAnonIP
window.RevealAnonIP = {
    permissions : ['GROUP1', 'GROUP2', 'GROUP3']
};

Where you should fill in groups 1, 2 and 3 to be the names of the usergroups who have permission to see anon's IP addresses. See the examples below.


Using configuration options with Fandom Open Source Library scripts
The instructions on this page describe how to use configuration options with a script. Here on the Fandom Open Source Library, many scripts provide optional configuration settings as a mean to alter or enhance the default behavior of the script. When installing configuration options in your JavaScript file, please note that they need to go above the import statement in order to work — unless the directions say otherwise. In case MediaWiki:ImportJS is used to load the scripts, it will be executed last.
Configuration options load too late, don't work
Proper placement of configuration options
// 1. AjaxRC import statement
importScriptPage('AjaxRC/code.js','dev');
 
// 2. AjaxRC configuration option
var ajaxRefresh = 30000;
// 1. AjaxRC configuration option
var ajaxRefresh = 30000;
 
// 2. AjaxRC import statement
importScriptPage('AjaxRC/code.js','dev');


All logged-in users

This configuration allows the script to work for logged-in users, but it will not run for people who are logged-out. This means that anons cannot see other anons' IP addresses.

// http://dev.wikia.com/wiki/RevealAnonIP
window.RevealAnonIP = {
    permissions : ['user']
};
 
 
importArticles({
    type: "script",
    articles: [
        "w:c:dev:RevealAnonIP/code.js"
    ]
});

Rollbacks, Admins and Bureaucrats only

This configuration only allows the script to work for users who belong to one of the following user groups: rollback, sysop, bureaucrat

// http://dev.wikia.com/wiki/RevealAnonIP
window.RevealAnonIP = {
    permissions : ['rollback', 'sysop', 'bureaucrat']
};
 
 
importArticles({
    type: "script",
    articles: [
        "w:c:dev:RevealAnonIP/code.js"
    ]
});

List of user groups

Here is a basic list of user groups you can choose from while setting up permissions. Note: if your wiki is using custom user groups (requires community agreement and sending a message to FANDOM staff at Special:Contact), you may have names that aren't on this list.

Value Description
staff FANDOM staff members (Special:Listusers/staff)
util FANDOM technical staff (Special:Listusers/util)
helper FANDOM Helpers (Special:Listusers/helper)
bureaucrat Bureacrats on this wiki (Special:Listusers/bureaucrat)
sysop Administrators on this wiki (Special:Listusers/sysop)
rollback Rollback users on this wiki (Special:Listusers/rollback)
chatmoderator Chat moderators on this wiki (Special:Listusers/chatmoderator)
user Users on this wiki (Special:Listusers)
* Everyone (both logged-in and logged-out users)

Running this script together with AjaxRC

If you are using AjaxRC on Special:WikiActivity, please take note: this script automatically adds the RevealAnonIP.reveal function to your ajaxCallAgain array, that way it should work when the ajax refresh occurs. But, if you re-assign this array *after* importing RevealAnonIP/code.js in your JavaScript file, then you'll need to make sure that you re-add RevealAnonIP.revealto the array.

ajaxCallAgain = [YOUR_FUNCTION_1, YOUR_FUNCTION_2, RevealAnonIP.reveal];

Where YOUR_FUNCTION_1 and YOUR_FUNCTION_2 are placeholder names for other functions that you might want to be calling after AjaxRC refreshes. See AjaxRC#Options for more information about getting other scripts to work together with AjaxRC.

Updates

25 October, 2013
UltimateSupreme added support for FANDOM's lazy loading sidebar.
4 February 2013
Lunarity added support for Special:Forum and forum Boards on the new forum.
13 January 2013
Lunarity added support for Special:WikiActivity's paginate feature.
11 December 2012
Lunarity altered the behavior so that it no longer affects walls or threads in the new forums, since they display the IP address automatically anyway.
14 September 2012
Lunarity added RevealAnonIP/usercode.js in order to fix a bug where the script wasn't working properly in global.js, Mathmagician updated this help page.
11 September 2012
Lunarity optimized code a bit, ran through JS Lint, fixed some bugs.
24 August 2012
Mathmagician: Made encapsulation/object-oriented improvements, no feature changes
7 August 2012
Mathmagician: Added fix for WikiaActivityModule per Jens Ingels note on the talk page
6 August 2012
Mathmagician: Added functionality: can optionally restrict this tool to privileged users
2 August 2012‎
Mathmagician: Integrated some bug fixes / additional functionality
  • Can work together with AjaxRC on Special:WikiActivity
  • Works even on wikis that have changed "A FANDOM contributor" to say something else
  • Works when clicking pagination links on article/blog comments thanks to Pecoes
A long time ago, in a galaxy far, far, away
Rappy 4187, Monchoman45 et. al. first created this script.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.