diff --git a/includes/SkinVector.php b/includes/SkinVector.php index 1bb556a9b..bdde33cce 100644 --- a/includes/SkinVector.php +++ b/includes/SkinVector.php @@ -84,7 +84,7 @@ class SkinVector extends SkinTemplate { $module = $this->isLegacy() ? 'skins.vector.styles.legacy' : 'skins.vector.styles'; $modules['styles']['skin'][] = $module; - $modules['core'][] = 'skins.vector.js'; + $modules['core'][] = $this->isLegacy() ? 'skins.vector.legacy.js' : 'skins.vector.js'; return $modules; } diff --git a/resources/skins.vector.js/index.js b/resources/skins.vector.js/index.js index 40eff8a10..1bdf0695b 100644 --- a/resources/skins.vector.js/index.js +++ b/resources/skins.vector.js/index.js @@ -1,6 +1,6 @@ var - collapsibleTabs = require( './collapsibleTabs.js' ), - vector = require( './vector.js' ); + collapsibleTabs = require( '../skins.vector.legacy.js/collapsibleTabs.js' ), + vector = require( '../skins.vector.legacy.js/vector.js' ); function main() { collapsibleTabs.init(); diff --git a/resources/skins.vector.js/collapsibleTabs.js b/resources/skins.vector.legacy.js/collapsibleTabs.js similarity index 100% rename from resources/skins.vector.js/collapsibleTabs.js rename to resources/skins.vector.legacy.js/collapsibleTabs.js diff --git a/resources/skins.vector.legacy.js/index.js b/resources/skins.vector.legacy.js/index.js new file mode 100644 index 000000000..40eff8a10 --- /dev/null +++ b/resources/skins.vector.legacy.js/index.js @@ -0,0 +1,10 @@ +var + collapsibleTabs = require( './collapsibleTabs.js' ), + vector = require( './vector.js' ); + +function main() { + collapsibleTabs.init(); + $( vector.init ); +} + +main(); diff --git a/resources/skins.vector.js/vector.js b/resources/skins.vector.legacy.js/vector.js similarity index 100% rename from resources/skins.vector.js/vector.js rename to resources/skins.vector.legacy.js/vector.js diff --git a/skin.json b/skin.json index f36d5dd81..e0b0869e7 100644 --- a/skin.json +++ b/skin.json @@ -67,8 +67,18 @@ "skins.vector.js": { "packageFiles": [ "resources/skins.vector.js/index.js", - "resources/skins.vector.js/collapsibleTabs.js", - "resources/skins.vector.js/vector.js" + "resources/skins.vector.legacy.js/collapsibleTabs.js", + "resources/skins.vector.legacy.js/vector.js" + ], + "dependencies": [ + "mediawiki.util" + ] + }, + "skins.vector.legacy.js": { + "packageFiles": [ + "resources/skins.vector.legacy.js/index.js", + "resources/skins.vector.legacy.js/collapsibleTabs.js", + "resources/skins.vector.legacy.js/vector.js" ], "dependencies": [ "mediawiki.util"