Help:JavaScript review process

To help provide a secure environment for FANDOM's users, a community JavaScript review process is used.

This process means that any edits to community JS will not be served to visitors until they have been checked and approved by a member of FANDOM's trusted review team.

Community JS does not run unless this process is enabled. If you need to enable community JS on your wiki, please feel free to request it via Special:Contact/general.

How does it work?
When the feature is enabled on your community, pages in the MediaWiki: namespace ending in *.js become editable by local admins.

Edits to these pages will not affect what visitors receive until you submit the page for review. FANDOM's review team will then check your JS and approve or reject it. So that you easily can test JS edits, the process introduces "test mode", which allows your account to run unreviewed JS. Test mode is activated on a per-community basis, covers all local scripts, and lasts until disabled.
 * If it is approved, the changes will immediately become active on your community.
 * If it is rejected, a notice will be shown on the JS page, and an explanatory note will likely be left on the talk page.

The status of individual scripts in your community are listed in a module to the right of that JS page, and on Special:JSPages. The module and special page are where you can submit updates for approval and enable test mode. Monobook users can find the module via the 'review status' tab.

What are the criteria for approval?
With the introduction of the JS review tool, FANDOM has introduced some new rules about how JS may be written. Note that these rules are subject to change. Note: the approval process is not a review of the general quality of your code, nor about making judgment calls about how useful or valid a JS feature is. While we will let you know about serious problems, we won't rewrite the code for you.
 * All JS must be written in a clear, readable format. Any obfuscated code will be rejected.
 * All on-FANDOM imports must be stored on MediaWiki namespace pages that end with ".js"
 * User namespace imports are not allowed (see FAQ below)
 * You can use the ImportJS feature to quickly import pre-approved scripts from the FANDOM Open Source Library or your wiki. This bypasses the review process.
 * Scripts stored outside FANDOM are be approved on a case-by-case basis.
 * Any clear customization policy or Terms of Use violations will be rejected (e.g. hiding ads, collecting user data, major site layout changes).
 * JS that causes errors or performance problems will be rejected.

FAQ

 * How long does it take for my edits to be reviewed?
 * We aim for a speedy process; we don't want to get in the way of useful JS as much as possible. Scripts are reviewed on a first-come, first-served basis.


 * What if I need to make more edits after I submit my script for review?
 * Each JS page can only have one revision in the review queue. While you can make further edits after requesting a review, only the originally requested revision will be reviewed. If you want us to review a newer version, simply submit the page for review again; this will overwrite the previous request.


 * What exactly happens when a JS edit is rejected?
 * A notice will be shown on the JS page review module, and an explanatory note will likely be left on the talk page. Previously approved JS will continue to work as normal. We do not revert the edits that were rejected, since only a small tweak may be required to allow it to be approved.


 * Where can I see an overview of JS review status on my community?
 * If you visit Special:JSPages, you can see a list of JS pages on your community, along with their current review status.


 * Why do you reject imports from the User namespace?
 * We would eventually like to re-allow unrestricted editing of User namespace *.js pages (beyond personal JS), but this cannot occur until they are no longer used in community JS anywhere. If you trust a user enough to run JS they have written, consider whether the user should be an admin, or copy their JS to the MediaWiki namespace.


 * How does test mode work?
 * While visitors will only be served approved revisions of JS scripts, enabling test mode allows your account to be served the latest revisions. This should make it easier to test changes to your community's JS without worrying about it temporarily breaking the site for everyone!
 * It is enabled on a per-account, per-community basis, covers all scripts used in that community, and lasts until disabled or you log out.
 * Note that you may need to bypass your browser cache to see the latest edits.


 * How does approval work for cross-community imports?
 * If you import a script from another community, only approved versions will be served. This includes when the test mode is enabled on your home community. You will have to enable test mode on the other community to receive the latest revision from there.


 * Does this affect personal JS?
 * No; the core personal JS pages (such as, ) remain freely editable. The rules about what you can do in community JS pages do not apply to personal JS.


 * I have feedback or ideas about the tool!
 * Great! Please let us know your feedback via Special:Contact.