mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-12-03 11:21:20 +01:00
Merge branch 'main' into main
This commit is contained in:
8 files changed
+29
-37
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Return YouTube Dislike
|
// @name Return YouTube Dislike
|
||||||
// @namespace https://www.returnyoutubedislike.com/
|
// @namespace https://www.returnyoutubedislike.com/
|
||||||
// @version 0.5
|
// @version 0.6
|
||||||
// @description Return of the YouTube Dislike, Based off https://www.returnyoutubedislike.com/
|
// @description Return of the YouTube Dislike, Based off https://www.returnyoutubedislike.com/
|
||||||
// @author Anarios & JRWR
|
// @author Anarios & JRWR
|
||||||
// @match *://*.youtube.com/*
|
// @match *://*.youtube.com/*
|
||||||
@@ -138,7 +138,7 @@ function setState() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
fetch(
|
fetch(
|
||||||
`https://return-youtube-dislike-api.azurewebsites.net/votes?videoId=${getVideoId()}`
|
`https://returnyoutubedislikeapi.com/votes?videoId=${getVideoId()}`
|
||||||
).then((response) => {
|
).then((response) => {
|
||||||
response.json().then((json) => {
|
response.json().then((json) => {
|
||||||
if (json && !statsSet) {
|
if (json && !statsSet) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Return YouTube Dislike",
|
"name": "Return YouTube Dislike",
|
||||||
"description": "Returns ability to see dislikes",
|
"description": "Returns ability to see dislikes",
|
||||||
"version": "0.0.0.9",
|
"version": "1.0.0.2",
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"background": {
|
"background": {
|
||||||
"service_worker": "return-youtube-dislike.background.js"
|
"service_worker": "return-youtube-dislike.background.js"
|
||||||
|
|||||||
@@ -15,8 +15,10 @@
|
|||||||
<button id="link_github">GitHub</button>
|
<button id="link_github">GitHub</button>
|
||||||
<button id="link_discord">Discord</button>
|
<button id="link_discord">Discord</button>
|
||||||
|
|
||||||
<br />
|
<br>
|
||||||
<button id="advancedToggle">Show Settings</button>
|
<button id="advancedToggle">Show Settings</button>
|
||||||
|
<br>
|
||||||
|
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
<fieldset id="advancedSettings">
|
<fieldset id="advancedSettings">
|
||||||
|
|||||||
@@ -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
|
// Security token causes issues if extension is reloaded/updated while several tabs are open
|
||||||
// const securityToken = Math.random().toString(36).substring(2, 15);
|
// const securityToken = Math.random().toString(36).substring(2, 15);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Return YouTube Dislike",
|
"name": "Return YouTube Dislike",
|
||||||
"description": "Returns ability to see dislikes",
|
"description": "Returns ability to see dislikes",
|
||||||
"version": "0.0.0.9",
|
"version": "1.0.0.2",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"background": {
|
"background": {
|
||||||
"scripts": ["return-youtube-dislike.background.js"]
|
"scripts": ["return-youtube-dislike.background.js"]
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
<button id="advancedToggle">Show Settings</button>
|
<button id="advancedToggle">Show Settings</button>
|
||||||
|
<br>
|
||||||
|
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
|
|||||||
@@ -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) => {
|
browser.runtime.onMessage.addListener((request, sender, sendResponse) => {
|
||||||
if (request.message === "get_auth_token") {
|
if (request.message === "get_auth_token") {
|
||||||
|
|||||||
@@ -255,37 +255,26 @@ function createRateBar(likes, dislikes) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// function sendVideoIds() {
|
function sendVideoIds() {
|
||||||
// const ids = Array.from(
|
const ids = Array.from(
|
||||||
// document.getElementsByClassName(
|
document.getElementsByClassName(
|
||||||
// "yt-simple-endpoint ytd-compact-video-renderer"
|
"yt-simple-endpoint ytd-compact-video-renderer"
|
||||||
// )
|
)
|
||||||
// )
|
)
|
||||||
// .concat(
|
.concat(
|
||||||
// Array.from(
|
Array.from(
|
||||||
// document.getElementsByClassName("yt-simple-endpoint ytd-thumbnail")
|
document.getElementsByClassName("yt-simple-endpoint ytd-thumbnail")
|
||||||
// )
|
)
|
||||||
// )
|
)
|
||||||
// .filter((x) => x.href && x.href.indexOf("/watch?v=") > 0)
|
.filter((x) => x.href && x.href.indexOf("/watch?v=") > 0)
|
||||||
// .map((x) => getVideoId(x.href));
|
.map((x) => getVideoId(x.href));
|
||||||
// browser.runtime.sendMessage({
|
browser.runtime.sendMessage({
|
||||||
// message: "send_links",
|
message: "send_links",
|
||||||
// videoIds: ids,
|
videoIds: ids,
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
setEventListeners();
|
setEventListeners();
|
||||||
|
|
||||||
// document.addEventListener("yt-navigate-finish", function (event) {
|
setTimeout(() => sendVideoIds(), 1500);
|
||||||
// if (jsInitChecktimer !== null) clearInterval(jsInitChecktimer);
|
|
||||||
// window.returnDislikeButtonlistenersSet = false;
|
|
||||||
// setEventListeners();
|
|
||||||
// });
|
|
||||||
|
|
||||||
// window.onscrollend = () => {
|
|
||||||
// sendVideoIds();
|
|
||||||
// };
|
|
||||||
//
|
|
||||||
// setTimeout(() => sendVideoIds(), 1500);
|
|
||||||
|
|
||||||
//window.addEventListener("hashchange", setEventListeners, false);
|
|
||||||
Reference in new issue
Block a user