您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Replaces the dislike button text to views / likes
// ==UserScript== // @name Dislikes Reborn // @namespace http://tampermonkey.net/ // @version 0.2 // @description Replaces the dislike button text to views / likes // @author Tok1 // @license MIT // @match https://*.youtube.com/* // @grant none // @run-at document-end // ==/UserScript== (function() { 'use strict'; const $ = (s, x = document) => x.querySelector(s) setInterval(() => { const views = parseInt($('.view-count').textContent.split(" ")[0].replaceAll(String.fromCharCode(160), "")) // not a space const likes = parseInt($('.ytd-video-primary-info-renderer').children[5].children[2].children[0].children[0].children[0].children[0].children[0].children[1].innerText.replace(String.fromCharCode(160), "")) const ratio = Math.round(10*views/likes)/10 $('.ytd-video-primary-info-renderer').children[5].children[2].children[0].children[0].children[0].children[1].children[0].children[1].innerText = ratio }, 100) // Your code here... })();