Community Central
Community Central
No edit summary
Tags: apiedit Help
No edit summary
Tags: apiedit Help
Line 1: Line 1:
 
{{tocright}}
 
{{tocright}}
 
'''Personal CSS and JavaScript''' allows you to customize how Fandom looks and behaves in a way that affects your account only.
 
'''Personal CSS and JavaScript''' allows you to customize how Fandom looks and behaves in a way that affects your account only.
  +
advice
  +
   
 
Any [[Special:UserLogin|logged in]] user can customize the site like this through a couple of user namespace subpages. This allows you to use your own choice of fonts, colors, positions of elements, and many other things. Note that CSS and JS customizations are not generally applied to the mobile skin.
 
Any [[Special:UserLogin|logged in]] user can customize the site like this through a couple of user namespace subpages. This allows you to use your own choice of fonts, colors, positions of elements, and many other things. Note that CSS and JS customizations are not generally applied to the mobile skin.

Revision as of 12:35, 25 February 2017

Personal CSS and JavaScript allows you to customize how Fandom looks and behaves in a way that affects your account only.

advice


Any logged in user can customize the site like this through a couple of user namespace subpages. This allows you to use your own choice of fonts, colors, positions of elements, and many other things. Note that CSS and JS customizations are not generally applied to the mobile skin.

CSS

To customize how the site looks for you using CSS, create and edit Special:MyPage/global.css on Community Central. This will apply the changes wherever you go on Fandom.

If you want to apply personal CSS on just one community, visit Special:MyPage/common.css on that community.

You can even get more specific and apply your code to a single skin on a single community: Special:MyPage/wikia.css for the default skin, and Special:MyPage/monobook.css for Monobook users.

JavaScript

PersonalJSPreference

The personal JS preference

Note: as a security checkpoint, you must manually enable personal JS in your preferences before it will run on your account. Before doing so, please make sure to read all the notes below. The option can be found on the 'Under the Hood' tab, under "Advanced display options".

To customize how site looks for you using JS, create and edit Special:MyPage/global.js on Community Central. This will apply the changes wherever you go on Fandom.

If you want to apply personal JS on just one community, visit Special:MyPage/common.js on that community.

You can even get more specific and apply your code to a single skin on a single community: Special:MyPage/wikia.js for the default skin, and Special:MyPage/monobook.js for Monobook users.

Notes:

  • Before enabling personal JS on your account for the first time, please double-check any existing personal JS you have, and make sure you are happy with it.
  • JS errors can break basic functionality - be careful!
  • Please avoid including JS that you do not understand, nor import from sources that you do not fully trust or that are not secure.
  • Fandom cannot be held responsible for any issues that occur as a result from the use of personal JS. It is your responsibility to maintain your personal JS (and CSS).
  • Note that 'personal JS' pages are currently considered to be: global.js, common.js, wikia.js, chat.js, monobook.js, and uncyclopedia.js. Any other .js pages in the user namespace are not currently editable due to security concerns, with only those listed being unlocked for editing.

Additional notes

If you normally use the VisualEditor, these pages may open in that editor by default. You will want to use the classic editor instead, linked from the 'Edit' button dropdown.

As noted on the customization policy, personal CSS and JS is an area you can make any tweaks you like (so long as they do not adversely affect any other users).

Only account owners can edit their own CSS and JS pages - other users on a community, including admins, cannot edit another user's personal CSS and JS pages.

You can also target specific communities in your global CSS and JS:

  • CSS: a wiki-specific class is available on the <body> tag, based on the database name of a community. The format is: wiki-[database name].
  • JS: the wgDBName (database name) variable can be used to target a community.

==

Further help and feedback