您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Return the dislike count to Invidious
当前为
- // ==UserScript==
- // @name Return Dislike Count Invidious
- // @namespace https://github.com/jesperbakhandskemager/Return-Invidious-Dislike-Count
- // @encoding utf-8
- // @version 0.2
- // @license unlicense
- // @description Return the dislike count to Invidious
- // @author Jesper Bak Handskemager
- // @icon https://www.google.com/s2/favicons?domain=yewtu.be
- // @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');
- document.getElementById("rating").innerHTML = "Rating: " + Math.round(data.rating * 10) / 10 + " / 5";
- }
- });