diff --git a/.eslintrc.json b/.eslintrc.json index 4500e436..4c7b2393 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -12,7 +12,7 @@ }, "plugins": ["no-unsanitized"], "ignorePatterns": [ - "/ext/mixed/lib/", + "/ext/lib/", "/ext/bg/js/templates.js" ], "rules": { diff --git a/.stylelintrc.json b/.stylelintrc.json index 69fa3189..ba2572a2 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,7 +1,7 @@ { "extends": "stylelint-config-recommended", "ignoreFiles": [ - "ext/mixed/lib/**/*.css" + "ext/lib/**/*.css" ], "rules": { "font-family-name-quotes": "always-where-recommended", diff --git a/dev/data/manifest-variants.json b/dev/data/manifest-variants.json index 9d7c74d4..dd46dc22 100644 --- a/dev/data/manifest-variants.json +++ b/dev/data/manifest-variants.json @@ -123,7 +123,7 @@ "excludeFiles": [ "sw.js", "bg/js/simple-dom-parser.js", - "mixed/lib/parse5.js" + "lib/parse5.js" ] }, { @@ -148,7 +148,7 @@ "excludeFiles": [ "sw.js", "bg/js/simple-dom-parser.js", - "mixed/lib/parse5.js" + "lib/parse5.js" ] }, { @@ -220,7 +220,7 @@ "excludeFiles": [ "sw.js", "bg/js/simple-dom-parser.js", - "mixed/lib/parse5.js" + "lib/parse5.js" ] }, { @@ -256,7 +256,7 @@ "excludeFiles": [ "sw.js", "bg/js/simple-dom-parser.js", - "mixed/lib/parse5.js" + "lib/parse5.js" ] } ] diff --git a/dev/util.js b/dev/util.js index a0c35a9e..85a478ac 100644 --- a/dev/util.js +++ b/dev/util.js @@ -25,7 +25,7 @@ let JSZip = null; function getJSZip() { if (JSZip === null) { process.noDeprecation = true; // Suppress a warning about JSZip - JSZip = require(path.join(__dirname, '../ext/mixed/lib/jszip.min.js')); + JSZip = require(path.join(__dirname, '../ext/lib/jszip.min.js')); process.noDeprecation = false; } return JSZip; diff --git a/ext/background.html b/ext/background.html index 101bd09c..b1e82bd5 100644 --- a/ext/background.html +++ b/ext/background.html @@ -15,7 +15,7 @@ - + diff --git a/ext/mixed/lib/bootstrap/css/bootstrap-theme.css b/ext/lib/bootstrap/css/bootstrap-theme.css similarity index 100% rename from ext/mixed/lib/bootstrap/css/bootstrap-theme.css rename to ext/lib/bootstrap/css/bootstrap-theme.css diff --git a/ext/mixed/lib/bootstrap/css/bootstrap-theme.css.map b/ext/lib/bootstrap/css/bootstrap-theme.css.map similarity index 100% rename from ext/mixed/lib/bootstrap/css/bootstrap-theme.css.map rename to ext/lib/bootstrap/css/bootstrap-theme.css.map diff --git a/ext/mixed/lib/bootstrap/css/bootstrap-theme.min.css b/ext/lib/bootstrap/css/bootstrap-theme.min.css similarity index 100% rename from ext/mixed/lib/bootstrap/css/bootstrap-theme.min.css rename to ext/lib/bootstrap/css/bootstrap-theme.min.css diff --git a/ext/mixed/lib/bootstrap/css/bootstrap-theme.min.css.map b/ext/lib/bootstrap/css/bootstrap-theme.min.css.map similarity index 100% rename from ext/mixed/lib/bootstrap/css/bootstrap-theme.min.css.map rename to ext/lib/bootstrap/css/bootstrap-theme.min.css.map diff --git a/ext/mixed/lib/bootstrap/css/bootstrap.css b/ext/lib/bootstrap/css/bootstrap.css similarity index 100% rename from ext/mixed/lib/bootstrap/css/bootstrap.css rename to ext/lib/bootstrap/css/bootstrap.css diff --git a/ext/mixed/lib/bootstrap/css/bootstrap.css.map b/ext/lib/bootstrap/css/bootstrap.css.map similarity index 100% rename from ext/mixed/lib/bootstrap/css/bootstrap.css.map rename to ext/lib/bootstrap/css/bootstrap.css.map diff --git a/ext/mixed/lib/bootstrap/css/bootstrap.min.css b/ext/lib/bootstrap/css/bootstrap.min.css similarity index 100% rename from ext/mixed/lib/bootstrap/css/bootstrap.min.css rename to ext/lib/bootstrap/css/bootstrap.min.css diff --git a/ext/mixed/lib/bootstrap/css/bootstrap.min.css.map b/ext/lib/bootstrap/css/bootstrap.min.css.map similarity index 100% rename from ext/mixed/lib/bootstrap/css/bootstrap.min.css.map rename to ext/lib/bootstrap/css/bootstrap.min.css.map diff --git a/ext/mixed/lib/bootstrap/fonts/glyphicons-halflings-regular.eot b/ext/lib/bootstrap/fonts/glyphicons-halflings-regular.eot similarity index 100% rename from ext/mixed/lib/bootstrap/fonts/glyphicons-halflings-regular.eot rename to ext/lib/bootstrap/fonts/glyphicons-halflings-regular.eot diff --git a/ext/mixed/lib/bootstrap/fonts/glyphicons-halflings-regular.svg b/ext/lib/bootstrap/fonts/glyphicons-halflings-regular.svg similarity index 100% rename from ext/mixed/lib/bootstrap/fonts/glyphicons-halflings-regular.svg rename to ext/lib/bootstrap/fonts/glyphicons-halflings-regular.svg diff --git a/ext/mixed/lib/bootstrap/fonts/glyphicons-halflings-regular.ttf b/ext/lib/bootstrap/fonts/glyphicons-halflings-regular.ttf similarity index 100% rename from ext/mixed/lib/bootstrap/fonts/glyphicons-halflings-regular.ttf rename to ext/lib/bootstrap/fonts/glyphicons-halflings-regular.ttf diff --git a/ext/mixed/lib/bootstrap/fonts/glyphicons-halflings-regular.woff b/ext/lib/bootstrap/fonts/glyphicons-halflings-regular.woff similarity index 100% rename from ext/mixed/lib/bootstrap/fonts/glyphicons-halflings-regular.woff rename to ext/lib/bootstrap/fonts/glyphicons-halflings-regular.woff diff --git a/ext/mixed/lib/bootstrap/fonts/glyphicons-halflings-regular.woff2 b/ext/lib/bootstrap/fonts/glyphicons-halflings-regular.woff2 similarity index 100% rename from ext/mixed/lib/bootstrap/fonts/glyphicons-halflings-regular.woff2 rename to ext/lib/bootstrap/fonts/glyphicons-halflings-regular.woff2 diff --git a/ext/mixed/lib/bootstrap/js/bootstrap.js b/ext/lib/bootstrap/js/bootstrap.js similarity index 100% rename from ext/mixed/lib/bootstrap/js/bootstrap.js rename to ext/lib/bootstrap/js/bootstrap.js diff --git a/ext/mixed/lib/bootstrap/js/bootstrap.min.js b/ext/lib/bootstrap/js/bootstrap.min.js similarity index 100% rename from ext/mixed/lib/bootstrap/js/bootstrap.min.js rename to ext/lib/bootstrap/js/bootstrap.min.js diff --git a/ext/mixed/lib/bootstrap/js/npm.js b/ext/lib/bootstrap/js/npm.js similarity index 100% rename from ext/mixed/lib/bootstrap/js/npm.js rename to ext/lib/bootstrap/js/npm.js diff --git a/ext/mixed/lib/handlebars.min.js b/ext/lib/handlebars.min.js similarity index 100% rename from ext/mixed/lib/handlebars.min.js rename to ext/lib/handlebars.min.js diff --git a/ext/mixed/lib/jquery.min.js b/ext/lib/jquery.min.js similarity index 100% rename from ext/mixed/lib/jquery.min.js rename to ext/lib/jquery.min.js diff --git a/ext/mixed/lib/jszip.min.js b/ext/lib/jszip.min.js similarity index 100% rename from ext/mixed/lib/jszip.min.js rename to ext/lib/jszip.min.js diff --git a/ext/mixed/lib/parse5.js b/ext/lib/parse5.js similarity index 100% rename from ext/mixed/lib/parse5.js rename to ext/lib/parse5.js diff --git a/ext/mixed/lib/wanakana.min.js b/ext/lib/wanakana.min.js similarity index 100% rename from ext/mixed/lib/wanakana.min.js rename to ext/lib/wanakana.min.js diff --git a/ext/mixed/lib/wanakana.min.js.map b/ext/lib/wanakana.min.js.map similarity index 100% rename from ext/mixed/lib/wanakana.min.js.map rename to ext/lib/wanakana.min.js.map diff --git a/ext/popup-preview.html b/ext/popup-preview.html index 5a8da859..567dd201 100644 --- a/ext/popup-preview.html +++ b/ext/popup-preview.html @@ -34,7 +34,7 @@ - + diff --git a/ext/search.html b/ext/search.html index a949beff..e2c402bb 100644 --- a/ext/search.html +++ b/ext/search.html @@ -73,7 +73,7 @@ - + diff --git a/ext/settings-old.html b/ext/settings-old.html index aa20daf4..1fb4379f 100644 --- a/ext/settings-old.html +++ b/ext/settings-old.html @@ -11,8 +11,8 @@ - - + + @@ -1273,10 +1273,10 @@ - - - - + + + + diff --git a/ext/settings.html b/ext/settings.html index 6e35e818..5773c6de 100644 --- a/ext/settings.html +++ b/ext/settings.html @@ -3186,8 +3186,8 @@ - - + + diff --git a/ext/sw.js b/ext/sw.js index d18d367a..6516cdbf 100644 --- a/ext/sw.js +++ b/ext/sw.js @@ -16,8 +16,8 @@ */ self.importScripts( - '/mixed/lib/parse5.js', - '/mixed/lib/wanakana.min.js', + '/lib/parse5.js', + '/lib/wanakana.min.js', '/mixed/js/core.js', '/mixed/js/yomichan.js', '/mixed/js/environment.js', diff --git a/ext/template-renderer.html b/ext/template-renderer.html index 68cba889..6f031d5d 100644 --- a/ext/template-renderer.html +++ b/ext/template-renderer.html @@ -13,7 +13,7 @@ - + diff --git a/ext/welcome.html b/ext/welcome.html index d45bc914..a4138e60 100644 --- a/ext/welcome.html +++ b/ext/welcome.html @@ -312,7 +312,7 @@ - + diff --git a/test/test-japanese.js b/test/test-japanese.js index e784c142..e83b0c1b 100644 --- a/test/test-japanese.js +++ b/test/test-japanese.js @@ -21,7 +21,7 @@ const {VM} = require('../dev/vm'); const vm = new VM(); vm.execute([ - 'mixed/lib/wanakana.min.js', + 'lib/wanakana.min.js', 'mixed/js/japanese.js', 'bg/js/text-source-map.js' ]); diff --git a/test/test-sw.js b/test/test-sw.js index 5da80dd2..803bb0c2 100644 --- a/test/test-sw.js +++ b/test/test-sw.js @@ -37,7 +37,7 @@ function getAllHtmlScriptPaths(fileName) { function convertBackgroundScriptsToServiceWorkerScripts(scripts) { // Use parse5-based SimpleDOMParser - scripts.splice(0, 0, '/mixed/lib/parse5.js'); + scripts.splice(0, 0, '/lib/parse5.js'); const index = scripts.indexOf('/bg/js/native-simple-dom-parser.js'); assert.ok(index >= 0); scripts[index] = '/bg/js/simple-dom-parser.js'; @@ -65,7 +65,7 @@ function main() { vm.assert.deepStrictEqual(scripts, importedScripts); // Verify that eslint config lists files correctly - const expectedSwRulesFiles = scripts.filter((src) => !src.startsWith('/mixed/lib/')).map((src) => `${extDirName}${src}`); + const expectedSwRulesFiles = scripts.filter((src) => !src.startsWith('/lib/')).map((src) => `${extDirName}${src}`); const eslintConfig = JSON.parse(fs.readFileSync(path.join(rootDir, '.eslintrc.json'), {encoding: 'utf8'})); const swRules = eslintConfig.overrides.find((item) => ( typeof item.env === 'object' &&