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:
authorFront <27463495+Frontesque@users.noreply.github.com>2021-12-02 02:10:11 +0300
committerGitHub <noreply@github.com>2021-12-02 02:10:11 +0300
commite001ac33109c3b7084805e914e7d4b894312f33e (patch)
tree9b05122034f925ba92915cb315916525e57e2510
parent696e7ce99648c4b3b72cc01863871914f41e5f45 (diff)
parente5fb92f1ecebecdb39fee2a8338e4cefbdf685c1 (diff)
Merge branch 'main' into main
-rw-r--r--Extensions/UserScript/Return Youtube Dislike.user.js4
-rw-r--r--Extensions/chrome/manifest.json2
-rw-r--r--Extensions/chrome/popup.html4
-rw-r--r--Extensions/chrome/return-youtube-dislike.background.js2
-rw-r--r--Extensions/firefox/manifest.json2
-rw-r--r--Extensions/firefox/popup.html1
-rw-r--r--Extensions/firefox/return-youtube-dislike.background.js2
-rw-r--r--Extensions/firefox/return-youtube-dislike.script.js49
8 files changed, 29 insertions, 37 deletions
diff --git a/Extensions/UserScript/Return Youtube Dislike.user.js b/Extensions/UserScript/Return Youtube Dislike.user.js
index a0a6df0..2768882 100644
--- a/Extensions/UserScript/Return Youtube Dislike.user.js
+++ b/Extensions/UserScript/Return Youtube Dislike.user.js
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Return YouTube Dislike
// @namespace https://www.returnyoutubedislike.com/
-// @version 0.5
+// @version 0.6
// @description Return of the YouTube Dislike, Based off https://www.returnyoutubedislike.com/
// @author Anarios & JRWR
// @match *://*.youtube.com/*
@@ -138,7 +138,7 @@ function setState() {
});
fetch(
- `https://return-youtube-dislike-api.azurewebsites.net/votes?videoId=${getVideoId()}`
+ `https://returnyoutubedislikeapi.com/votes?videoId=${getVideoId()}`
).then((response) => {
response.json().then((json) => {
if (json && !statsSet) {
diff --git a/Extensions/chrome/manifest.json b/Extensions/chrome/manifest.json
index c405b31..c67c22c 100644
--- a/Extensions/chrome/manifest.json
+++ b/Extensions/chrome/manifest.json
@@ -1,7 +1,7 @@
{
"name": "Return YouTube Dislike",
"description": "Returns ability to see dislikes",
- "version": "0.0.0.9",
+ "version": "1.0.0.2",
"manifest_version": 3,
"background": {
"service_worker": "return-youtube-dislike.background.js"
diff --git a/Extensions/chrome/popup.html b/Extensions/chrome/popup.html
index dea7246..903fb2f 100644
--- a/Extensions/chrome/popup.html
+++ b/Extensions/chrome/popup.html
@@ -15,8 +15,10 @@
<button id="link_github">GitHub</button>
<button id="link_discord">Discord</button>
- <br />
+ <br>
<button id="advancedToggle">Show Settings</button>
+ <br>
+
</center>
<fieldset id="advancedSettings">
diff --git a/Extensions/chrome/return-youtube-dislike.background.js b/Extensions/chrome/return-youtube-dislike.background.js
index 7fab216..e03be5b 100644
--- a/Extensions/chrome/return-youtube-dislike.background.js
+++ b/Extensions/chrome/return-youtube-dislike.background.js
@@ -1,4 +1,4 @@
-const apiUrl = "https://return-youtube-dislike-api.azurewebsites.net";
+const apiUrl = "https://returnyoutubedislikeapi.com";
// Security token causes issues if extension is reloaded/updated while several tabs are open
// const securityToken = Math.random().toString(36).substring(2, 15);
diff --git a/Extensions/firefox/manifest.json b/Extensions/firefox/manifest.json
index f01886e..cb35138 100644
--- a/Extensions/firefox/manifest.json
+++ b/Extensions/firefox/manifest.json
@@ -1,7 +1,7 @@
{
"name": "Return YouTube Dislike",
"description": "Returns ability to see dislikes",
- "version": "0.0.0.9",
+ "version": "1.0.0.2",
"manifest_version": 2,
"background": {
"scripts": ["return-youtube-dislike.background.js"]
diff --git a/Extensions/firefox/popup.html b/Extensions/firefox/popup.html
index 52592ef..dc8e4fb 100644
--- a/Extensions/firefox/popup.html
+++ b/Extensions/firefox/popup.html
@@ -19,6 +19,7 @@
<br>
<button id="advancedToggle">Show Settings</button>
+ <br>
</center>
diff --git a/Extensions/firefox/return-youtube-dislike.background.js b/Extensions/firefox/return-youtube-dislike.background.js
index 57d3ab4..315f890 100644
--- a/Extensions/firefox/return-youtube-dislike.background.js
+++ b/Extensions/firefox/return-youtube-dislike.background.js
@@ -1,4 +1,4 @@
-const apiUrl = "https://return-youtube-dislike-api.azurewebsites.net";
+const apiUrl = "https://returnyoutubedislikeapi.com";
browser.runtime.onMessage.addListener((request, sender, sendResponse) => {
if (request.message === "get_auth_token") {
diff --git a/Extensions/firefox/return-youtube-dislike.script.js b/Extensions/firefox/return-youtube-dislike.script.js
index a112c0d..ee259da 100644
--- a/Extensions/firefox/return-youtube-dislike.script.js
+++ b/Extensions/firefox/return-youtube-dislike.script.js
@@ -255,37 +255,26 @@ function createRateBar(likes, dislikes) {
}
}
-// function sendVideoIds() {
-// const ids = Array.from(
-// document.getElementsByClassName(
-// "yt-simple-endpoint ytd-compact-video-renderer"
-// )
-// )
-// .concat(
-// Array.from(
-// document.getElementsByClassName("yt-simple-endpoint ytd-thumbnail")
-// )
-// )
-// .filter((x) => x.href && x.href.indexOf("/watch?v=") > 0)
-// .map((x) => getVideoId(x.href));
-// browser.runtime.sendMessage({
-// message: "send_links",
-// videoIds: ids,
-// });
-// }
+function sendVideoIds() {
+ const ids = Array.from(
+ document.getElementsByClassName(
+ "yt-simple-endpoint ytd-compact-video-renderer"
+ )
+ )
+ .concat(
+ Array.from(
+ document.getElementsByClassName("yt-simple-endpoint ytd-thumbnail")
+ )
+ )
+ .filter((x) => x.href && x.href.indexOf("/watch?v=") > 0)
+ .map((x) => getVideoId(x.href));
+ browser.runtime.sendMessage({
+ message: "send_links",
+ videoIds: ids,
+ });
+}
setEventListeners();
-// document.addEventListener("yt-navigate-finish", function (event) {
-// if (jsInitChecktimer !== null) clearInterval(jsInitChecktimer);
-// window.returnDislikeButtonlistenersSet = false;
-// setEventListeners();
-// });
-
-// window.onscrollend = () => {
-// sendVideoIds();
-// };
-//
-// setTimeout(() => sendVideoIds(), 1500);
+setTimeout(() => sendVideoIds(), 1500);
-//window.addEventListener("hashchange", setEventListeners, false);