Adding CSS or JS file to MediaWiki?

后端 未结 3 1729
旧巷少年郎
旧巷少年郎 2021-01-05 06:02

I\'ve been following some tutorials at mediawiki.org but I didn\'t make it. I need to add a new CSS or JS code to be available in all my wiki (basically be cause I need to a

3条回答
  •  半阙折子戏
    2021-01-05 06:32

    You can edit the CSS or JS files used by your wiki at the page names:

    MediaWiki:Common.css
    MediaWiki:Common.js
    

    For instance, here is the Common.css used by Wikipedia.

    There are also similar pages used for specific themes. For instance, if your wiki is using the Vector theme, you can place code specific to that theme at:

    MediaWiki:Vector.css
    MediaWiki:Vector.js
    

    Editing any of these pages will require admin rights.

提交回复
热议问题