mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-11-27 16:37:57 +01:00
Removed old files, temporary disabled webpack because it was not working
This commit is contained in:
1 parent
f1daa81686
commit
1d33b7c5a2
30 files changed
+13935
-2115
No files matched your search
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "Return YouTube Dislike",
|
||||
"description": "Returns ability to see dislikes",
|
||||
"version": "2.0.0.3",
|
||||
"manifest_version": 2,
|
||||
"background": {
|
||||
"scripts": ["ryd.background.js"]
|
||||
},
|
||||
"icons": {
|
||||
"48": "icons/icon48.png",
|
||||
"128": "icons/icon128.png"
|
||||
},
|
||||
"permissions": ["activeTab", "*://*.youtube.com/*", "storage"],
|
||||
"browser_action": {
|
||||
"default_popup": "popup.html"
|
||||
},
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": ["*://*.youtube.com/*"],
|
||||
"exclude_matches": ["*://*.music.youtube.com/*"],
|
||||
"run_at": "document_idle",
|
||||
"css": ["content-style.css"],
|
||||
"js": ["ryd.content-script.js"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,27 +1,41 @@
|
||||
{
|
||||
"name": "Return YouTube Dislike",
|
||||
"description": "Returns ability to see dislikes",
|
||||
"version": "2.0.0.2",
|
||||
"manifest_version": 2,
|
||||
"version": "2.0.0.3",
|
||||
"manifest_version": 3,
|
||||
"background": {
|
||||
"scripts": ["ryd.background.js"]
|
||||
"service_worker": "ryd.background.js"
|
||||
},
|
||||
"icons": {
|
||||
"48": "icons/icon48.png",
|
||||
"128": "icons/icon128.png"
|
||||
"128": "icons/icon128.png"
|
||||
},
|
||||
"permissions": ["activeTab", "*://*.youtube.com/*", "storage"],
|
||||
"browser_action": {
|
||||
"host_permissions": ["*://*.youtube.com/*"],
|
||||
"permissions": [
|
||||
"storage"
|
||||
],
|
||||
"action": {
|
||||
"default_popup": "popup.html"
|
||||
},
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": ["*://*.youtube.com/*"],
|
||||
"matches": [
|
||||
"*://youtube.com/*",
|
||||
"*://www.youtube.com/*",
|
||||
"*://m.youtube.com/*"
|
||||
],
|
||||
"exclude_matches": ["*://*.music.youtube.com/*"],
|
||||
"run_at": "document_idle",
|
||||
"css": ["content-style.css"],
|
||||
"js": ["bundled-content-script.js"]
|
||||
"js": ["ryd.content-script.js"],
|
||||
"css": ["content-style.css"]
|
||||
}
|
||||
],
|
||||
"externally_connectable": {
|
||||
"matches": ["*://*.youtube.com/*"]
|
||||
},
|
||||
"web_accessible_resources": [
|
||||
{
|
||||
"resources": ["ryd.script.js"],
|
||||
"matches": ["*://*.youtube.com/*"]
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
{
|
||||
"name": "Return YouTube Dislike",
|
||||
"description": "Returns ability to see dislikes",
|
||||
"version": "2.0.0.2",
|
||||
"manifest_version": 3,
|
||||
"background": {
|
||||
"service_worker": "ryd.background.js"
|
||||
},
|
||||
"icons": {
|
||||
"48": "icons/icon48.png",
|
||||
"128": "icons/icon128.png"
|
||||
},
|
||||
"host_permissions": ["*://*.youtube.com/*"],
|
||||
"permissions": [
|
||||
"storage"
|
||||
],
|
||||
"action": {
|
||||
"default_popup": "popup.html"
|
||||
},
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": [
|
||||
"*://youtube.com/*",
|
||||
"*://www.youtube.com/*",
|
||||
"*://m.youtube.com/*"
|
||||
],
|
||||
"exclude_matches": ["*://*.music.youtube.com/*"],
|
||||
"js": ["bundled-content-script.js"],
|
||||
"css": ["content-style.css"]
|
||||
}
|
||||
],
|
||||
"externally_connectable": {
|
||||
"matches": ["*://*.youtube.com/*"]
|
||||
},
|
||||
"web_accessible_resources": [
|
||||
{
|
||||
"resources": ["ryd.script.js"],
|
||||
"matches": ["*://*.youtube.com/*"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -60,7 +60,8 @@ api.runtime.onMessage.addListener((request, sender, sendResponse) => {
|
||||
async function sendVote(videoId, vote) {
|
||||
api.storage.sync.get(null, async (storageResult) => {
|
||||
if (!storageResult.userId || !storageResult.registrationConfirmed) {
|
||||
register().then(() => sendVote(videoId, vote));
|
||||
await register();
|
||||
return;
|
||||
}
|
||||
fetch(`${apiUrl}/interact/vote`, {
|
||||
method: "POST",
|
||||
@@ -73,7 +74,14 @@ async function sendVote(videoId, vote) {
|
||||
value: vote,
|
||||
}),
|
||||
})
|
||||
.then((response) => response.json())
|
||||
.then(async (response) => {
|
||||
if (response.status == 401) {
|
||||
await register();
|
||||
await sendVote(videoId, vote);
|
||||
return;
|
||||
}
|
||||
return response.json()
|
||||
})
|
||||
.then((response) => {
|
||||
solvePuzzle(response).then((solvedPuzzle) => {
|
||||
fetch(`${apiUrl}/interact/confirmVote`, {
|
||||
@@ -123,7 +131,7 @@ function register() {
|
||||
}
|
||||
|
||||
api.storage.sync.get(null, (res) => {
|
||||
if (!res.userId || !res.registrationConfirmed) {
|
||||
if (!res || !res.userId || !res.registrationConfirmed) {
|
||||
register();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -26,12 +26,12 @@ function RYD() {
|
||||
if (isMobile()) {
|
||||
return document.querySelector(".slim-video-action-bar-actions");
|
||||
}
|
||||
//--- If Menu Element Is Displayed: ---//
|
||||
// If Menu Element Is Displayed:
|
||||
if (document.getElementById("menu-container")?.offsetParent === null) {
|
||||
return document.querySelector(
|
||||
"ytd-menu-renderer.ytd-watch-metadata > div"
|
||||
);
|
||||
//--- If Menu Element Isnt Displayed: ---//
|
||||
// If Menu Element Isnt Displayed:
|
||||
} else {
|
||||
return document
|
||||
.getElementById("menu-container")
|
||||
|
||||
Reference in new issue
Block a user