您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
try to take over the world!
当前为
// ==UserScript== // @name ftv // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match https://www.youtube.com/* // @require http://code.jquery.com/jquery-2.1.4.min.js // @require https://code.jquery.com/ui/1.12.1/jquery-ui.js // @grant none // ==/UserScript== $(document).ready(function(){ add(); $("#primary-content").append("<button id='listbtn'>List</button>"); $("body").append("<div id='list' style='border:1px #000 solid;font-size:small;display:block;position:absolute;right:0px;z-index:999;background:#fff;'></div>"); $("#listbtn").click(function(){$("#list").toggle(500);}); $("div#items").on("DOMNodeInserted",function(e){ if(e.target.id == "message"){ add(); } }); function add(){ $("yt-live-chat-text-message-renderer").find("img").each(function(){ if(!$(this).attr("new")){ $(this).css("cursor","pointer").attr("new","o").attr("it",$(this).attr("src").substr(22,6)); $(this).on("click",function(){ $("#list").append($(this).attr("it")+"【"); $("#list").append($(this).parents("yt-live-chat-text-message-renderer").find("#author-name").html()+"】<br>"); $("[it='"+$(this).attr("it")+"']").parents("yt-live-chat-text-message-renderer").hide(); }); } if($("#list").text().match(String($(this).attr("it")))){ $(this).parents("yt-live-chat-text-message-renderer").hide(); } }); } });