Community Central
Community Central
(→‎JavaScript: clarify)
(Referring the "English Community Central" would be a good idea since interwikis don't work for that and changes.)
Tag: Help
Line 1: Line 1:
 
{{tocright}}
 
{{tocright}}
Through '''''personal'' CSS and JavaScript''', you can change the way Fandom looks and behaves. Things like fonts, colors, and positions of page elements can be altered. However, it will only affect the way that '''you''' see Fandom when you're [[Help:Logging in|logged into]] '''your account''', and you have to make alterations to a few, specific user pages, as well as one [[Help:Preferences|account preference]].
+
Through '''''personal'' CSS and JavaScript''', you can change the way Fandom looks and behaves. Things like fonts, colors, and positions of page elements can be altered. However, it will only affect the way that you see Fandom when you're [[Help:Logging in|logged into]] your account, and you have to make alterations to a few, specific user pages, as well as one [[Help:Preferences|account preference]].
   
 
== CSS ==
 
== CSS ==
To customize how the site looks for you using CSS, create and edit '''[[w:c:ucp:Special:MyPage/global.css|Special:MyPage/global.css]]''' on UCP.fandom.com (for UCP wikis) or '''[[w:Special:MyPage/global.css|Special:MyPage/global.css]]''' on [[w:|Community Central]] (for legacy wikis). This will apply the changes wherever you go on Fandom.
+
To customize how the site looks for you using CSS, create and edit '''[[Special:MyPage/global.css]]''' English 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.
 
If you want to apply personal CSS on just one community, visit '''[[Special:MyPage/common.css]]''' on that community.
   
 
== JavaScript ==
 
== JavaScript ==
::''You must '''manually enable''' personal JS in your [[Help:Preferences|preferences]] before you'll be able to see the effects of changing your personal JS. Please '''understand the implications''' of turning the feature on by reading all the notes below. The option can be found on the [[Special:Preferences#mw-prefsection-under-the-hood|'''Under the Hood''' tab]], under '''Advanced display options'''.''<br /> 
+
::''You must '''manually enable''' personal JS in your [[Help:Preferences|preferences]] before you'll be able to see the effects of changing your personal JS. Please '''understand the implications''' of turning the feature on by reading all the notes below. The option can be found on the [[Special:Preferences#mw-prefsection-under-the-hood|'''Under the Hood''' tab]], under '''Advanced display options'''.''<br />
   
 
[[File:PersonalJSPreference.png|thumb|The personal JS preference]]
 
[[File:PersonalJSPreference.png|thumb|The personal JS preference]]
To customize how site looks for you using JS, create and edit '''[[w:c:ucp:Special:MyPage/global.js|Special:MyPage/global.js]]''' on UCP.fandom.com for UCP wikis, or '''[[w:Special:MyPage/global.js|Special:MyPage/global.js]]''' on [[w:|Community Central]] for legacy wikis. This will apply the changes wherever you go on Fandom.
+
To customize how site looks for you using JS, create and edit '''[[Special:MyPage/global.js]]''' on English 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.
 
If you want to apply personal JS on just one community, visit '''[[Special:MyPage/common.js]]''' on that community.
Line 19: Line 19:
 
* Please avoid including JS that you do not understand and don't import from sources that you do not fully trust or that are not secure.
 
* Please avoid including JS that you do not understand and don't 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).
 
* 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''' (on [[w:|Community Central]] only), '''/common.js''', '''/wikia.js''', and '''/chat.js''' (for legacy wikis only).
+
* Note that "personal JS" pages are currently considered to be: '''/global.js''' (on English Community Central only), '''/common.js''', and '''/wikia.js'''.
   
 
== Additional notes ==
 
== Additional notes ==
* Personal CSS and JS pages are best edited in [[Help:Source edit mode|the source editor]].
+
* Personal CSS and JS pages are best edited in the [[Help:Source editor|source editor]].
 
* As noted on the [[Help:Customization policy|customization policy]], personal CSS and JS is an area in which you can make any tweaks you like (so long as they do not adversely affect any other users).
 
* As noted on the [[Help:Customization policy|customization policy]], personal CSS and JS is an area in which 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.
 
* 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.
Line 32: Line 32:
 
If your view of Fandom gets weird, there's an easy way to test whether it's your personal code causing the problem.
 
If your view of Fandom gets weird, there's an easy way to test whether it's your personal code causing the problem.
   
On UCP wikis, add <tt>?safemode=1</tt> to the end of your current URL.
+
Add <code>?safemode=1</code> to the end of your current URL.
   
 
(The same can be done with [[Help:Community CSS and JS|community CSS and JS]] for individual wikis, using <coset>?usesitecss=0</code> or <code>?usesitejs=0</code>.)
On legacy wikis, add <tt>?useusercss=0</tt> or <tt>?useuserjs=0</tt>. <tt>?useusercss=0</tt> temporarily removes all styles applied into your personal stylesheet(s), and <tt>?useuserjs=0</tt> temporarily removes all scripts applied into your personal JavaScript page(s).
 
 
(The same can be done with [[Help:Community CSS and JS|community CSS and JS]] for individual wikis, using <tt>?usesitecss=0</tt> or <tt>?usesitejs=0</tt>.)
 
   
 
== See also==
 
== See also==

Revision as of 14:02, 28 January 2021

Through personal CSS and JavaScript, you can change the way Fandom looks and behaves. Things like fonts, colors, and positions of page elements can be altered. However, it will only affect the way that you see Fandom when you're logged into your account, and you have to make alterations to a few, specific user pages, as well as one account preference.

CSS

To customize how the site looks for you using CSS, create and edit Special:MyPage/global.css English 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.

JavaScript

You must manually enable personal JS in your preferences before you'll be able to see the effects of changing your personal JS. Please understand the implications of turning the feature on by reading all the notes below. The option can be found on the Under the Hood tab, under Advanced display options.
PersonalJSPreference

The personal JS preference

To customize how site looks for you using JS, create and edit Special:MyPage/global.js on English 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.

  • 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! (But there may be an easy way out!)
  • Please avoid including JS that you do not understand and don't 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 (on English Community Central only), /common.js, and /wikia.js.

Additional notes

  • Personal CSS and JS pages are best edited in the source editor.
  • As noted on the customization policy, personal CSS and JS is an area in which 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.

Troubleshooting

If your view of Fandom gets weird, there's an easy way to test whether it's your personal code causing the problem.

Add ?safemode=1 to the end of your current URL.

(The same can be done with community CSS and JS for individual wikis, using <coset>?usesitecss=0 or ?usesitejs=0.)

See also

Further help and feedback