mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-10-27 23:30:15 +01:00
implement webpack and create scripts to bundle source
This commit is contained in:
+3
-1
@@ -26,4 +26,6 @@ yarn-error.log*
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw*
|
||||
*.sw*
|
||||
|
||||
node_modules
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
RYD.getInstance().init();
|
||||
|
||||
@@ -25,8 +25,9 @@
|
||||
"*://m.youtube.com/*"
|
||||
],
|
||||
"exclude_matches": ["*://*.music.youtube.com/*"],
|
||||
"js": ["ryd.content-script.js", "ryd.tools.js", "/init/init.js"],
|
||||
"css": ["content-style.css"]
|
||||
"run_at": "document_idle",
|
||||
"css": ["content-style.css"],
|
||||
"js": ["bundled-content-script.js"]
|
||||
}
|
||||
],
|
||||
"externally_connectable": {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"exclude_matches": ["*://*.music.youtube.com/*"],
|
||||
"run_at": "document_idle",
|
||||
"css": ["content-style.css"],
|
||||
"js": ["ryd.content-script.js", "ryd.tools.js", "/init/init.js"]
|
||||
"js": ["bundled-content-script.js"]
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@@ -375,3 +375,21 @@ RYD.getInstance = function () {
|
||||
if (typeof RYD.instance == "undefined") RYD.instance = new RYD();
|
||||
return RYD.instance;
|
||||
};
|
||||
|
||||
RYDTools = {};
|
||||
|
||||
RYDTools.getBrowser = function () {
|
||||
if (typeof chrome !== "undefined" && typeof chrome.runtime !== "undefined") {
|
||||
return chrome;
|
||||
} else if (
|
||||
typeof browser !== "undefined" &&
|
||||
typeof browser.runtime !== "undefined"
|
||||
) {
|
||||
return browser;
|
||||
} else {
|
||||
console.log("browser is not supported");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
RYD.getInstance().init();
|
||||
@@ -1,17 +1,2 @@
|
||||
RYDTools = {};
|
||||
|
||||
RYDTools.getBrowser = function () {
|
||||
if (typeof chrome !== "undefined" && typeof chrome.runtime !== "undefined") {
|
||||
return chrome;
|
||||
} else if (
|
||||
typeof browser !== "undefined" &&
|
||||
typeof browser.runtime !== "undefined"
|
||||
) {
|
||||
return browser;
|
||||
} else {
|
||||
console.log("browser is not supported");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
Generated
+3668
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "return-youtube-dislike",
|
||||
"version": "2.0.0",
|
||||
"description": "Chrome extension to return youtube dislikes",
|
||||
"main": "ryd.content-script.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"bundle": "node_modules/.bin/webpack \"./Extensions/combined/ryd.content-script.js\" -o \"./Extensions/combined\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Anarios/return-youtube-dislike.git"
|
||||
},
|
||||
"keywords": [
|
||||
"youtube",
|
||||
"dislike",
|
||||
"return",
|
||||
"extension"
|
||||
],
|
||||
"author": "Anarios",
|
||||
"bugs": {
|
||||
"url": "https://github.com/Anarios/return-youtube-dislike/issues"
|
||||
},
|
||||
"homepage": "https://github.com/Anarios/return-youtube-dislike#readme",
|
||||
"devDependencies": {
|
||||
"babel-loader": "^8.2.3",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"babel-register": "^6.26.0",
|
||||
"webpack": "^5.65.0",
|
||||
"webpack-cli": "^4.9.1",
|
||||
"webpack-dev-server": "^4.6.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
console.log(path.resolve(__dirname, "Extensions/combined"))
|
||||
@@ -0,0 +1,13 @@
|
||||
const path = require("path");
|
||||
|
||||
module.exports = {
|
||||
entry: path.join(__dirname, "./Extensions/combined/ryd.content-script.js"),
|
||||
output: {
|
||||
filename: "bundled-content-script.js",
|
||||
path: path.resolve(__dirname, "Extensions/combined"),
|
||||
},
|
||||
externals: {
|
||||
ramda: "R",
|
||||
},
|
||||
module: {},
|
||||
};
|
||||
Reference in New Issue
Block a user