How to download css for Mediawiki tag extension?

How do you download css for extension?

Using Mediawiki 1.25.2, I copied the boiler plate extension and edited the .json extension to enable

   "Hooks": {
            "BeforePageDisplay": [
                    "FinancialMathematicsHooks::onBeforePageDisplay"
            ],...
    },
    "ResourceModules": {
                  "ext.FinancialMathematics": {
                          "styles": [
                              "modules/ext.FinancialMathematics.css"
                               ]
                     }
      }

and in the hooks file I added

    public static function onBeforePageDisplay( OutputPage &$out, Skin &$skin ) {
            $out->addModuleStyles( 'ext.FinancialMathematics' );
            return true;
    }

but the extension does not include css.

The extension is installed on the wiki here , and the full code for the extension is on github

+4
source share
1 answer

You should check if the module is loaded correctly. The easiest way is to use the browser console and run the following command:

mw.loader.getState("ext.FinancialMathematics");

error. ( direct load.php url). , Internal Error. , , , .

+1

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


All Articles