您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
try to take over the world!
当前为
// ==UserScript== // @name ftv // @version 5.0.10 // @namespace http://tampermonkey.net/ // @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(){ // $("body").click(function(){$("div#items").append("<p>123123</p>");}); // var mysrc = $("#avatar").find("img#img").attr("src"); $("label#label").html(""); $("head").append("<style> .facee{cursor:pointer} </style>"); var myicon = "https://lh3.googleusercontent.com/-C87D_z2TchY/WfFuyoFy5XI/AAAAAAAAEUY/jxw1E4Cu-wICJmsoRFfq69vmNfzgj57SgCL0BGAs/s24-d-rw/me.gif"; //這裡自訂發言頭像網址 var idlength = 100; //這裡修改長ID預設長度 var msg1hg = "650"; //這裡修改主聊天室高度 var newmsg1hg ="650"; //新版聊天室高度 var msg2hg = "650" ; //這裡修改副聊天室高度 var msgcolor = "#000000"; //這裡修改留言的顏色 var msgbg = "#ffffff"; //這裡修改聊天室內背景色 var msgid = "#707070"; //這裡修改聊天室內ID顏色 var htm = "https://www.youtube.com/live_chat?is_popout=1&v=B2SbTqPobTo"; //這裡可以修改副聊天室網址 //========顏文字變數=============☆PS:需要新增的文字或顏文字,請勿使用(半形)["]跟[,]跟[/]否則會破壞陣列結構,欲新增請自行加入["",]例如 新增 (o o) 就寫成 ,"(o o)" 特別注意,中間不可以有(半形)空白~否則會斷掉!☆ var sp = [":awesome:","m(_ _)m","☮","凸^_^凸"]; //========常用句變數=============☆PS:需要新增的文字或顏文字,請勿使用(半形)["]跟[,]跟[/]否則會破壞陣列結構,欲新增請自行加入["",]例如 新增 (o o) 就寫成 ,"(o o)" 特別注意,中間不可以有(半形)空白~否則會斷掉!☆ var sp2= ["先來瓶雲碧解解渴??????youtube.com/watch?v=XAQ5lcaRjbk","聊天室過濾教學網址yee.updog.co"]; //========內建過濾=============== var bitch = "-ccnIoVz_htA=DYY "; //上面的bitch ="..."裡面...為內建名單 -ccnIoVz_htA=DYY <<可以自行修改~修改依據對方頭像(在對方頭像上按滑鼠右鍵=>檢查=>找it="xxxx")的[it]中間看以下範例 //it="-gHEhhkPbHN8"取[-gHEhhkPbHN8] //=================================== var pa00 = "https://"; var pa01 = "https://lh3.googleusercontent.com/-UFPoMRu_fOU/V-YFuyEkO4I/AAAAAAAAA78/yyyK_KG_z_k_j3muMa27IW4i-Dt7J1lLACL0B/w41-d-h14-rw/%25E6%2594%25AF%25E9%2582%25A3%25E7%258B%2597.gif"; var pc96 = ""; var pc97 = ""; var pc98 = ""; var pc99 = ""; setTimeout(function(){ /* $("#picker-buttons") .append("<img id='gifbtn' style='cursor:pointer' src='https://lh3.googleusercontent.com/-_MoGTTBxZNM/WSs-ajQcfuI/AAAAAAAADhE/j1vIWNqkBeEg_7_C9sDoVdyKcqMBtM21wCL0B/w25-d-h21-p-rw/gif.png'>"+ "<div id='gifdiv' style='height:300px;width:200px;border:1px solid #eee;display:none;overflow: auto;'>"+ "<img src='"+pa00+"' id='#a00' class='facee' >"+ "</div>");*/ // $("#gifbtn").click(function(){$("#gifdiv").toggle();}); $("span#author-name").after(" <span id='name_id'style='margin-left:15px;color:#fff;'></span>"); $(".facee").click(function(){ $("div#input").append($(this).attr("id"));$("div#input").focus().keydown(); $("yt-live-chat-text-input-field-renderer#input").attr("has-text","");}); $("ytd-live-chat-frame").css("height",newmsg1hg); $("#live-chat-iframe").css("height",msg1hg); $("div#contents").css({"background":msgbg}); $("#item-offset").attr("class",""); $("#item-offset").attr("style",""); $("#watch7-sidebar-contents").before("<div id='dragg' style='padding-top:5px;padding-bottom:15px;background:#123;color:#fff;position:relative;z-index:999;'> 按住此區塊可拖曳整個聊天室 "+ "<b><a href='https://greasyfork.org/zh-TW/scripts/33991-ftv' target='_blank' style='color:#FFF;border:1px solid #FFF;background:#663333'> 最新腳本連結點我 </a></b>"+ "<a href='https://www.facebook.com/ftvnews53/?hc_ref=NEWSFEED&fref=nf' target='_blank'>民視粉絲團</a><iframe id='if' src="+htm+" style='width:100%;height:"+msg2hg+"px;'></iframe></div>"); // $("#watch7-sidebar-contents").before("<div><iframe src='https://www.youtube.com/live_chat?is_popout=1&v=B2SbTqPobTo' style='width:100%;height:300px;'></iframe></div>"); $("#dragg").draggable(); $("div#items").attr("id","old").attr("class","old"); $("div#old").before("<div id='items' class='' ></div>"); $("div#old").hide(); $("#title").html(""); $("yt-live-chat-header-renderer").css({"padding":"0px"}); $("#primary-content").css({"margin":"0px"}); $("#title").append(" <select id='select_name'><option value=''>過濾名單</option></select><button id='save'>放</button><span style='font-size:8px;'> <button id='sp'>顏</button> <button id='sp2'>文</button> <button id='sp3' sc=''>捲</button>");//長ID</span><input type='text' value='"+idlength+"' id='idsize' style='font-size:8px;width:25px;'> $("#sp").after("<div id='sppage' style='overflow:auto;border:1px solid blue;height:400px;width:80%;position:absolute;left:60px;z-index:999;display:none;background:#fff;opacity:.8;font-size:small;'></div>"); for(var i=0;i<sp.length;i++){$("#sppage").append("<button class='face' alt="+sp[i]+">"+sp[i]+"</button>");} $("#sp2").after("<div id='sp2page' style='overflow:auto;border:1px solid red;height:400px;width:80%;position:absolute;left:60px;z-index:999;display:none;background:#fff;opacity:.8;font-size:small;'></div>"); for(var j=0;j<sp2.length;j++){$("#sp2page").append("<button class='face' alt="+sp2[j]+">"+sp2[j].substr(0,7)+"</button>");} $(".face").css({"cursor":"pointer","margin":"2px","background":"#ffffcc","border":".5px solid #426"}); $(".face").click(function(){ $("div#input").append($(this).attr("alt"));$("div#input").focus(); }); $(".face").mouseover(function(){ $(this).css({"opacity":".3"}); });$(".face").mouseleave(function(){ $(this).css({"opacity":"1"}); }); $("#sp").click(function(){ if($("#sppage").css("display") == "none"){ $("#sppage").show(100); $("#sp2page").hide(100); }else{ $("#sppage").hide(100); $("#sp2page").hide(100); } }); $("#sp2").click(function(){ if($("#sp2page").css("display") == "none"){ $("#sp2page").show(100); $("#sppage").hide(100); }else{ $("#sppage").hide(100); $("#sp2page").hide(100); } }); //$("#test").click(function(){ document.execCommand("Open"); alert("213");}); //$("#sp3").attr("alt","").attr("title","點擊(鎖定/解鎖)捲動軸").css({"cursor":"pointer"}); $("#sp3").click(function(){ if($(this).attr("sc") === ""){ $(this).attr("sc","1"); }else if($(this).attr("sc") === "1"){ $(this).attr("sc",""); } }); },1000); function start(){ $(".old").children("yt-live-chat-text-message-renderer").each(function(){ var me = String($(this).find("yt-img-shadow").attr("class").match("empty")); //console.log(me); var liid = $(this).attr("id").substr(0,25); var liscr = $(this).find("img#img").attr("src"); var liit = String($(this).find("img#img").attr("src")).substr(22,12); // console.log( liit); var nt30 = $(this).find("div#purchase-amount").html(); /*-------------------GIF區段----------------------- $(this).find("span#message") .html($(this).find("span#message").html() .replace(/#a01/g,"<img src='"+pa01+"'>") );*/ // console.log("["+$(this).find("span#author-name").html()+"]的ID合計["+str4+"]字元"); var mt = "-KD6Kd99cj_k"; var cname = $(this).find("#author-name").text(); var chat = $(this).find("#message").html(); if(me == "empty"){ $("div#items").append("<table class='"+liit+" yt-live-chat-text-message-renderer-0' ><td><img title='點擊頭像過濾' id='"+liid+"' it="+liit+" class='img' in='"+cname+"' style='width:26px;height:26px;cursor:pointer;border-radius:13px;margin-right:8px;' src='"+myicon+"' onclick='$('#select_name').hide();'></td><td><span style='color:"+msgid+";padding-right:5px;' mt="+liit+" class='mtclass'>"+cname+"</span><span style='color:"+msgcolor+";' id='message' class='yt-live-chat-text-message-renderer'>"+chat+"</span></td></table>"); } if(liit != $("#select_name").html().match(liit) && liit != bitch.match(liit)){ if(liit != mt){ if(liit =="-1OE4ocXVqlw"){cname = "支那賤賣";} $("div#items").append("<table class='"+liit+" yt-live-chat-text-message-renderer-0' ><td><img title='點擊頭像過濾' id='"+liid+"' it="+liit+" class='img' in='"+cname+"' style='width:26px;height:26px;cursor:pointer;border-radius:13px;margin-right:8px;' src='"+liscr+"' onclick='$('#select_name').hide();'></td><td><span style='color:"+msgid+";padding-right:5px;' mt="+liit+" class='mtclass'>"+cname+"</span><span style='color:"+msgcolor+";' id='message' class='yt-live-chat-text-message-renderer'>"+chat+"</span></td></table>"); }else{ $("div#items").append("<table class='"+liit+" yt-live-chat-text-message-renderer-0' ><td><img title='點擊頭像過濾' id='"+liid+"' it="+liit+" class='img' in='"+cname+"' style='width:32px;height:32px;cursor:pointer;border-radius:13px;margin-right:8px;' src='"+liscr+"' onclick='$('#select_name').hide();'></td><td><span style='color:#5573e5;padding-right:5px;' mt="+liit+" class='mtclass'><img src='https://lh3.googleusercontent.com/-blbj4qkA8V4/WSuyDKFFmwI/AAAAAAAADkQ/YRj_I0Q89ogeDyyxFKOwI00-qeNPDrv4wCL0B/w16-d-h15-rw/ma.gif'>"+cname+"</span><span style='color:"+msgcolor+";' id='message' class='yt-live-chat-text-message-renderer'>"+chat+"</span></td></table>"); } $("[it='"+liit+"']:last").click(function(){ $("#select_name").append("<option class='save' it='"+$(this).attr("it")+"' value='"+$(this).attr("id")+"' id='"+$(this).attr("id")+"'>"+$(this).attr("in").substr(0,4)+"</option>"); //$(this).parents("table").remove(); $("[it='"+liit+"']").parents("table").remove(); }); $("[mt='"+liit+"']:last").click(function(){ $("div#input").append($(this).html()); $("#name_id").html(""); $("#name_id").html(" "+$(this).attr("mt"));}); $("#save").click(function(){ $("#"+$("#select_name").val()).remove(); }); $(".img").mouseover(function(){ $(this).css({"opacity":".2"}); }); $(".img").mouseleave(function(){ $(this).css({"opacity":"1"}); }); $(this).remove(); }else{ $(this).remove(); } // $(".mtclass").each(function(){ if($(this).attr("mt") == mt){$(this).css({"color":"#5573e5"}); } }); $(".img").each(function(){ var my =$("img#avatar").attr("src"); if($(this).attr("src").substr(0,4) == "data"){$(this).attr("src",my);} }); }); var say = $("div#items").children("table").size(); if(say>200){ while(say>200){ $("div#items").children("table").first().remove(); say--; } } } setInterval(function(){ var oldli = $(".old").children("yt-live-chat-text-message-renderer").size(); if(oldli>0){ start(); } if($("#sp3").attr("sc") === ""){ $("div#item-scroller").scrollTop(1700000);} },500); });