diff --git a/extension.json b/extension.json index 3155eab..5b05b8d 100644 --- a/extension.json +++ b/extension.json @@ -7,9 +7,7 @@ "descriptionmsg": "isekaiwiki-misc-desc", "license-name": "MIT", "type": "other", - "requires": { - - }, + "requires": {}, "MessagesDirs": { "IsekaiMisc": [ "i18n" @@ -59,7 +57,9 @@ }, "ResourceModules": { "ext.isekai": { - "scripts": ["ext.isekai.js"], + "scripts": [ + "ext.isekai.js" + ], "dependencies": [ "oojs-ui-core", "oojs-ui-windows", @@ -88,40 +88,61 @@ ] }, "ext.isekai.styles": { - "styles": ["ext.isekai.less"], + "styles": [ + "ext.isekai.less" + ], "targets": [ "desktop", "mobile" ] }, "lib.isekai.echarts": { - "scripts": ["lib/echarts.custom.min.js"] + "scripts": [ + "lib/echarts.custom.min.js" + ] }, "ext.isekai.chart": { - "scripts": ["ext.isekai.chart.js"], - "styles": ["ext.isekai.chart.less"] + "scripts": [ + "ext.isekai.chart.js" + ], + "styles": [ + "ext.isekai.chart.less" + ] }, "ext.treeview": { - "scripts": ["ext.treeview.js"], - "styles": ["ext.treeview.css"], + "scripts": [ + "ext.treeview.js" + ], + "styles": [ + "ext.treeview.css" + ], "targets": [ "desktop", "mobile" ] }, "ext.isekai.ve": { - "scripts": ["ext.isekai.ve.js"], + "scripts": [ + "ext.isekai.ve.js" + ], "targets": [ "desktop", "mobile" + ], + "dependencies": [ + "ext.visualEditor.mwcore", + "ext.visualEditor.mwmeta", + "ext.visualEditor.desktopArticleTarget" ] }, "ext.isekai.function-btn": { - "scripts": ["ext.isekai.function-btn.js"], - "dependencies": [ - "ext.isekai.baseWidgets", + "scripts": [ + "ext.isekai.function-btn.js" + ], + "dependencies": [ + "ext.isekai.baseWidgets", "oojs-ui.styles.icons-media" - ], + ], "targets": [ "desktop", "mobile" @@ -132,9 +153,13 @@ ] } }, - "VisualEditorPluginModules": [ - "ext.isekai.ve" - ], + "attributes": { + "VisualEditor": { + "PluginModules": [ + "ext.isekai.ve" + ] + } + }, "ResourceFileModulePaths": { "localBasePath": "modules", "remoteExtPath": "IsekaiMisc/modules" @@ -147,12 +172,12 @@ "activated-editor": {} }, "config": { - "IsekaiShowAds": { + "IsekaiShowAds": { "value": false }, "IsekaiActivateEditorRequiredWords": { "value": 300 } - }, + }, "manifest_version": 2 } \ No newline at end of file diff --git a/includes/Isekai.php b/includes/Isekai.php index fe122df..3594d8e 100644 --- a/includes/Isekai.php +++ b/includes/Isekai.php @@ -375,7 +375,7 @@ HTML $userFactory = $services->getUserFactory(); $userGroupManager = $services->getUserGroupManager(); - if ($wikiPage->getTitle()->getNamespace() === NS_MAIN && $user->isRegistered()) { + if ($wikiPage->getNamespace() === NS_MAIN && $user->isRegistered()) { $userGroups = $userGroupManager->getUserGroups($user); if (!in_array('activated-editor', $userGroups)) { $realUser = $userFactory->newFromId($user->getId());