Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Anarios/return-youtube-dislike.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitrii Selivanov <selivano.d@gmail.com>2021-12-27 13:32:04 +0300
committerGitHub <noreply@github.com>2021-12-27 13:32:04 +0300
commit78527ad47a34aaed597a6a6719bb1e63a1cddd58 (patch)
tree8176d5d917a577cdf4991090b6dc3340c53511c5
parent2475a701a4e4be29f1de34e7b45cc2da40e73cda (diff)
parente313db4e77810a17120af3e1f1794116e9beca18 (diff)
Merge pull request #372 from Frontesque/main
Fix warnings during compile
-rw-r--r--.gitignore7
-rw-r--r--Extensions/combined/readme.md16
-rw-r--r--Extensions/combined/ryd.content-script.js6
-rw-r--r--package-lock.json1
-rw-r--r--package.json5
5 files changed, 31 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 85f9dce..d0c5794 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
*cert
*Backend
.DS_Store
+package-lock.json
# Website node modules and build output
Website/package-lock.json
@@ -31,4 +32,8 @@ yarn-error.log*
node_modules
# Build files
-Extensions/combined/bundled-content-script.js \ No newline at end of file
+Extensions/combined/bundled-content-script.js
+
+# Dist Files
+Extensions/combined/dist/*
+package-lock.json
diff --git a/Extensions/combined/readme.md b/Extensions/combined/readme.md
new file mode 100644
index 0000000..ee827c0
--- /dev/null
+++ b/Extensions/combined/readme.md
@@ -0,0 +1,16 @@
+# Extension Source
+## Guide to Compiling
+
+## Compiling to Development (Testing)
+<ol>
+ <li>Go to the root directory of the project</li>
+ <li>Run <code>npm i</code> to install all project dependancies (if not done so already)</li>
+ <li>run <code>npm run dev</code> to compile the extension to the <code>~/Extensions/combined/dist/</code> folder.</li>
+</ol>
+
+## Compiling to Production (Final Release)
+<ol>
+ <li>Go to the root directory of the project</li>
+ <li>Run <code>npm i</code> to install all project dependancies (if not done so already)</li>
+ <li>run <code>npm run build</code> to compile the extension to the <code>~/Extensions/combined/dist/</code> folder.</li>
+</ol>
diff --git a/Extensions/combined/ryd.content-script.js b/Extensions/combined/ryd.content-script.js
index d1bd9b5..3614fe3 100644
--- a/Extensions/combined/ryd.content-script.js
+++ b/Extensions/combined/ryd.content-script.js
@@ -1,9 +1,12 @@
+//--- Import Button Functions ---//
import {
getButtons,
getLikeButton,
getDislikeButton,
checkForSignInButton,
} from "./src/buttons";
+
+//--- Import State Functions ---//
import {
isMobile,
isVideoDisliked,
@@ -19,10 +22,13 @@ import {
NEUTRAL_STATE,
initExtConfig,
} from "./src/state";
+
+//--- Import Video & Browser Functions ---//
import { numberFormat, getBrowser, getVideoId, isVideoLoaded, cLog } from "./src/utils";
import { createRateBar } from "./src/bar";
import { sendVideoIds, sendVote, likeClicked, dislikeClicked, addLikeDislikeEventListener, storageChangeHandler } from "./src/events"
+
initExtConfig()
let jsInitChecktimer = null;
diff --git a/package-lock.json b/package-lock.json
index 4126809..a3efdd0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5,7 +5,6 @@
"requires": true,
"packages": {
"": {
- "name": "return-youtube-dislike",
"version": "2.0.0",
"devDependencies": {
"@babel/core": "^7.16.5",
diff --git a/package.json b/package.json
index 07388b7..276e730 100644
--- a/package.json
+++ b/package.json
@@ -4,8 +4,9 @@
"description": "Chrome extension to return youtube dislikes",
"main": "ryd.content-script.js",
"scripts": {
- "start": "webpack \"./Extensions/combined/ryd.content-script.js\" -o \"./Extensions/combined/dist/\" --watch",
- "build": "webpack \"./Extensions/combined/ryd.content-script.js\" -o \"./Extensions/combined\"",
+ "start": "echo To build for development, please use \"npm run dev\". To build for production, please use \"npm run build\".",
+ "dev": "webpack --mode=development \"./Extensions/combined/ryd.content-script.js\" -o \"./Extensions/combined/dist/\" --watch",
+ "build": "webpack --mode=production \"./Extensions/combined/ryd.content-script.js\" -o \"./Extensions/combined\"",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {