Mediawiki: how to insert a <script> tag

I would like to insert a flattr image into my mediawiki installation. To do this, insert the section <script>...</script>in the header of the html file. I have no clue where I can insert this because I cannot find the <head>-tag in the file MonoBook.php. I use the current mediawiki software (1.16.2) and the MonoBook style. Can someone give me a key where I can insert the required javascript?

+3
source share
2 answers

I found a good solution: I turn on JavaScript with $wgUseSiteJs = true;and embed flattr js in MediaWiki:Common.js.

+7
source

<script> , - ... WikiScript.

+3

Source: https://habr.com/ru/post/1791074/


All Articles