mirror of
https://github.com/jesperh1/Return-Invidious-Dislike-Count.git
synced 2025-05-17 01:38:16 +01:00
Initialize Project
This commit is contained in:
parent
fdf317fbe9
commit
4bcab58741
10
README.md
10
README.md
@ -1,2 +1,8 @@
|
|||||||
# Return-Invidious-Dislike-Count-
|
# Return Invidious Dislike Count
|
||||||
Userscript to Return the Dislike button on invidious
|
Userscript to Return the Dislike button on Invidious.
|
||||||
|
|
||||||
|
Support for the most popular instances is already included, if yours isnt included just add it in '==UserScript==' with the grant option, like the other domains.
|
||||||
|
|
||||||
|
```
|
||||||
|
// @match https://yourdomain.com/watch?v=*
|
||||||
|
```
|
||||||
|
28
return-invidious-dislike.user.js
Normal file
28
return-invidious-dislike.user.js
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
// ==UserScript==
|
||||||
|
// @name Return Dislike Count Invidious
|
||||||
|
// @namespace https://github.com/jesperbakhandskemager/Return-Invidious-Dislike-Count
|
||||||
|
// @encoding utf-8
|
||||||
|
// @version 0.1
|
||||||
|
// @description Return the dislike count to Invidious
|
||||||
|
// @author Jesper Bak Handskemager
|
||||||
|
// @icon https://www.google.com/s2/favicons?domain=yewtu.be
|
||||||
|
// @downloadURL https://raw.githubusercontent.com/jesperbakhandskemager/Return-Invidious-Dislike-Count/master/return-invidious-dislike.user.js
|
||||||
|
// @updateURL https://raw.githubusercontent.com/jesperbakhandskemager/Return-Invidious-Dislike-Count/master/return-invidious-dislike.user.js
|
||||||
|
// @connect returnyoutubedislikeapi.com
|
||||||
|
// @include https://www.returnyoutubedislikeapi.com/*
|
||||||
|
// @grant GM.xmlHttpRequest
|
||||||
|
// @run-at document-end
|
||||||
|
// @match https://invidious.snopyta.org/watch?v=*
|
||||||
|
// ==/UserScript==
|
||||||
|
|
||||||
|
|
||||||
|
var video_data = JSON.parse(document.getElementById('video_data').innerHTML);
|
||||||
|
|
||||||
|
GM.xmlHttpRequest({
|
||||||
|
method: "GET",
|
||||||
|
url: "https://returnyoutubedislikeapi.com/votes?videoId=" + video_data.id,
|
||||||
|
onload: function(response) {
|
||||||
|
var data = JSON.parse(response.responseText);
|
||||||
|
document.getElementById("dislikes").innerHTML = "<i class='icon ion-ios-thumbs-down'></i> " + data.dislikes.toLocaleString('en-US');
|
||||||
|
}
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user