RoomAssistant
สคริปต์นี้ไม่ควรถูกติดตั้งโดยตรง มันเป็นคลังสำหรับสคริปต์อื่น ๆ เพื่อบรรจุด้วยคำสั่งเมทา // @require https://update.greasyfork.org/scripts/382906/709952/XiaoJieRoomAssistant.js
var $=window.jQuery;var x,y;var dragFlag=false,sighInFlag=true,giftFlag=true,activateFlag=false,loopFlag=false,qfFlag=false,closeFlag=false;var lastText="",loopText="",text="",lastLog="";var nickname=decodeURI(getCookie('acf_nickname'));var lastGiftNum=0,giftNum=0,lastBetCount=-1,betSelect,ywSelected,color,giftStatusCheck,giftOpen,qf,exqf,creditInterval,chatSendClick;var mapsJSON,creditJSON,onlineJSON;var fullTailText=GM_getValue('fullTailText',''),tailFlag=1;var lastCredit=GM_getValue('lastCredit',-1),lastMaxCredit=GM_getValue('lastMaxCredit',-1),myCredit=GM_getValue('myCredit',-1);var log=GM_getValue('log','');var year,month,date,h,m,s,now,nowYMD,nowHMS;var roomStatus=GM_getValue('lastRoomStatus',0),lastRoomStatus=GM_getValue('lastRoomStatus',-1);var notifyText;var loopInterval,intervalTime=3000;var pathName=window.location.pathname;var height;var checkMapsR###lt="",checkCount=GM_getValue('checkCount',2);var a=0,b=0,c=0,d=0;var div=document.createElement('div');var hideGiftToolbarFlag=GM_getValue('hideGiftToolbarFlag',true),chatBoxCleaningFlag=GM_getValue('chatBoxCleaningFlag',true);const MutationObserver=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;var observerChatBoxCleaning=new MutationObserver(function(){$('.Barrage-list .Barrage-nickName').prevAll().hide();$(".layout-Player-announce").hide();$(".layout-Player-rank ").hide();$(".ChatRank-rankWraper").hide();$(".layout-Player-barrage").css('top','0px')});var observerHideGiftToolbar=new MutationObserver(function(){$("div[class*='PlayerToolbar-GiftWrap']").hide()});var observerRemoveAD=new MutationObserver(function(){removeAD()});div.setAttribute('id','newDiv');div.style.setProperty('position','fixed');div.style.setProperty('height',height+'px');div.style.setProperty('width','258px');div.style.setProperty('background','rgba(155, 155, 155, 0.8)');div.style.setProperty('left','3%');div.style.setProperty('top','10%');div.style.setProperty('border','1px solid #96c2f1');div.style.setProperty('z-index','9999');div.style.setProperty('box-shadow','0 1px 5px 4px #888888');div.innerHTML=unescape('%3Csection%20id%3D%22drag%22%20readonly%3D%22value%22%20style%3D%22background%3Awhite%22%3E%0A%20%20%3Cp%20style%3D%22font-weight%3A%20bold%3Bheight%3A%2030px%3Btext-align%3A%20left%3Bmargin-left%3A%207px%3Bmargin-right%3A%207px%3B%22%3E%3Ca%20href%3D%22https%3A//www.douyu.com/74751%22%3B%3E%u8D85%u7EA7%u5C0F%u6840%3C/a%3E%u623F%u95F4%u5C0F%u52A9%u624B%0A%20%20%20%20%3Cspan%20id%3D%22online%22%3E%u83B7%u53D6%u4E2D%3C/span%3E%0A%20%20%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_minimized%22%20style%3D%22width%3A%2024px%3Bmargin-top%3A%204px%3B%22value%3D%22%u2796%22title%3D%22%u6700%u5C0F%u5316%22%3E%0A%20%20%20%20%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_donate%22%20style%3D%22width%3A%2060px%3Bmargin-top%3A%204px%3Bfont-weight%3A%20bold%3Bcolor%3Ared%3Bfloat%3A%20right%3B%22%20value%3D%22%u652F%u6301%u4E00%u4E0B%22%20%3B%3E%3C/p%3E%0A%3C/section%3E%0A%3Csection%20id%3D%22fnhide%22%20style%3D%22margin-top%3A%205px%3Bmargin-left%3A%207px%3Bmargin-right%3A%207px%3B%22%3E%0A%20%20%3Cp%20style%3D%22height%3A%2022px%3B%22%3E%0A%20%20%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22hidecredit%22%20style%3D%22height%3A17px%3Bwidth%3A17px%3Bvertical-align%3A%20middle%3B%22%20checked%3D%22checked%22%3E%26nbsp%3B%u4E2A%u4EBA%u4FE1%u606F%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%0A%20%20%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22hidemaps%22%20style%3D%22margin-left%3A%207xp%3Bheight%3A17px%3Bwidth%3A17px%3Bvertical-align%3A%20middle%3B%22%20checked%3D%22checked%22%3E%26nbsp%3B%u5730%u56FE%u4FE1%u606F%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%0A%20%20%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22hideinstructions%22%20style%3D%22margin-left%3A%207xp%3Bheight%3A17px%3Bwidth%3A17px%3Bvertical-align%3A%20middle%3B%22%20checked%3D%22checked%22%3E%26nbsp%3B%u79EF%u5206%u6307%u4EE4%3C/p%3E%0A%20%20%3Cp%20style%3D%22height%3A%2022px%3B%22%3E%0A%20%20%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22hidedanmu%22%20style%3D%22height%3A17px%3Bwidth%3A17px%3Bvertical-align%3A%20middle%3B%22%20checked%3D%22checked%22%3E%26nbsp%3B%u5F39%u5E55%u53D1%u9001%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%0A%20%20%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22hideqfqd%22%20style%3D%22height%3A17px%3Bwidth%3A17px%3Bvertical-align%3Amiddle%3B%22%20checked%3D%22checked%22%3E%26nbsp%3B%u529F%u80FD%u6A21%u5757%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%0A%20%20%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22hidelog%22%20style%3D%22height%3A17px%3Bwidth%3A17px%3Bvertical-align%3A%20middle%3B%22%20checked%3D%22checked%22%3E%26nbsp%3B%u65E5%u5FD7%u4FE1%u606F%3C/p%3E%0A%20%20%3Cp%20style%3D%22height%3A%2022px%3B%22%3E%0A%20%20%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22hidebet%22%20style%3D%22height%3A17px%3Bwidth%3A17px%3Bvertical-align%3A%20middle%3B%22%20checked%3D%22checked%22%3E%26nbsp%3B%u7ADE%u731C%u4FE1%u606F%0A%20%20%20%20%3Cselect%20id%3D%22watchstyle%22%20style%3D%22height%3A22px%3Bwidth%3A%2075px%3Bbackground-color%3Ahsla%280%2C0%25%2C100%25%2C.4%29%3Bfloat%3Aright%3B%22%3E%0A%20%20%20%20%20%20%3Coption%3E%u5B8C%u6574%u6A21%u5F0F%3C/option%3E%0A%20%20%20%20%20%20%3Coption%3E%u6781%u7B80%u6A21%u5F0F%3C/option%3E%0A%20%20%20%20%20%20%3Coption%3E%u6302%u673A%u6A21%u5F0F%3C/option%3E%3C/select%3E%0A%20%20%3C/p%3E%0A%20%20%20%20%3C/section%3E%0A%3Csection%20id%3D%22credit%22%20style%3D%22margin-top%3A%205px%3Bmargin-left%3A%207px%3Bmargin-right%3A%207px%3B%22%3E%0A%20%20%3Ctextarea%20id%3D%22showcredit%22%20style%3D%22height%3A96px%3Bwidth%3A%20237px%3Bline-height%3A12pt%3Boverflow%3Ahidden%3Bresize%3Anone%3Bbackground-color%3Ahsla%280%2C0%25%2C100%25%2C.4%29%3B%22%20readonly%3D%22value%22%3E%3C/textarea%3E%0A%3C/section%3E%0A%3Csection%20id%3D%22maps%22%20style%3D%22margin-top%3A%205px%3Bmargin-left%3A%207px%3Bmargin-right%3A%207px%3B%22%3E%0A%20%20%3Ctextarea%20id%3D%22showmaps%22%20style%3D%22height%3A112px%3Bwidth%3A%20237px%3Bline-height%3A12pt%3Bresize%3Anone%3Bbackground-color%3Ahsla%280%2C0%25%2C100%25%2C.4%29%3B%22%20readonly%3D%22value%22%3E%3C/textarea%3E%0A%3C/section%3E%0A%3Csection%20id%3D%22instructions%22%20style%3D%22margin-top%3A%205px%3Bmargin-left%3A%207px%3Bmargin-right%3A%207px%3B%22%3E%0A%3Cinput%20type%3D%22button%22%20id%3D%22bnt_help%22%20style%3D%22width%3A75px%3B%22%20value%3D%22%u8BF4%u660E%22%3E%0A%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_fullmapsmess%22%20style%3D%22width%3A75px%3Bmargin-left%3A%205px%3Bmargin-right%3A%206px%3B%22%20value%3D%22%u5730%u56FE%u8BE6%u60C5%22%3E%0A%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_renew%22%20style%3D%22width%3A75px%3B%22%20value%3D%22%u5237%u65B0%22%3E%0A%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_getcredit%22%20style%3D%22width%3A75px%3B%22%20value%3D%22%23%u62A2%u5206%22%3E%0A%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_joingroup%22%20style%3D%22width%3A75px%3Bmargin-left%3A%205px%3Bmargin-right%3A%206px%3Bmargin-top%3A%205px%3B%22%20value%3D%22%23%u5165%u56E2%22%3E%0A%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_vip%22%20style%3D%22width%3A75px%3B%22%20value%3D%22%23%u8D2D%u4E70%u4F1A%u5458%22%3E%0A%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_confirm_%231%22%20style%3D%22width%3A%2075px%3Bcolor%3A%20red%3B%22%20value%3D%22%u538B%u5206%231%22%20title%3D%22%u56E2%u706D%u9700%u8981%u51E0%u5173%uFF1F%uFF01%22%3E%0A%20%20%3Cselect%20id%3D%22betcredit%22%20style%3D%22height%3A22px%3Bwidth%3A75px%3Bbackground-color%3Ahsla%280%2C0%25%2C100%25%2C.4%29%3Bmargin-top%3A5px%3Bmargin-left%3A%205px%3Bmargin-right%3A%206px%3B%22%3E%0A%20%20%20%20%3Coption%3E%u538B1/5%3C/option%3E%0A%20%20%20%20%3Coption%3E%u538B1/4%3C/option%3E%0A%20%20%20%20%3Coption%3E%u538B1/3%3C/option%3E%0A%20%20%20%20%3Coption%3E%u538B%u4E00%u534A%3C/option%3E%0A%20%20%20%20%3Coption%3E%u5168%u538B%u4E86%3C/option%3E%3C/select%3E%0A%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_confirm_%232%22%20style%3D%22width%3A%2075px%3Bcolor%3A%20blue%3B%22%20value%3D%22%u538B%u5206%232%22%20title%3D%22%u5C31%u8FD9%uFF1F%uFF01%22%3E%0A%3C/section%3E%0A%3Csection%20id%3D%22danmu%22%20style%3D%22margin-top%3A%205px%3Bmargin-left%3A%207px%3Bmargin-right%3A%207px%3B%22%3E%0A%20%20%3Ctextarea%20id%3D%22write%22%20style%3D%22float%3A%20left%3Bheight%3A%2047px%3Bwidth%3A%20153px%3Bmargin-right%3A%209px%3Bline-height%3A12pt%3Boverflow%3Ahidden%3Bresize%3Anone%3Bbackground-color%3Ahsla%280%2C0%25%2C100%25%2C.4%29%3B%22%20placeholder%3D%22%u8BF7%u8F93%u5165%u8981%u53D1%u9001%u7684%u5F39%u5E55%u5185%u5BB9%22%3E%3C/textarea%3E%0A%20%20%3Cp%3E%0A%20%20%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22enter%22%20style%3D%22height%3A17px%3Bwidth%3A17px%3Bvertical-align%3A%20bottom%3B%22%3E%26nbsp%3BEnter%u53D1%u9001%0A%20%20%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22chattail%22%20style%3D%22height%3A17px%3Bwidth%3A17px%3Bvertical-align%3A%20bottom%3B%22%3E%26nbsp%3B%u5C0F%u5C3E%u5DF4%0A%20%20%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22random%22%20style%3D%22height%3A17px%3Bwidth%3A17px%3Bvertical-align%3A%20bottom%3B%22%3E%26nbsp%3B%u968F%u673A%u6570%3C/p%3E%0A%3Cp%3E%0A%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22loop%22%20style%3D%22height%3A17px%3Bwidth%3A17px%3Bvertical-align%3A%20text-top%3B%22%3E%26nbsp%3B%u5FAA%u73AF%u53D1%u9001%0A%20%20%3Cselect%20id%3D%22loopEnd%22%20style%3D%22height%3A22px%3Bwidth%3A%2075px%3Bmargin-left%3A%2012px%3Bmargin-right%3A%205px%3Bmargin-top%3A5px%3Bbackground-color%3Ahsla%280%2C0%25%2C100%25%2C.4%29%3B%22%3E%0A%20%20%20%20%3Coption%3E%u53D1%u900110%u6B21%u540E%u505C%u6B62%3C/option%3E%0A%20%20%20%20%3Coption%3E%u53D1%u900120%u6B21%u540E%u505C%u6B62%3C/option%3E%0A%20%20%20%20%3Coption%3E%u53D1%u900150%u6B21%u540E%u505C%u6B62%3C/option%3E%0A%20%20%20%20%3Coption%3E%u624B%u52A8%u505C%u6B62%3C/option%3E%0A%20%20%20%20%3Coption%3E%u62BD%u5956%u7ED3%u675F%u65F6%u505C%u6B62%3C/option%3E%0A%20%20%20%20%3Coption%3E%u79EF%u5206%u4E0D%u518D%u589E%u52A0%u65F6%u505C%u6B62%3C/option%3E%3C/select%3E%0A%20%20%3Cinput%20type%3D%22range%22%20id%3D%22loopintervaltime%22%20min%3D%223%22%20max%3D%22100%22%20step%3D%221%22%20value%3D%223%22%20style%3D%22width%3A%2075px%3Bvertical-align%3A%20middle%3B%22title%3D%22%u5F53%u524D%u5FAA%u73AF%u968F%u673A%u65F6%u95F4%u95F4%u9694%u4E3A3%7E8%u79D2%22%3B%0A%3C/p%3E%0A%20%20%3Cselect%20id%3D%22danmuselect%22%20style%3D%22height%3A22px%3Bwidth%3A75px%3Bbackground-color%3Ahsla%280%2C0%25%2C100%25%2C.4%29%3B%22%3E%0A%20%20%20%20%3Coption%3E%u666E%u901A%u5F39%u5E55%3C/option%3E%0A%20%20%20%20%3Coption%3E%u9AD8%u7EA7%u5F39%u5E55%3C/option%3E%0A%20%20%20%20%3Coption%3E%u4E0A%u7535%u89C6%3C/option%3E%3C/select%3E%0A%20%20%3Cselect%20id%3D%22color%22%20style%3D%22height%3A22px%3Bwidth%3A75px%3Bmargin-top%3A5px%3Bmargin-left%3A%205px%3Bmargin-right%3A%206px%3Bbackground-color%3Ahsla%280%2C0%25%2C100%25%2C.4%29%3B%22%20disabled%3D%22disabled%22%3E%0A%20%20%20%20%3Coption%20style%3D%22color%3Ablue%22%3E%u84DD%3C/option%3E%0A%20%20%20%20%3Coption%20style%3D%22color%3Agreen%22%3E%u7EFF%3C/option%3E%0A%20%20%20%20%3Coption%20style%3D%22color%3Apink%22%3E%u7C89%3C/option%3E%0A%20%20%20%20%3Coption%20style%3D%22color%3Aorange%22%3E%u6A59%3C/option%3E%0A%20%20%20%20%3Coption%20style%3D%22color%3Apurple%22%3E%u7D2B%3C/option%3E%0A%20%20%20%20%3Coption%20style%3D%22color%3Ared%22%3E%u7EA2%3C/option%3E%3C/select%3E%0A%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_chatsend%22%20style%3D%22width%3A%2075px%3Bcolor%3A%20black%3B%22%20value%3D%22%u53D1%u9001%22%3E%0A%3C/section%3E%0A%3Csection%20id%3D%22qfqd%22%20style%3D%22margin-top%3A%205px%3Bmargin-left%3A%207px%3Bmargin-right%3A%207px%3Bdisplay%3A%20block%3B%22%3E%0A%20%20%3Cp%20style%3D%22height%3A%2027px%3B%22%3E%0A%20%20%20%20%3Cselect%20id%3D%22formatselect%22%20style%3D%22height%3A22px%3Bwidth%3A75px%3Bbackground-color%3Ahsla%280%2C0%25%2C100%25%2C.4%29%3B%22%3E%0A%20%20%20%20%20%20%3Coption%3E%u62A2%u5206/%u7B7E%u5230+%u5C0F%u5C3E%u5DF4%3C/option%3E%0A%20%20%20%20%20%20%3Coption%3E%u62A2%u5206/%u7B7E%u5230+%u5C0F%u5C3E%u5DF4+%u65F6%u95F4%3C/option%3E%0A%20%20%20%20%20%20%3Coption%3E%u62A2%u5206/%u7B7E%u5230+%u65F6%u95F4+%u5C0F%u5C3E%u5DF4%3C/option%3E%3C/select%3E%0A%20%20%20%20%3Ctextarea%20id%3D%22tail%22%20style%3D%22height%3A%2016px%3Bwidth%3A%2069px%3Bmargin-left%3A%205px%3Bmargin-right%3A%206px%3Bline-height%3A12pt%3Boverflow%3Ahidden%3Bresize%3Anone%3Bvertical-align%3A%20bottom%3Bbackground-color%3Ahsla%280%2C0%25%2C100%25%2C.4%29%3B%22%20placeholder%3D%22%u5C0F%u5C3E%u5DF4%22%3E%3C/textarea%3E%0A%20%20%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_tailsave%22%20style%3D%22width%3A75px%3Bmargin-right%3A%20auto%3B%22%20value%3D%22%u4FDD%u5B58%22%3E%3C/p%3E%0A%20%20%20%20%3Cp%20style%3D%22height%3A%2027px%3B%22%3E%0A%20%20%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_hidegifttoolbar%22%20style%3D%22width%3A75px%3Bmargin-right%3A%20auto%3B%22%20value%3D%22%u9690%u85CF%u793C%u7269%u680F%22%3E%0A%20%20%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_chatboxcleaning%22%20style%3D%22width%3A75px%3Bmargin-left%3A%205px%3Bmargin-right%3A%206px%3B%22%20value%3D%22%u7B80%u6D01%u5F39%u5E55%u6846%22%3E%0A%20%20%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_collectgarbage%22%20style%3D%22width%3A%2075px%3B%22%20value%3D%22%u6361%u5783%u573E%22%3E%3C/p%3E%0A%20%20%3Cp%20id%3D%20%22fn%22%3B%3E%0A%20%20%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22autoqf%22%20style%3D%22height%3A17px%3Bwidth%3A17px%3Bvertical-align%3A%20middle%3B%22%20checked%3D%22checked%22%3E%26nbsp%3B%u81EA%u52A8%u62A2%u5206%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%0A%20%20%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22autoqd%22%20style%3D%22margin-left%3A%207xp%3Bheight%3A17px%3Bwidth%3A17px%3Bvertical-align%3A%20text-top%3B%22%20checked%3D%22checked%22%3E%26nbsp%3B%u81EA%u52A8%u7B7E%u5230%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%0A%20%20%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22autogetreward%22%20style%3D%22margin-left%3A%207xp%3Bheight%3A17px%3Bwidth%3A17px%3Bvertical-align%3A%20text-top%3B%22%20checked%3D%22checked%22%3E%26nbsp%3B%u81EA%u52A8%u9886%u53D6%u6D3B%u8DC3%u5956%u52B1%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%0A%20%20%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22autodanmu%22%20style%3D%22margin-left%3A%207xp%3Bheight%3A17px%3Bwidth%3A17px%3Bvertical-align%3A%20text-top%3B%22%20%3E%26nbsp%3B%u81EA%u52A8%u53C2%u4E0E%u5F39%u5E55%u5F00%u706B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%0A%20%20%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22autodraw%22%20style%3D%22margin-left%3A%207xp%3Bheight%3A17px%3Bwidth%3A17px%3Bvertical-align%3A%20text-top%3B%22%20%3E%26nbsp%3B%u81EA%u52A8%u53C2%u4E0E%u5F39%u5E55%u62BD%u5956%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%0A%20%20%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22ignorefansdraw%22%20style%3D%22margin-left%3A%207xp%3Bheight%3A17px%3Bwidth%3A17px%3Bvertical-align%3A%20text-top%3B%22%20%3E%26nbsp%3B%u5FFD%u7565%u7C89%u4E1D%u56E2%u5F39%u5E55%u62BD%u5956%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%0A%20%20%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22adjusthighquality%22%20style%3D%22margin-left%3A%207xp%3Bheight%3A17px%3Bwidth%3A17px%3Bvertical-align%3A%20text-top%3B%22%20%3E%26nbsp%3B%u81EA%u52A8%u9009%u62E9%u6700%u9AD8%u753B%u8D28%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%0A%20%20%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22fixerror%22%20style%3D%22margin-left%3A%207xp%3Bheight%3A17px%3Bwidth%3A17px%3Bvertical-align%3A%20text-top%3B%22%20%3E%26nbsp%3B%u51FA%u73B0%u9519%u8BEF%u65F6%u81EA%u52A8%u5237%u65B0%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%0A%20%20%20%20%3Cinput%20class%3D%22magic-checkbox%22%20type%3D%22checkbox%22%20id%3D%22onlinenotify%22%20style%3D%22margin-left%3A%207xp%3Bheight%3A17px%3Bwidth%3A17px%3Bvertical-align%3A%20text-top%3B%22%20checked%3D%22checked%22%3E%26nbsp%3B%u5728%u64AD%u901A%u77E5%3C/p%3E%0A%3C/section%3E%0A%3Csection%20id%3D%22log%22%20style%3D%22margin-top%3A%205px%3Bmargin-left%3A%207px%3Bmargin-right%3A%207px%3B%22%3E%0A%20%20%3Ctextarea%20id%3D%22log%22%20style%3D%22height%3A96px%3Bwidth%3A%20237px%3Bline-height%3A12pt%3Bresize%3Anone%3Bbackground-color%3Ahsla%280%2C0%25%2C100%25%2C.4%29%3B%22%20readonly%3D%22value%22%3E%3C/textarea%3E%0A%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_cleanlog%22%20style%3D%22width%3A%2065px%3B%22%20value%3D%22%u6E05%u7A7A%u65E5%u5FD7%22%3E%0A%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_checksamemaps%22%20style%3D%22width%3A%20105px%3B%20margin-right%3A1px%22%20%20value%3D%22%u67E5%u8BE2%u5730%u56FE%u662F%u5426%u73A9%u8FC7%22%3B%20title%3D%22%u4ECA%u65E5%u8FD8%u53EF%u67E5%u8BE22%u6B21%22%3B%20disabled%20%3D%20%22disabled%22%3B%3E%0A%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_breakchecksamemaps%22%20style%3D%22width%3A65px%3B%22%20value%3D%22%u4E2D%u65AD%u67E5%u8BE2%22%20disabled%20%3D%20%22disabled%22%3B%3E%0A%3C/section%3E%0A%3Csection%20id%3D%22bet%22%20style%3D%22margin-top%3A%205px%3Bmargin-left%3A%207px%3Bmargin-right%3A%207px%3B%22%3E%0A%3Csection%20id%3D%22bet1%22%3E%0A%20%20%3Ctextarea%20id%3D%22betmess%22%20style%3D%22height%3A80px%3Bwidth%3A%20237px%3Bline-height%3A12pt%3Boverflow%3Ahidden%3Bresize%3Anone%3Bbackground-color%3Ahsla%280%2C0%25%2C100%25%2C.4%29%3B%22%20readonly%3D%22value%22%3E%3C/textarea%3E%0A%20%20%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_ywconfirm_left%22%20style%3D%22height%3A22px%3Bwidth%3A75px%3Bcolor%3Ared%3B%22%20value%3D%22%u538B%u5DE6%u8FB9%u9C7C%u4E38%22%3E%0A%20%20%3Cselect%20id%3D%22ywnum%22%20style%3D%22height%3A22px%3Bwidth%3A%2075px%3Bbackground-color%3Ahsla%280%2C0%25%2C100%25%2C.4%29%3Bmargin-left%3A%205px%3Bmargin-right%3A%206px%3B%22%3E%0A%20%20%20%20%3Coption%3E100%3C/option%3E%0A%20%20%20%20%3Coption%3E1000%3C/option%3E%0A%20%20%20%20%3Coption%3E10000%3C/option%3E%0A%20%20%20%20%3Coption%3EALL%20IN%3C/option%3E%3C/select%3E%0A%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_ywconfirm_right%22%20style%3D%22height%3A22px%3Bwidth%3A75px%3Bcolor%3Ablue%3B%22%20value%3D%22%u538B%u53F3%u8FB9%u9C7C%u4E38%22%3E%0A%3C/section%3E%0A%3Csection%20id%3D%22bet2%22%20style%3D%22margin-top%3A%205px%22%3B%3E%0A%20%20%20%20%3Ctextarea%20id%3D%22betmess1%22%20style%3D%22height%3A80px%3Bwidth%3A%20237px%3Bline-height%3A12pt%3Boverflow%3Ahidden%3Bresize%3Anone%3Bbackground-color%3Ahsla%280%2C0%25%2C100%25%2C.4%29%3B%22%20readonly%3D%22value%22%3E%3C/textarea%3E%0A%20%20%20%20%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_ywconfirm_left1%22%20style%3D%22height%3A22px%3Bwidth%3A75px%3Bcolor%3Ared%3B%22%20value%3D%22%u538B%u5DE6%u8FB9%u9C7C%u4E38%22%3E%0A%20%20%3Cselect%20id%3D%22ywnum1%22%20style%3D%22height%3A22px%3Bwidth%3A%2075px%3Bbackground-color%3Ahsla%280%2C0%25%2C100%25%2C.4%29%3Bmargin-left%3A%205px%3Bmargin-right%3A%206px%3B%22%3E%0A%20%20%20%20%3Coption%3E100%3C/option%3E%0A%20%20%20%20%3Coption%3E1000%3C/option%3E%0A%20%20%20%20%3Coption%3E10000%3C/option%3E%0A%20%20%20%20%3Coption%3EALL%20IN%3C/option%3E%3C/select%3E%0A%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_ywconfirm_right1%22%20style%3D%22height%3A22px%3Bwidth%3A75px%3Bcolor%3Ablue%3B%22%20value%3D%22%u538B%u53F3%u8FB9%u9C7C%u4E38%22%3E%0A%3C/section%3E%0A%3Csection%20id%3D%22bet3%22%20style%3D%22margin-top%3A%205px%22%3E%0A%20%20%20%20%20%3Ctextarea%20id%3D%22betmess2%22%20style%3D%22height%3A80px%3Bwidth%3A%20237px%3Bline-height%3A12pt%3Boverflow%3Ahidden%3Bresize%3Anone%3Bbackground-color%3Ahsla%280%2C0%25%2C100%25%2C.4%29%3B%22%20readonly%3D%22value%22%3E%3C/textarea%3E%0A%20%20%20%20%20%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_ywconfirm_left2%22%20style%3D%22height%3A22px%3Bwidth%3A75px%3Bcolor%3Ared%3B%22%20value%3D%22%u538B%u5DE6%u8FB9%u9C7C%u4E38%22%3E%0A%20%20%3Cselect%20id%3D%22ywnum2%22%20style%3D%22height%3A22px%3Bwidth%3A%2075px%3Bbackground-color%3Ahsla%280%2C0%25%2C100%25%2C.4%29%3Bmargin-left%3A%205px%3Bmargin-right%3A%206px%3B%22%3E%0A%20%20%20%20%3Coption%3E100%3C/option%3E%0A%20%20%20%20%3Coption%3E1000%3C/option%3E%0A%20%20%20%20%3Coption%3E10000%3C/option%3E%0A%20%20%20%20%3Coption%3EALL%20IN%3C/option%3E%3C/select%3E%0A%20%20%3Cinput%20type%3D%22button%22%20id%3D%22bnt_ywconfirm_right2%22%20style%3D%22height%3A22px%3Bwidth%3A75px%3Bcolor%3Ablue%3B%22%20value%3D%22%u538B%u53F3%u8FB9%u9C7C%u4E38%22%3E%0A%20%20%3C/section%3E%0A%3C/section%3E');document.body.appendChild(div);$('body').append('<div id="DreamChaser" style="left:0px; top:0px;position: fixed;width: 40px;height: 40px;z-index: 9999;display:none;opacity: 0.5;"title="最大化小助手"><img src="https://dreamchaser520.github.io/Tampermonkey/XiaoJieRoomAssistant/img/settings.png" style="position: fixed;height: 40px;width: 40px;"></div>');div.style.left=GM_getValue('left','80%');div.style.top=GM_getValue('top','10%');$("#autoqf").prop("checked",GM_getValue('autoQf',false));$("#autoqd").prop("checked",GM_getValue('autoQd',false));$("#enter").prop("checked",GM_getValue('enter',false));$("#onlinenotify").prop("checked",GM_getValue('onlineNotify',false));var autoFnWidth=$('section#qfqd').width();$("p#fn").css("width",autoFnWidth).attr('style','overflow-x: auto;white-space: nowrap;height: 40px;');$(document).keypress(function(event){if(event.keyCode==13&&document.getElementById("enter").checked){$("#bnt_chatsend").trigger("click")}});var arr=new Array("bnt_getcredit","bnt_joingroup","bnt_vip","#抢分","#入团","#购买会员");for(var i=0;i<arr.length/2;i++){addEvent(arr[i],arr[i+arr.length/2])}var creditRankJSON,myCreditRank="",myMaxCreditRank="";creditRank("credit","myCreditRank",lastCredit);creditRank("maxCredit","myMaxCreditRank",lastMaxCredit);var lastWatch=GM_getValue('lastWatch','完整模式');if(lastWatch=="极简模式"){$("#watchstyle").val("极简模式")}else if(lastWatch=="挂机模式"){$("#watchstyle").val("挂机模式")}watchStyle();var loopIntervalTime=3000;var mapsMessInterval,autoDanmuInterval,autoDrawInterval;var highQualityFlag=false;recoverStatus();$(document).ready(function(){try{userAgent();fixPosition();online();notify();creditMess();mapsMess();betMess();logMess();activate()}catch(err){console.log(err)};observerRemoveAD.observe($('body')[0],{subtree:true,childList:true,});autoGetReward();creditInterval=setInterval(function(){creditMess()},30000);mapsMessInterval=setInterval(function(){if(onlineJSON.data.room_status=="1"){mapsMess()}},5000);setInterval(function(){online();if(document.getElementById("autoqd").checked){sighIn()}},5000);autoDanmuInterval=setInterval(autoDanmu,5000);autoDrawInterval=setInterval(autoDraw,5000);setInterval(function(){giftStatusCheck=$('div.TreasureStatus-text').length;giftOpen=$('.TreasureStatus-bg.is-open').length;if(giftStatusCheck==0){giftFlag=true}if(document.getElementById("autoqf").checked){exGiftCheck();if(giftFlag){giftCheck()}}betMess();if(document.getElementById("adjusthighquality").checked&&!highQualityFlag){adjustHighQuality()}},1000);});$(window).resize(fixPosition);function userAgent(){if(navigator.userAgent.indexOf("Firefox")>0){$("input#loopintervaltime").css("width","74px")}}function fixPosition(){var divLeft=$(window).width()-$('div#newDiv').outerWidth(true)-5;var DreamChaserLeft=$(window).width()-50;var left=GM_getValue('left','0px').substring(0,GM_getValue('left','0px').length-2);if(divLeft<left){$('div#newDiv').css('left',divLeft);$('div#DreamChaser').css('left',DreamChaserLeft)}else{$('div#DreamChaser').css('left',DreamChaserLeft)}}function adjustHighQuality(){if($("div[class*='controlbar-']").length){$('.tip-e3420a ul li:first-child').click();setTimeout(function(){if($("div.dy-Modal-content").length||$("i.PlayerToolbar-dataLoadding").length){if(document.getElementById("fixerror").checked){window.location.reload();}else{getNow();log=nowHMS+" 已解除斗鱼屏蔽,仅供短暂观看,可能会出现不稳定的播放状况,若需长时间观看,请手动刷新页面\n"+log;logMess();$('div.loadingView-003bda').attr('style','display:none!important;');notifyText={text:"请注意:由于斗鱼后台有检测油猴插件的XMLHttpRequest请求,有一定概率出现时间同步错误提示,多刷新几次即可解决",title:"超级小桀房间小助手提醒",image:"https://dreamchaser520.github.io/Tampermonkey/XiaoJieRoomAssistant/img/settings.png",};GM_notification(notifyText)}}else{if($(".tip-e3420a select option:selected").length!=0){getNow();log=nowHMS+" 已调整为"+$(".tip-e3420a select option:selected").text()+" "+$('.tip-e3420a ul li:first-child').text()+"画质\n"+log;logMess()}}},3000);highQualityFlag=true}}function removeAD(){function ADHide(name){if($(name).length!=0){$(name).hide()}}ADHide("div.Bottom-ad");ADHide("div.Title-ad");ADHide("div.SignBaseComponent-sign-box.RoomChat.Barrage-chat-ad");ADHide("div.SysSign-Ad");ADHide("div.SignBaseComponent-sign-ad");ADHide("div.GuessGameAdContainer");ADHide("div.PlayerToolbar-signCont");ADHide("div[class*='recommendAD']");ADHide("div[class*='recommendApp']");ADHide("div.GuessGameAdContainer.is-showRank");$("div[class*='watermark']").css('display','none');}function hideGiftToolbar(boolean){hideGiftToolbarFlag=GM_getValue('hideGiftToolbarFlag',true);if(hideGiftToolbarFlag||boolean){$("#bnt_hidegifttoolbar").css('color','red').attr('value','显示礼物栏');$("div[class*='PlayerToolbar-GiftWrap']").hide();observerHideGiftToolbar.observe($('body')[0],{subtree:true,childList:true,});GM_setValue('hideGiftToolbarFlag',false)}else{$("#bnt_hidegifttoolbar").css('color','').attr('value','隐藏礼物栏');observerHideGiftToolbar.disconnect();$("div[class*='PlayerToolbar-GiftWrap']").show();GM_setValue('hideGiftToolbarFlag',true)}}function chatBoxCleaning(boolean){chatBoxCleaningFlag=GM_getValue('chatBoxCleaningFlag',true);if(chatBoxCleaningFlag||boolean){$("#bnt_chatboxcleaning").css('color','red').attr('value','完整弹幕框');$(".layout-Player-announce").hide();$(".layout-Player-rank ").hide();$(".ChatRank-rankWraper").hide();observerChatBoxCleaning.observe($('body')[0],{subtree:true,childList:true,});GM_setValue('chatBoxCleaningFlag',false)}else{$("#bnt_chatboxcleaning").css('color','').attr('value','简洁弹幕框');$(".layout-Player-announce").show();$(".layout-Player-rank ").show();$(".ChatRank-rankWraper").show();$(".layout-Player-barrage").css('top','');observerChatBoxCleaning.disconnect();GM_setValue('chatBoxCleaningFlag',true)}};var minimizedFlag=GM_getValue('minimizedFlag',false);function minimized(){$('div#newDiv').hide();$('div#DreamChaser').show();var left=$(window).width()-50,top=GM_getValue('top','10%');$('#DreamChaser').css('left',left).css('top',top);minimizedFlag=true;GM_setValue('minimizedFlag',minimizedFlag)}function maxmized(){$('div#newDiv').show();$('div#DreamChaser').hide();fnHide();minimizedFlag=false;GM_setValue('minimizedFlag',minimizedFlag)}var autoGetRewardFlag=true;function autoGetReward(){if(document.getElementById("autogetreward").checked&&autoGetRewardFlag){autoGetRewardFlag=false;var revardCount=0;var reward=setInterval(function(){revardCount++;if($('div.FishpondTreasure-num.is-entrance').length!=0||revardCount===1){$("div[class*='FishpondTreasure']").click();$('div.FTP').hide();setTimeout(function(){if($('div.FTP-singleTask-processText').eq(0).text()=='已领取'&&$('div.FishpondTreasure-num.is-entrance').length==0||revardCount>30){clearInterval(reward);autoGetRewardFlag=true;}var n1=$('span.TreasureBox-btn.enable').length;if(n1>0&&$('div.FishpondTreasure-num.is-entrance').length!=0){getNow();log=nowHMS+" 已领取"+n1+"个观看宝箱\n"+log;logMess()}for(var i=0;i<n1;i++){$('span.TreasureBox-btn.enable').eq(i).click()}function autoGetTasks(str){var n2=$('div.FTP-singleTask-waitBtn').length;if(n2>0&&$('div.FishpondTreasure-num.is-entrance').length!=0){getNow();log=nowHMS+" 已领取"+str+"任务奖励\n"+log;logMess();}for(i=0;i<n2;i++){$('div.FTP-singleTask-waitBtn').eq(i).click()}}autoGetTasks('每日');$('div.FTP-taskLeft').children()[1].click();setTimeout(function(){autoGetTasks('每周');$("div[class*='FishpondTreasure']").click();revardCount=0},1000)},1000)}},15000);var roomSighIn=setInterval(function(){if($('div.RoomLevelDetail-level.RoomLevelDetail-level--no').length!=0){$('div.RoomLevelDetail-level.RoomLevelDetail-level--no').click();$('div.Autograph').hide();$('a.Autograph-close')[0].click();log=nowHMS+" 当前房间:"+$('h2.Title-anchorNameH1').text()+"\n已自动在该房间签到\n"+log;logMess()}if($('div.RoomLevelDetail-level').length!=0){clearInterval(roomSighIn)}},60000)}}var autoDanmuFlag=true;function autoDanmu(){if(document.getElementById("autodanmu").checked&&$('div.ChatSend-button').text()=='开火'){if(autoDanmuFlag){clearInterval(autoDanmuInterval);autoDanmuInterval=null;clearInterval(autoDrawInterval);autoDrawInterval=null;var fireText=text==''?'666666':text;$('textarea#write').val(fireText);$('#loop').prop("checked",true);$("select#loopEnd").find("option:contains('发送10次后停止')").attr("selected",true);$("#bnt_chatsend").trigger("click");autoDanmuFlag=false}}else if($('div.ChatSend-button').text()!=='开火'&&!autoDanmuFlag){autoDanmuFlag=true}}function autoDraw(){if(document.getElementById("autodraw").checked&&$('div.LotteryContainer').length!=0){if($('span.ULotteryStart-danmuDesc.UserLottery-ellipse.is-coping').length!=0){if($('div.ULotteryStart-rule').children().text().indexOf("粉丝")!=-1&&document.getElementById("ignorefansdraw").checked){return}else{$('#chattail').prop("checked",false);clearInterval(autoDanmuInterval);autoDanmuInterval=null;clearInterval(autoDrawInterval);autoDrawInterval=null;var drawText=$('span.ULotteryStart-danmuDesc.UserLottery-ellipse.is-coping').text();$('#loop').prop("checked",true);$("select#danmuselect").find("option:contains('普通弹幕')").attr("selected",true);danmuSelect();$("select#loopEnd").find("option:contains('抽奖结束时停止')").attr("selected",true);if($('span.ULotteryStart-copy').text()=='复制'){setTimeout(function(){$('textarea#write').val(drawText);$("#bnt_chatsend").trigger("click")},3000)}else{$('span.ULotteryStart-joinBtnText').click();setTimeout(function(){$('textarea#write').val(drawText.substring(3));$("#bnt_chatsend").trigger("click")},3000)}$('span.LotteryContainer-close').click()}}}}var ignoreFansDrawFlag=false;function setCheckBox(){if(pathName=="/74751"){GM_setValue('autoQf',document.getElementById("autoqf").checked);GM_setValue('autoQd',document.getElementById("autoqd").checked)}GM_setValue('enter',document.getElementById("enter").checked);GM_setValue('chatTail',document.getElementById("chattail").checked);GM_setValue('random',document.getElementById("random").checked);GM_setValue('loop',document.getElementById("loop").checked);GM_setValue('autoGetReward',document.getElementById("autogetreward").checked);GM_setValue('autoDanmu',document.getElementById("autodanmu").checked);GM_setValue('autoDraw',document.getElementById("autodraw").checked);GM_setValue('ignoreFansDraw',document.getElementById("ignorefansdraw").checked);GM_setValue('onlineNotify',document.getElementById("onlinenotify").checked);GM_setValue('adjustHighQuality',document.getElementById("adjusthighquality").checked);GM_setValue('fixError',document.getElementById("fixerror").checked);fixStatus();autoGetReward()}function fixStatus(){if(document.getElementById("autodraw").checked){$("#ignorefansdraw").attr("disabled",false)}else{$("#ignorefansdraw").attr("disabled",true).prop("checked",false);GM_setValue('ignoreFansDraw',document.getElementById("ignorefansdraw").checked)}if(document.getElementById("autodraw").checked&&!document.getElementById("ignorefansdraw").checked){if(ignoreFansDrawFlag){notifyText={text:"请注意:如没有该房间粉丝牌请勾选忽略粉丝团弹幕抽奖!!!否则在主播发起粉丝团弹幕抽奖后将一键参与抽奖,自动办卡,消耗鱼翅。",title:"超级小桀房间小助手提醒",image:"https://dreamchaser520.github.io/Tampermonkey/XiaoJieRoomAssistant/img/settings.png",};GM_notification(notifyText);ignoreFansDrawFlag=false}}else{ignoreFansDrawFlag=true}if(document.getElementById("adjusthighquality").checked){$("#fixerror").attr("disabled",false)}else{$("#fixerror").attr("disabled",true).prop("checked",false);GM_setValue('fixError',document.getElementById("fixerror").checked)}}function watchStyle(){var watch=$("#watchstyle").find("option:selected").text();if(watch=='完整模式'){$("aside#js-aside.layout-Aside").show();$("div#js-bottom.layout-Bottom").show();$("div#js-player-title.layout-Player-title").show();$("header#js-header.layout-Header").show();$("main.layout-Main").removeAttr("style");$("section.layout-Container").removeAttr("style");$("div#js-background-holder.Background-holder").show();$("div.layout-Main").removeAttr("style");$("div#js-ad-map.layout-Bottom-forDiy").show();$("div#js-room-activity").show();$("div[class*='wfs-']").click();$("div[class*='wfs-exit-']").click()}else if(watch=='极简模式'){$("aside#js-aside.layout-Aside").hide();$("div#js-bottom.layout-Bottom").hide();$("div#js-player-title.layout-Player-title").hide();$("header#js-header.layout-Header").hide();$("main.layout-Main").css("cssText","max-width:100%;width:100%;margin:0px;padding:0px;");$("section.layout-Container").css("padding","0px");$("div#js-background-holder.Background-holder").hide();$("div.layout-Main").css("cssText","max-width:100%!important;width:100%!important;");$("div#js-ad-map.layout-Bottom-forDiy").hide();$("div#js-room-activity").hide();$("div[class*='bc-wrapper']").hide();$('div.layout-Main').parent("div[class*='bc-wrapper']").attr('style','display:block;');$('section.layout-Container').attr('style','padding-top:0px;background:none;');$("div[class*='wfs-']").click();$("div[class*='wfs-exit-']").click()}else{var observerSrcRemove=new MutationObserver(function(){$("video[id*='__video']").attr("src","");$("div.layout-Player-videoMain").remove()});observerSrcRemove.observe($('body')[0],{subtree:true,childList:true,});$("div.layout-Player-videoMain").hide();$("aside#js-aside.layout-Aside").hide();$("div#js-bottom.layout-Bottom").hide();$("div#js-player-title.layout-Player-title").hide();$("header#js-header.layout-Header").hide();$("div#js-player-guessgame.layout-Player-guessgame").hide();$("div#js-player-toolbar.layout-Player-toolbar").hide();$("main.layout-Main").css("cssText","max-width:100%;width:100%;margin:0px;padding:0px;");$("section.layout-Container").css("padding","0px");$("div#js-background-holder.Background-holder").hide();$("div.layout-Main").css("cssText","max-width:100%!important;width:100%!important;");$("div#js-room-activity").hide();$("div#js-ad-map.layout-Bottom-forDiy").hide();$("div[class*='bc-wrapper']").hide();$('div.layout-Main').parent("div[class*='bc-wrapper']").attr('style','display:block;');$('section.layout-Container').attr('style','padding-top:0px;background:none;')}if(watch!=lastWatch){if(lastWatch=="挂机模式"){window.location.reload()}lastWatch=watch;GM_setValue('lastWatch',lastWatch)}}function getNow(){function fix(s){return s<10?'0'+s:s}var myDate=new Date();year=myDate.getFullYear();month=fix(myDate.getMonth()+1);date=fix(myDate.getDate());h=fix(myDate.getHours());m=fix(myDate.getMinutes());s=fix(myDate.getSeconds());now=year+'-'+month+"-"+date+" "+h+':'+m+":"+s;nowYMD=year+'-'+month+"-"+date;nowHMS=h+':'+m+":"+s}function notify(){var notificationDetails={text:unescape('*%u6781%20%u7EAF**%20*%u732B%20*%u5609%u5609%20@%u82F9%u679CDY%20%u533F%u540D%u5927%u4F6C%20*%u8D85%u7FA4%0A%u70B9%u6211%u67E5%u770B%u65B0%u7248%u672C%u9884%u544A%u3001tips%u3001%u652F%u6301%uFF01'),title:"感谢以下水友对本插件的支持",image:"https://apic.douyucdn.cn/upload/avatar/002/86/30/15_avatar_big.jpg",onclick:function(){window.open("https://note.youdao.com/ynoteshare1/index.html?id=a667b6a4cf64b3c053ee091d448f2891&type=note")}};var lastDate=GM_getValue('date',0);getNow();if(nowYMD!=lastDate){GM_notification(notificationDetails);compareCredit(lastDate);lastRoomStatus=-1;ignoreFansDrawFlag=true;GM_setValue('date',nowYMD);GM_setValue('checkCount',2)}}function fnHide(){var a=document.getElementById("hidecredit").checked,b=document.getElementById("hidemaps").checked,c=document.getElementById("hideinstructions").checked,d=document.getElementById("hidedanmu").checked,e=document.getElementById("hideqfqd").checked,f=document.getElementById("hidebet").checked,g=document.getElementById("hidelog").checked;var arr1=new Array(a,b,c,d,e,f,g,"credit","maps","instructions","danmu","qfqd","bet","log");var arr2=new Array(a,b,c,d,e,f,g,"#hidecredit","#hidemaps","#hideinstructions","#hidedanmu","#hideqfqd","#hidebet","#hidelog");var trueheight=$('section#drag').outerHeight(true)+$('section#fnhide').outerHeight(true),height;for(var i=0;i<arr2.length/2;i++){GM_setValue(arr2[i+arr2.length/2],arr2[i]);var name="section#"+arr1[i+arr1.length/2];height=$(name).outerHeight(true);if(arr1[i]&&height!=null){$(name).show();trueheight+=height}else{$(name).hide()}}if(betcount!=0||!f){trueheight+=5}$("#newDiv").css("height",trueheight)}function addEvent(id,str){document.getElementById(id).addEventListener('click',function(event){danmu(str)},false)}function renew(){creditMess();mapsMess();betMess();logMess()}var onlineFlag=true;function online(){GM_xmlhttpRequest({method:"GET",url:"http://open.douyucdn.cn/api/RoomApi/room/74751",onload:function(response){onlineJSON=JSON.parse(response.responseText);roomStatus=onlineJSON.data.room_status;if(onlineFlag){if(onlineJSON.data.room_status=="1"){$('span#online').text('直播中');$('span#online').css('color','red')}else{$('span#online').text('已下播');$('span#online').css('color','blue')}onlineFlag=false}}});if(roomStatus!=lastRoomStatus){if(roomStatus==1){$('span#online').text('直播中');$('span#online').css('color','red');if(document.getElementById("onlinenotify").checked){notifyText={text:"超级小桀已开播,点我进入直播间",title:"超级小桀房间小助手提醒",image:"https://apic.douyucdn.cn/upload/avatar/002/86/30/15_avatar_big.jpg",onclick:function(){window.open("https://www.douyu.com/74751")}};GM_notification(notifyText)}}else{$('span#online').text('已下播');$('span#online').css('color','blue');var count=1;var close=setInterval(function(){if(($('span.dy-ModalRadius-close-x').length!=0)){$('span.dy-ModalRadius-close-x').click();closeFlag=true};if(closeFlag||count>30){clearInterval(close);close=null;closeFlag=false};count++},1000)}}GM_setValue('lastRoomStatus',roomStatus);lastRoomStatus=roomStatus};function creditMess(){getNow();if(nickname.length==0){$("#showcredit").val("个人信息: 更新时间:"+nowHMS+"\n暂未查询到您的个人信息。\n请登录您的斗鱼帐号!")}else{GM_xmlhttpRequest({timeout:5000,method:"GET",url:"http://api.xiaojie666.com/xiaojie/credit/query.do?nickName="+nickname,ontimeout:function(response){$("#showcredit").val("个人信息: 更新时间:"+nowHMS+"\n当前网络异常或服务器异常,请尝试点击“刷新”按钮,若还出现此信息,请检查当前网络或登录xiaojie666.com查询服务器状态。")},onload:function(response){if(response.responseText==undefined){$("#showcredit").val("个人信息: 更新时间:"+nowHMS+"\n暂未发现当前帐号信息,请发送弹幕指令加入积分系统。")}else{creditJSON=JSON.parse(response.responseText);var viptime=creditJSON.vipDate==null?'未购买':getTime(new Date(creditJSON.vipDate));$("#showcredit").val("个人信息: 更新时间:"+nowHMS+"\n昵称:"+creditJSON.nickName+"\n总赚得积分:"+creditJSON.earnedCredit+"\n历史最高积分:"+creditJSON.maxCredit+" 排名:"+myMaxCreditRank+"\n当前积分:"+creditJSON.credit+" 排名:"+myCreditRank+"\n会员到期时间:"+viptime);compareCreditQf(lastCredit,creditJSON.credit);c=creditJSON.maxCredit;d=creditJSON.credit;if(lastMaxCredit<creditJSON.maxCredit){myMaxCreditRank=creditRank("maxCredit","myMaxCreditRank",creditJSON.maxCredit);GM_setValue('lastMaxCredit',creditJSON.maxCredit);lastMaxCredit=GM_getValue('lastMaxCredit',0)};if(lastCredit!=creditJSON.credit){myCreditRank=creditRank("credit","myCreditRank",creditJSON.credit);var diffCredit=creditJSON.credit-lastCredit;diffCredit>0?diffCredit="+"+diffCredit:diffCredit;GM_setValue('lastCredit',creditJSON.credit);lastCredit=creditJSON.credit;log=nowHMS+" "+diffCredit+"积分 当前积分为:"+creditJSON.credit+"\n"+log;logMess()}}}})}}function creditRank(myCreditClass,myRankClass,myCredit){var i;GM_xmlhttpRequest({method:"GET",url:"http://api.xiaojie666.com/xiaojie/credit/rank.do?order="+myCreditClass,onload:function(response){creditRankJSON=JSON.parse(response.responseText);var length=creditRankJSON.length;if(myRankClass=="myCreditRank"){if(myCredit>=creditRankJSON[length-1].credit){for(i=0;i<creditRankJSON.length;i++){myCreditRank="数据库未更新";if(nickname==creditRankJSON[i].nickName){myCreditRank=i+1;return}}}else{myCreditRank="未上榜";return}}else if(myRankClass=="myMaxCreditRank"){if(myCredit>=creditRankJSON[length-1].maxCredit){for(i=0;i<creditRankJSON.length;i++){myMaxCreditRank="数据库未更新";if(nickname==creditRankJSON[i].nickName){myMaxCreditRank=i+1;return}}}else{myMaxCreditRank="未上榜";return}}}})}function getTime(timestamp){var myTime=new Date(timestamp);var fixYear=myTime.getFullYear();var fixMonth=myTime.getMonth()+1;var fixDate=myTime.getDate();return fixYear+"年"+fixMonth+"月"+fixDate+"日"}function mapsMess(){getNow();GM_xmlhttpRequest({timeout:5000,method:"GET",url:"http://api.xiaojie666.com/xiaojie/levelrecord/list.do?page=0&rows=1",ontimeout:function(response){$("#showmaps").val("地图信息: 更新时间:"+nowHMS+"\n当前网络异常或服务器异常,请尝试点击“刷新”按钮,若还出现此信息,请检查当前网络或登录xiaojie666.com查询服务器状态。")},onload:function(response){mapsJSON=JSON.parse(response.responseText);var lifetime=mapsJSON.levelRecords[0].lifeTime,showpassdate;var min=parseInt(lifetime/60);var sec=lifetime%60;showpassdate=min+"分"+sec+"秒";$("#showmaps").val("地图信息: 更新时间:"+nowHMS+"\nID:"+mapsJSON.levelRecords[0].levelId+"\n国家:"+mapsJSON.levelRecords[0].creator_ntd_origin_zh+"\n全球尝试次数:"+mapsJSON.levelRecords[0].attempts+" 通关次数:"+Math.round(mapsJSON.levelRecords[0].attempts*mapsJSON.levelRecords[0].clearrate)+"\n通过率:"+(mapsJSON.levelRecords[0].clearrate*100).toFixed(2)+"%\n地图名:"+mapsJSON.levelRecords[0].name_zh+"\n通关死亡次数:"+mapsJSON.levelRecords[0].deathCount+" 用时:"+showpassdate)}})}var sameMapsChecked=false,timeCount;function checkSameMaps(){if(c>=1e6&&d>=5e4){$("#bnt_breakchecksamemaps").removeAttr("disabled");var id=mapsJSON.levelRecords[0].levelId;checkCount=GM_getValue('checkCount',2);GM_setValue('checkCount',--checkCount);if(checkCount<=0){document.getElementById('bnt_checksamemaps').removeEventListener('click',checkSameMaps,false)}timeCount=599;var countdown=setInterval(countDown,1000);function countDown(){$("#bnt_checksamemaps").attr("disabled",true);if(checkCount==0){$("#bnt_checksamemaps").attr('title','今日查询次数已用完')}else{$("#bnt_checksamemaps").attr('title','今日还可查询'+checkCount+'次')}$("#bnt_checksamemaps").val("还剩"+timeCount+" 秒");if(timeCount==0){$("#bnt_checksamemaps").val("查询地图是否玩过");if(checkCount!==0){$("#bnt_checksamemaps").removeAttr("disabled")}clearInterval(countdown)}timeCount--}clearInterval(mapsMessInterval);mapsMessInterval=null;var pageLength=parseInt((mapsJSON.levelRecords[0].id-730)/20),i=0,count=0;checkMapsR###lt="查询完毕!\n该地图未玩过";var checkSameMapsInterval=setInterval(function(){if(i>pageLength||sameMapsChecked){clearInterval(checkSameMapsInterval);sameMapsChecked=false;$("#bnt_breakchecksamemaps").attr("disabled",true);log=checkMapsR###lt+"\n"+log;logMess();mapsMessInterval=setInterval(function(){if(onlineJSON.data.room_status=="1"){mapsMess()}},5000);return}GM_xmlhttpRequest({timeout:5000,method:"GET",url:"http://api.xiaojie666.com/xiaojie/levelrecord/list.do?page="+i,ontimeout:function(response){$("#showmaps").val("地图信息:\n当前网络异常或服务器异常,请检查当前网络或登录xiaojie666.com查询服务器状态。");checkMapsR###lt="查询失败!\n网络异常。";sameMapsChecked=true;return},onload:function(response){var checkMapsJSON=JSON.parse(response.responseText);for(var j=0;j<checkMapsJSON.levelRecords.length;j++){count++;$("#showmaps").val("地图信息:\n正在查询中...\n已比对"+count+"条记录...\n匹配"+checkMapsJSON.levelRecords[j].levelId+"失败");if(id==checkMapsJSON.levelRecords[j].levelId){if(count==1){continue}else{var startTime=getTime(checkMapsJSON.levelRecords[j].startTime);var lifetime=checkMapsJSON.levelRecords[j].lifeTime,showpassdate;var min=parseInt(lifetime/60);var sec=lifetime%60;showpassdate=min+"分"+sec+"秒";$("#showmaps").val("地图信息:\n正在查询中...\n已比对"+count+"条记录...\n匹配"+checkMapsJSON.levelRecords[j].levelId+"成功");checkMapsR###lt="查询完毕!\n该地图已于"+startTime+"玩过\n通关尝试次数:"+checkMapsJSON.levelRecords[j].deathCount+" 用时:"+showpassdate;sameMapsChecked=true;return}}}}});i++},100)}else{alert("历史最高积分未达到100W或当前积分没超过5W,暂时不能查询")}}function breakCheckSameMaps(){checkMapsR###lt="已中断查询";sameMapsChecked=true}function logMess(){getNow();if(log!=lastLog){lastLog=log;GM_setValue('log',log)}$("textarea#log").val("日志信息: 更新时间:"+nowHMS+"\n"+log)}function cleanLog(){GM_setValue('log','');log="";logMess()}function fullMapsMess(){window.open("https://supermariomakerbookmark.nintendo.net/courses/"+mapsJSON.levelRecords[0].levelId)}function donate(){window.open("http://note.youdao.com/noteshare?id=a667b6a4cf64b3c053ee091d448f2891&sub=EDF425F0960048C798AE3FAD1F4B20D6")}function collectGarbage(){window.open("https://www.xiaohulu.com/Box/index.html?plat=2")}function help(){alert(unescape('%20%20%20%20%20%20%20-%uFF1A%u6700%u5C0F%u5316%uFF0C%u9690%u85CF%u5C0F%u52A9%u624B%u5E76%u5728%u5C0F%u52A9%u624B%u7B49%u9AD8%u5904%u6700%u53F3%u7AEF%u751F%u6210%u4E00%u4E2A%u9F7F%u8F6E%u56FE%u6807%uFF0C%u6700%u5C0F%u5316%u65F6%u4E0D%u5F71%u54CD%u5C0F%u52A9%u624B%u539F%u6709%u529F%u80FD%u3002%0A%20%20%20%20%20%20%20%20%u6361%u5783%u573E%uFF1A%u67E5%u8BE2%u5F53%u524D%u6709%u5B9D%u7BB1%u7684%u623F%u95F4%uFF08%u53EA%u7ED9%u6C34%u53CB%u63D0%u4F9B%u4E2A%u65B9%u5F0F%uFF0C%u4E0D%u559C%u6B22%u7684%u65E0%u89C6%u5C31%u597D%uFF0C%u5582...%u5C0F%u846B%u82A6%u770B%u5230%u5FEB%u6765%u7ED3%u4E0B%u5E7F%u544A%u8D39%28%u0E51%u2022%u0300%u3142%u2022%u0301%29%u0648%u2727%uFF09%uFF0C%u53EF%u914D%u5408%u6302%u673A%u6A21%u5F0F%u5FEB%u901F%u62A2%u5B9D%u7BB1%uFF0C%u4E00%u822C%u5341%u51E0%u5206%u949F%u53EF%u4EE5%u628A%u62A2%u5B8C%u4E00%u5929%u7684%u5B9D%u7BB1%u4E0A%u9650%u3002%0A%20%20%20%20%20%20%20%20%23%u7B7E%u5230%uFF1A%u8F93%u5165%u7B7E%u5230%u53EF%u4EE5%u83B7%u5F97%u4E00%u5B9A%u79EF%u5206%uFF0C%u5177%u4F53%u83B7%u5F97%u7684%u79EF%u5206%u6570%u91CF%u4E0E%u6597%u9C7C%u7B49%u7EA7%uFF0C%u662F%u5426%u52A0%u5165%u7C89%u4E1D%u56E2%u4EE5%u53CA%u662F%u5426%u8D2D%u4E70%u4F1A%u5458%u6709%u5173%uFF0C%u6BCF%u5929%u6574%u70B9%u4F8B%u59825%u70B9%u7684%u524D%u540E5%u5206%u949F%u53EF%u4EE5%u7B7E%u5230%uFF0C%u6BCF%u534A%u5C0F%u65F6%u53EF%u4EE5%u7B7E%u5230%u4E00%u6B21%u3002%0A%20%20%20%20%20%20%20%23%u62A2%u5206%uFF1A%u6709%u6563%u5206%u6216%u8005%u76F4%u64AD%u95F4%u6709%u98DE%u673A%u4EE5%u4E0A%u7684%u793C%u7269%u7684%u65F6%u5019%uFF0C%20%u53EF%u4EE5%u8F93%u5165%u6B64%u547D%u4EE4%u6765%u968F%u673A%u83B7%u5F97%u4E00%u5B9A%u7684%u79EF%u5206%u3002%0A%20%20%20%20%20%20%20%23%u5165%u56E2%uFF1A%u5728%u4E3B%u64AD%u5F00%u542F%u4E00%u8F6E%u65B0%u56E2%u6218%u4E4B%u524D%u53EF%u4EE5%u8F93%u5165%u6B64%u547D%u4EE4%uFF0C%u4F1A%u968F%u673A%u6311%u900999%u4E2A%u6C34%u53CBID%u53C2%u6218%uFF0C%u83B7%u80DC%u7684ID%u4F1A%u589E%u52A0%u79EF%u5206%uFF0C%u4F7F%u7528%u6B64%u547D%u4EE4%u4E0D%u6D88%u8017%u79EF%u5206%u3002%0A%20%20%20%20%20%20%20%23%u8D2D%u4E70%u4F1A%u5458%uFF1A%u8D2D%u4E70%u4F1A%u5458%u9700%u8981%u6D88%u80175000%u79EF%u5206%u4E00%u6B21%uFF0C%u6301%u7EED%u65F6%u95F41%u4E2A%u6708%uFF0C%u53EF%u4EE5%u591A%u6B21%u91CD%u590D%u8D2D%u4E70%uFF0C%u91CD%u590D%u8D2D%u4E70%u76F8%u5F53%u4E8E%u81EA%u52A8%u7EED%u8D39%uFF0C%u4F1A%u5458%u671F%u95F4%u5185%uFF0C%u4F60%u7684%u7B7E%u5230%u548C%u9001%u793C%u83B7%u5F97%u7684%u79EF%u5206%u662F%u76F4%u63A5%u7FFB%u500D%u7684%u3002%0A%20%20%20%20%20%20%20%231%205000%uFF1A1%u4EE3%u8868%u6295%u7968%u4E00%u53F7%u9635%u8425%uFF0C5000%u4EE3%u8868%u4E0B%u6CE85000%u5206%uFF0C%232%u540C%u7406%uFF0C%u5C01%u76D8%u540E%u4E0D%u53EF%u518D%u538B%u3002%0A%20%20%20%20%20%20%20%u666E%u901A%u5F39%u5E55%uFF1A%u5728%u76F4%u64AD%u95F4%u53D1%u9001%u666E%u901A%u5F39%u5E55%uFF0C%u4E0E%u5728%u6597%u9C7C%u804A%u5929%u6846%u53D1%u9001%u5185%u5BB9%u65E0%u533A%u522B%uFF0C%u4E0D%u6D88%u8017%u79EF%u5206%u3002%0A%20%20%20%20%20%20%20%u9AD8%u7EA7%u5F39%u5E55%uFF1A%u5728%u76F4%u64AD%u95F4%u53D1%u9001%u4ECE%u5DE6%u81F3%u53F3%u79FB%u52A8%u7684%u5F69%u8272%u5F39%u5E55%uFF0C%u9700%u8981200%u79EF%u5206%u53D1%u80FD%u53D1%u4E00%u6B21%uFF0C%u5E76%u4E14%u9700%u8981%u5386%u53F2%u6700%u9AD8%u79EF%u5206%u5927%u4E8E50000%u3002%0A%20%20%20%20%20%20%20%u4E0A%u7535%u89C6%uFF1A%u5728%u76F4%u64AD%u95F4%u53D1%u9001%u5F69%u8272%u5F39%u5E55%uFF0C%u4E00%u822C%u5728%u5C4F%u5E55%u5DE6%u4E0B%u89D2%u5F39%u51FA%uFF0C%u53EA%u6709%u5728%u4E3B%u64AD%u5207%u6362%u5230%u5BA4%u5185%u955C%u5934%u753B%u9762%u65F6%u624D%u5F00%u542F%u8FD9%u4E2A%u529F%u80FD%uFF08%u4E00%u822C%u4E3A%u4E2D%u5348%u5403%u###D%u65F6%uFF09%uFF0C%u6BCF%u6761%u6D88%u801710%u79EF%u5206%u3002%0A%20%20%20%20%20%20%20%u5C0F%u5C3E%u5DF4%uFF1A%u5728%u81EA%u52A8%u7B7E%u5230%u62A2%u5206%u7684%u65F6%u5019%u52A0%u4E0A%u81EA%u5B9A%u4E49%u5185%u5BB9%uFF0C%u5982%uFF1A%u201C%u62A2%u5206/%u7B7E%u5230+%u5C0F%u5C3E%u5DF4+%u65F6%u95F4%20%u4E3B%u64AD%u4F60%u771F%u4E11%u201D%u5219%u6BCF%u6B21%u81EA%u52A8%u7B7E%u5230%u7684%u5185%u5BB9%u4E3A%uFF1A%u201C%23%u62A2%u5206%20%u4E3B%u64AD%u4F60%u771F%u4E11%202019-4-9%205%3A00%3A00%u201D%u62A2%u5206%u4EA6%u5982%u6B64%u3002PS%3A%u5C0F%u5C3E%u5DF4%u53EF%u4EE5%u4E3A%u7A7A%uFF0C%u4E5F%u53EF%u4EE5%u4E0E%u53D1%u9001%u5185%u5BB9%u5171%u7528%u3002%0A%20%20%20%20%20%20%20%u65E5%u5FD7%uFF1A%u8BB0%u5F55%u4F7F%u7528%u63D2%u4EF6%u53D1%u9001%u7684%u5185%u5BB9%u548C%u5206%u6570%u53D8%u5316%u60C5%u51B5%uFF0C%u6BCF%u5929%u4F1A%u6709%u4E0E%u4E0A%u6B21%u4F7F%u7528%u63D2%u4EF6%u65F6%u7684%u79EF%u5206%u5BF9%u6BD4%u3002%0A%20%20%20%20%20%20%20%u5FAA%u73AF%u53D1%u9001%uFF1A%u91CD%u590D%u53D1%u9001%u6587%u672C%u6846%u7684%u5185%u5BB9%uFF0C%u6700%u5FEB3%7E8S%uFF0C%u6700%u6162100%7E105S%u81EA%u5B9A%u4E49%u968F%u673A%u95F4%u9694%u53D1%u9001%u4E00%u6B21%uFF0C%u5EFA%u8BAE%u914D%u5408%u968F%u673A%u6570%u4E00%u8D77%u4F7F%u7528%u3002%0A%20%20%20%20%20%20%20%u968F%u673A%u6570%uFF1A%u5F53%u53D1%u9001%u5185%u5BB9%u4E0E%u4E0A%u6B21%u53D1%u9001%u5185%u5BB9%u91CD%u590D%u65F6%uFF0C%u5728%u5185%u5BB9%u540E%u52A0%u5165%u968F%u673A%u6570%uFF0C%u5EFA%u8BAE%u6253%u5F00%u6B64%u9009%u9879%uFF0C%u4EE5%u514D%u53D1%u9001%u8FC7%u5FEB%uFF0C%u88AB%u8BEF%u5C01%u3002%0A%20%20%20%20%20%20%20%u81EA%u52A8%u9886%u53D6%u6D3B%u8DC3%u5956%u52B1%uFF1A%u81EA%u52A8%u5B8C%u6210%u623F%u95F4%u7B7E%u5230%uFF0C%u5B9D%u7BB1%u5956%u52B1%u53CA%u6BCF%u65E5%u6D3B%u8DC3%u5956%u52B1%u3002%0A%20%20%20%20%20%20%20%u81EA%u52A8%u53C2%u4E0E%u5F39%u5E55%u62BD%u5956%uFF1A%u5F53%u4E3B%u64AD%u53D1%u8D77%u5F39%u5E55%u62BD%u5956%u65F6%uFF08%u793C%u7269%u62BD%u5956%u65F6%u65E0%u6548%uFF09%uFF0C%u4F1A%u81EA%u52A8%u4E00%u952E%u53C2%u4E0E%uFF0C%u53D1%u9001%u5FAA%u73AF%u5F39%u5E55%uFF0C%u76F4%u5230%u62BD%u5956%u7ED3%u675F%u5FAA%u73AF%u3002%uFF08%u5F53%u65E0%u5F53%u524D%u623F%u95F4%u7C89%u4E1D%u724C%u65F6%uFF0C%u8BF7%u52FE%u9009%u5FFD%u7565%u7C89%u4E1D%u56E2%u5F39%u5E55%u62BD%u5956%u3002%uFF09%0A%20%20%20%20%20%20%20%u81EA%u52A8%u53C2%u4E0E%u5F39%u5E55%u5F00%u706B%uFF1A%u5F53%u4E3B%u64AD%u5F00%u542F%u5F39%u5E55%u5F00%u706B%u62BD%u53D6%u9C7C%u4E38%u65F6%uFF0C%u4F1A%u81EA%u52A8%u53D1%u9001%u5FAA%u73AF%u5F39%u5E55%uFF0C%u9ED8%u8BA4%u4E3A%u53D1%u900110%u6B21%uFF0C%u5185%u5BB9%u4E3A%u4E0A%u6B21%u7528%u63D2%u4EF6%u53D1%u9001%u7684%u5185%u5BB9%uFF0C%u82E5%u4ECE%u672A%u5728%u63D2%u4EF6%u53D1%u9001%u8FC7%uFF0C%u5219%u752866666%u4EE3%u66FF%u3002%0A%20%20%20%20%20%20%20%u6E05%u7A7A%u65E5%u5FD7%uFF1A%u4EC5%u6E05%u9664%u5F53%u524D%u65E5%u5FD7%u4FE1%u606F%uFF0C%u4E0D%u4F1A%u5F71%u54CD%u5BF9%u6BD4%u8BB0%u5F55%u5206%u6790%u3002%0A%20%20%20%20%20%20%20%u67E5%u8BE2%u5730%u56FE%u662F%u5426%u73A9%u8FC7%uFF1A%u67E5%u8BE2%u5F53%u524D%u5730%u56FE%u662F%u5426%u73A9%u8FC7%uFF0C%u67E5%u8BE2%u7ED3%u679C%u5C06%u5728%u65E5%u5FD7%u4FE1%u606F%u4E2D%u4FDD%u5B58%uFF0C%u7531%u4E8E%u6570%u636E%u5E93%u5B58%u57282W+%u6761%u8BB0%u5F55%uFF0C%u6BCF%u6B21%u67E5%u8BE2%u5C06%u6D88%u8017%u5927%u91CF%u5E26%u5BBD%u53CA%u670D%u52A1%u5668%u8D44%u6E90%uFF0C%u6545%u9650%u5236%u4E3A%u67E5%u8BE2%u6B21%u6570%u4E3A%u6BCF%u59292%u6B21%u4E14%u6BCF%u6B21%u67E5%u8BE2%u9700%u89C2%u770B%u76F4%u64AD10%u5206%u949F%u3002%u4E14%u6700%u9AD8%u79EF%u5206%u5927%u4E8E100W%uFF0C%u5F53%u524D%u79EF%u5206%u5927%u4E8E5W%u3002%u8BF7%u52FF%u968F%u610F%u4F7F%u7528%u6B64%u529F%u80FD%uFF01'))}function sendColor(){color=$("#color").find("option:selected").text();switch(color){case'蓝':$("#bnt_chatsend").css("color","blue");break;case'绿':$("#bnt_chatsend").css("color","green");break;case'粉':$("#bnt_chatsend").css("color","pink");break;case'橙':$("#bnt_chatsend").css("color","orange");break;case'紫':$("#bnt_chatsend").css("color","purple");break;case'红':$("#bnt_chatsend").css("color","red");break}}function danmuSelect(){var danmuselect=$("#danmuselect").find("option:selected").text();if(danmuselect=='普通弹幕'){$('#color').attr("disabled",true);$("#bnt_chatsend").css("color","black")}else{$("#color").attr("disabled",false);sendColor()}}function chatSend(){var c;var danmuselect=$("#danmuselect").find("option:selected").text();text=$('#write').val();color=$("#color").find("option:selected").text();if(danmuselect=='普通弹幕'){c=''}else if(danmuselect=='高级弹幕'){c='#'+color+' '}else{c='#上电视 '+color+'色 '}if(text.length==0){alert("输入内容为空,请重新输入");return}else{text=c+text;document.getElementById("chattail").checked?danmu(fullTail(text)):danmu(text)}if(document.getElementById("loop").checked){loopFlag=true;GM_setValue('loopText',text);setTimeout(loopDanmu,loopIntervalTime,0)}else{loopFlag=false}$('#write').val('')}function betCredit(select){betSelect=select;var betcredit=$("#betcredit").find("option:selected").text();var num;switch(betcredit){case'全压了':;case'压一半':num='老子'+betcredit;break;case'压1/3':num=parseInt(creditJSON.credit/3);break;case'压1/4':num=parseInt(creditJSON.credit/4);break;case'压1/5':num=parseInt(creditJSON.credit/5);break}danmu(betSelect+" "+num)}function betYw(select,num,bnt){ywSelected=select;var ywnum=$("#"+num).find("option:selected").text();if(ywSelected=='左边'){switch(bnt){case'bnt_ywconfirm':$('div.GuessContItem.is-left:eq(0)').click();break;case'bnt_ywconfirm1':$('div.GuessContItem.is-left:eq(1)').click();break;case'bnt_ywconfirm2':$('div.GuessContItem.is-left:eq(2)').click();break}}else{switch(bnt){case'bnt_ywconfirm':$('div.GuessContItem.is-right:eq(0)').click();break;case'bnt_ywconfirm1':$('div.GuessContItem.is-right:eq(1)').click();break;case'bnt_ywconfirm2':$('div.GuessContItem.is-right:eq(2)').click();break}}switch(ywnum){case'100':$('.chooseOption:eq(1)').click();break;case'1000':$('.chooseOption:eq(2)').click();break;case'10000':$('.chooseOption:eq(3)').click();break;case'ALL IN':$('.chooseOption:eq(4)').click();break}$('div.guessGame--btn.guessGame--btn--sizeM').click()}function recoverStatus(){var qf=GM_getValue('autoQf',false),qd=GM_getValue('autoQd',false),et=GM_getValue('enter',false),cl=GM_getValue('chatTail',false),rm=GM_getValue('random',true),ad=GM_getValue('autoGetReward',true),au=GM_getValue('autoDanmu',true),aw=GM_getValue('autoDraw',true),iw=GM_getValue('ignoreFansDraw',true),oy=GM_getValue('onlineNotify',true),lp=GM_getValue('loop',false),ay=GM_getValue('adjustHighQuality',false),fr=GM_getValue('fixError',false);var a=GM_getValue('#hidecredit',true),b=GM_getValue('#hidemaps',true),c=GM_getValue('#hideinstructions',true),d=GM_getValue('#hidedanmu',true),e=GM_getValue('#hideqfqd',true),f=GM_getValue('#hidebet',true),g=GM_getValue('#hidelog',true);var arr=new Array(a,b,c,d,e,f,g,qf,qd,et,cl,rm,ad,au,aw,iw,oy,lp,ay,fr,"#hidecredit","#hidemaps","#hideinstructions","#hidedanmu","#hideqfqd","#hidebet","#hidelog",'#autoqf','#autoqd',"#enter","#chattail","#random","#autogetreward","#autodanmu","#autodraw","#ignorefansdraw","#onlinenotify","#loop","#adjusthighquality","#fixerror");for(var i=0;i<arr.length/2;i++){if(arr[i]){$(arr[i+arr.length/2]).prop("checked",true)}else{$(arr[i+arr.length/2]).prop("checked",false)}}if(GM_getValue('minimizedFlag',false)){minimized()}if(!hideGiftToolbarFlag){hideGiftToolbar(true)}if(!chatBoxCleaningFlag){chatBoxCleaning(true)}if(pathName!=="/74751"){arr=new Array("#hidecredit","#hidemaps","#hideinstructions",'#autoqf','#autoqd',"#enter","#loop");for(i=0;i<arr.length;i++){$(arr[i]).prop("checked",false)}}loopSelect();fnHide();fixStatus();limitClick()}function limitClick(){timeCount=599;a=timeCount;b=checkCount;var countdown=setInterval(countDown,1000);function countDown(){$("#bnt_checksamemaps").attr("disabled",true);if(checkCount==0){$("#bnt_checksamemaps").attr('title','今日查询次数已用完')}else{$("#bnt_checksamemaps").attr('title','今日还可查询'+checkCount+'次')}$("#bnt_checksamemaps").val("还剩"+timeCount+" 秒");if(timeCount==0){$("#bnt_checksamemaps").val("查询地图是否玩过");if(checkCount!==0){$("#bnt_checksamemaps").removeAttr("disabled")}clearInterval(countdown)}timeCount--}};var betMessFlag=true,betMessClickFlag=false;var lastPlayerHeight=0,betcount;function betMess(){var playerHeight=$("div#js-player-title.layout-Player-title").outerHeight(true)+$("div#js-player-video-case.layout-Player-videoMain").outerHeight(true)+275;if(playerHeight!=lastPlayerHeight){$('div.layout-Player-guessgame').css('top',playerHeight+'px');lastPlayerHeight=playerHeight}if($('div.GuessIcon').length!=0&&betMessFlag){$('div.GuessIcon').click();betMessFlag=false;betMessClickFlag=true}if($('div.guessGameContainer.is-diyRoom').length!=0&&betMessClickFlag){$('div.layout-Player-guessgame').css('position','relative');betMessClickFlag=false}betcount=$('.GuessGameBox').length;if(betcount!=lastBetCount){if(betcount==0){$('section#bet1').hide();$('section#bet2').hide();$('section#bet3').hide()}else if(betcount==1){$('section#bet1').show();$('section#bet2').hide();$('section#bet3').hide()}else if(betcount==2){$('section#bet1').show();$('section#bet2').show();$('section#bet3').hide()}else if(betcount==3){$('section#bet1').show();$('section#bet2').show();$('section#bet3').show()}lastBetCount=betcount;fnHide()}switch(betcount){case 3:$("#betmess2").val("竞猜信息: "+$('span.GuessMainPanelBoxRight-rightBar:eq(2)').text()+"\n"+$('div.boxLeft:eq(2)').text()+"\n左边:"+$('p.GuessContItem-itemTitle:eq(4)').text()+" "+$('p.GuessContItem-itemLoss:eq(4)').text()+"\n右边:"+$('p.GuessContItem-itemTitle:eq(5)').text()+" "+$('p.GuessContItem-itemLoss:eq(5)').text()+"\n"+$('.bidNumLeft:eq(2)').text()+" VS "+$('.bidNumRight:eq(2)').text());case 2:$("#betmess1").val("竞猜信息: "+$('span.GuessMainPanelBoxRight-rightBar:eq(1)').text()+"\n"+$('div.boxLeft:eq(1)').text()+"\n左边:"+$('p.GuessContItem-itemTitle:eq(2)').text()+" "+$('p.GuessContItem-itemLoss:eq(2)').text()+"\n右边:"+$('p.GuessContItem-itemTitle:eq(3)').text()+" "+$('p.GuessContItem-itemLoss:eq(3)').text()+"\n"+$('.bidNumLeft:eq(1)').text()+" VS "+$('.bidNumRight:eq(1)').text());case 1:$("#betmess").val("竞猜信息: "+$('span.GuessMainPanelBoxRight-rightBar:eq(0)').text()+"\n"+$('div.boxLeft:eq(0)').text()+"\n左边:"+$('p.GuessContItem-itemTitle:eq(0)').text()+" "+$('p.GuessContItem-itemLoss:eq(0)').text()+"\n右边:"+$('p.GuessContItem-itemTitle:eq(1)').text()+" "+$('p.GuessContItem-itemLoss:eq(1)').text()+"\n"+$('.bidNumLeft:eq(0)').text()+" VS "+$('.bidNumRight:eq(0)').text());break}}function tail(){var tailText=$('#tail').val();var formatselect=$("#formatselect").find("option:selected").text();getNow();if(formatselect=='抢分/签到+小尾巴'){fullTailText=tailText;tailFlag=1}else if(formatselect=='抢分/签到+小尾巴+时间'){if(tailText.length==0){fullTailText=nowHMS}else{fullTailText=tailText+" "+nowHMS}tailFlag=2}else{if(tailText.length==0){fullTailText=nowHMS}else{fullTailText=nowHMS+" "+tailText}tailFlag=3}GM_setValue('tailText',tailText);GM_setValue('tailFlag',tailFlag);$('#tail').val('');alert("保存成功,当前格式为:#抢分/签到 "+fullTailText)}function fullTail(danmu){var tailText=GM_getValue('tailText','');getNow();if(tailText.length==0){if(GM_getValue('tailFlag',tailFlag)==1){return(danmu)}else{return(danmu+" "+nowHMS)}}else{if(GM_getValue('tailFlag',tailFlag)==1){return(danmu+" "+tailText)}else if(GM_getValue('tailFlag',tailFlag)==2){return(danmu+" "+tailText+" "+nowHMS)}else{return(danmu+" "+nowHMS+" "+tailText)}}}function activate(){var betcount=$('.GuessGameBox').length;var dragSection=document.getElementById("drag");dragSection.addEventListener("mouseover",over,false);dragSection.addEventListener('mousedown',down,false);dragSection.addEventListener('mousemove',move,false);dragSection.addEventListener('mouseup',up,false);dragSection.addEventListener("mouseout",out,false);document.getElementById('DreamChaser').addEventListener('mouseover',function(event){minimizedOver()},false);document.getElementById('DreamChaser').addEventListener('mouseout',function(event){minimizedOut()},false);document.getElementById('bnt_donate').addEventListener('click',function(event){donate()},false);document.getElementById('bnt_collectgarbage').addEventListener('click',function(event){collectGarbage()},false);document.getElementById('bnt_fullmapsmess').addEventListener('click',function(event){fullMapsMess()},false);document.getElementById('bnt_renew').addEventListener('click',function(event){renew()},false);document.getElementById('bnt_confirm_#1').addEventListener('click',function(event){betCredit('#1')},false);document.getElementById('bnt_confirm_#2').addEventListener('click',function(event){betCredit('#2')},false);document.getElementById('bnt_help').addEventListener('click',function(event){help()},false);document.getElementById('bnt_chatsend').addEventListener('click',function(event){chatSend()},false);document.getElementById('color').addEventListener('click',function(event){sendColor()},false);document.getElementById('danmuselect').addEventListener('change',function(event){danmuSelect()},false);document.getElementById('bnt_minimized').addEventListener('click',function(event){minimized()},false);document.getElementById('bnt_tailsave').addEventListener('click',function(event){tail()},false);document.getElementById('bnt_cleanlog').addEventListener('click',function(event){cleanLog()},false);document.getElementById('bnt_ywconfirm_left').addEventListener('click',function(event){betYw('左边','ywnum','bnt_ywconfirm')},false);document.getElementById('bnt_ywconfirm_right').addEventListener('click',function(event){betYw('右边','ywnum','bnt_ywconfirm')},false);document.getElementById('bnt_ywconfirm_left1').addEventListener('click',function(event){betYw('左边','ywnum1','bnt_ywconfirm1')},false);document.getElementById('bnt_ywconfirm_right1').addEventListener('click',function(event){betYw('右边','ywnum1','bnt_ywconfirm1')},false);document.getElementById('bnt_ywconfirm_left2').addEventListener('click',function(event){betYw('左边','ywnum2','bnt_ywconfirm2')},false);document.getElementById('bnt_ywconfirm_right2').addEventListener('click',function(event){betYw('右边','ywnum2','bnt_ywconfirm2')},false);document.getElementById('watchstyle').addEventListener('change',function(event){watchStyle()},false);document.getElementById('bnt_hidegifttoolbar').addEventListener('click',function(event){hideGiftToolbar(false)},false);document.getElementById('bnt_chatboxcleaning').addEventListener('click',function(event){chatBoxCleaning(false)},false);document.getElementById('loop').addEventListener('click',function(event){loopSelect()},false);document.getElementById('loopintervaltime').addEventListener('change',function(event){getLoopIntervalTime()},false);document.getElementById('DreamChaser').addEventListener('click',function(event){maxmized()},false);var arr1=new Array("hidecredit","hidemaps","hideinstructions","hidedanmu","hideqfqd","hidebet","hidelog");for(var i=0;i<arr1.length;i++){document.getElementById(arr1[i]).addEventListener('change',function(event){fnHide()},false)}var arr2=new Array('autoqf','autoqd','enter','chattail','random','loop','autogetreward','autodanmu','autodraw','ignorefansdraw','onlinenotify','adjusthighquality','fixerror');for(var j=0;j<arr2.length;j++){document.getElementById(arr2[j]).addEventListener('change',function(event){setCheckBox()},false)}if(a>=550&&b<3&&b>0){document.getElementById('bnt_breakchecksamemaps').addEventListener('click',function(event){breakCheckSameMaps()},false);document.getElementById('bnt_checksamemaps').addEventListener('click',checkSameMaps,false)}}function minimizedOver(e){$('div#DreamChaser').stop().css('cursor','pointer').animate({'opacity':1},300,'swing');$('div#DreamChaser').children().stop().animate({'width':'50px','height':'50px'},300,'swing').rotate({animateTo:360,duration:1000})}function minimizedOut(e){$('div#DreamChaser').stop().css('cursor','auto').animate({'opacity':0.5,},300,'swing');$('div#DreamChaser').children().stop().animate({'width':'40px','height':'40px'},300,'swing').rotate({animateTo:0,duration:1000})}function over(e){div.style.cursor="move"}function out(e){div.style.cursor="auto"}function down(e){e=e||window.event;x=e.clientX-div.offsetLeft;y=e.clientY-div.offsetTop;dragFlag=true}function move(e){if(dragFlag){div.style.cursor="move";e=e||window.event;div.style.left=e.clientX-x+'px';div.style.top=e.clientY-y+'px'}}function up(e){if(dragFlag){GM_setValue('left',div.style.left);GM_setValue('top',div.style.top)}dragFlag=false;div.style.cursor="auto";fixPosition()}function sighIn(){getNow();if(m==0||m==30){if(sighInFlag){danmu(fullTail("#签到"));sighInFlag=false}}else{sighInFlag=true}}function giftCheck(){var i=onlineJSON.data.room_status=="1"?0:-5;if(giftStatusCheck!=0&&giftOpen==0&&$('span.TreasureNum-val').length==0){lastGiftNum=1;giftFlag=false;danmu(fullTail("#抢分"));qf=setInterval(function(){if(document.getElementById("autoqf").checked){danmu(fullTail("#抢分"))};i++;if(i>3){clearInterval(qf);qf=null;creditMess()}},1600)}}function exGiftCheck(){if($('span.TreasureNum-val').length!=0){giftNum=$('span.TreasureNum-val').text();if(giftNum>lastGiftNum){lastGiftNum=giftNum;giftFlag=false;clearInterval(qf);qf=null;clearInterval(exqf);exqf=null;var i=onlineJSON.data.room_status=="1"?0:-5;danmu(fullTail("#抢分"));exqf=setInterval(function(){if(document.getElementById("autoqf").checked){danmu(fullTail("#抢分"))};i++;if(i>3){clearInterval(exqf);exqf=null;creditMess()}},1600)}else{lastGiftNum=giftNum}}else{lastGiftNum=1}}function compareCreditQf(lCredit,nCredit){if(nCredit>lCredit){qfFlag=true}else{qfFlag=false}}function compareCredit(str){myCredit=GM_getValue('myCredit',-1);if(myCredit!=lastCredit){var diffCredit=lastCredit-myCredit;diffCredit>0?diffCredit="+"+diffCredit:diffCredit;getNow();lastCredit=GM_getValue('lastCredit',0);GM_setValue('myCredit',lastCredit);log="今天相对上次使用本插件时("+str+")"+diffCredit+"积分 当前积分为:"+lastCredit+"\n"+nowYMD+"\n\n"+log;logMess()}else{if(myCredit==-1){log="初次使用,对比记录分析将在次日生成,数据初始化...\n"+nowYMD;logMess();lastCredit=0;creditMess();setTimeout(function(){GM_setValue('myCredit',lastCredit)},10000)}else{log="今天相对上次使用本插件时("+str+")积分无变化,当前积分为:"+lastCredit+"\n"+nowYMD+"\n\n"+log;logMess()}}}function danmu(str){if($('.ChatSend-button.is-gray').length!=0){var reconnectFlag=true;var n=$('.Barrage-text.Barrage-notice--red').length-1;if($("a.js-danmu-reconnect.Barrage-notice--red").eq(n).text()=="点击重新连接弹幕"){$('a.js-danmu-reconnect.Barrage-notice--red').eq(n)[0].click()}}if($('div.ChatSend-button').text()=='发送'||$('div.ChatSend-button').text()=='开火'){if(document.getElementById("random").checked){str=(str==lastText?str+" "+(Math.ceil(Math.random()*10)-1):str)}$(".ChatSend-txt").val(str);if(reconnectFlag){chatSendClick=setInterval(function(){$('div.ChatSend-button').click();if($('.ChatSend-txt').text().length==0){clearInterval(chatSendClick)}},3000)}else{$('div.ChatSend-button').click()}lastText=str;getNow();log=nowHMS+" 发送:"+lastText+"\n"+log;logMess();}}function loopSelect(){if(document.getElementById("loop").checked){$('#loopEnd').attr("disabled",false);$('#bnt_chatsend').css("font-weight","bold").val("循环发送")}else{$('#loopEnd').attr("disabled",true);$('#bnt_chatsend').css("font-weight","unset").val("发送")}}var loopEndFlag=false;function loopEndSelectFn(count,time){var loopEndSelect=$("#loopEnd").find("option:selected").text();loopEndFlag=false;switch(loopEndSelect){case'发送10次后停止':if(count>=9){$('#loop').prop("checked",false);loopEndFlag=true};break;case'发送20次后停止':if(count>=19){$('#loop').prop("checked",false);loopEndFlag=true}break;case'发送50次后停止':if(count>=49){$('#loop').prop("checked",false);loopEndFlag=true}break;case'手动停止':break;case'抽奖结束时停止':if($("div.UPlayerLotteryEnter.is-active").length==0){$('#loop').prop("checked",false);loopEndFlag=true};break;case'积分不再增加时停止':time=time>10000?time-5000:time-3000;var fixTime=loopIntervalTime-time;clearInterval(creditInterval);qfFlag=false;creditMess();setTimeout(function(){if(!qfFlag||count>=30){$('#loop').prop("checked",false);loopSelect();autoDanmuInterval=setInterval(autoDanmu,5000);autoDrawInterval=setInterval(autoDraw,5000);creditInterval=setInterval(function(){creditMess()},15000)}else{setTimeout(loopDanmu,fixTime,count)}},time);break}if(loopEndSelect!='积分不再增加时停止'){if(loopEndFlag){loopSelect();autoDanmuInterval=setInterval(autoDanmu,5000);autoDrawInterval=setInterval(autoDraw,5000)}else{setTimeout(loopDanmu,loopIntervalTime,count)}}}function getLoopIntervalTime(){var time=document.getElementById("loopintervaltime").value;loopIntervalTime=parseInt(time)*1000;$("#loopintervaltime").attr('title','当前循环随机时间间隔为'+time+'~'+(parseInt(time)+5)+'秒')}function loopDanmu(count){if(document.getElementById("loop").checked&&loopFlag){getLoopIntervalTime();loopSelect();intervalTime=Math.ceil(Math.random()*10);intervalTime=intervalTime>=5?(intervalTime-5)*1000:intervalTime*1000;if(document.getElementById("loop").checked){log=("下次发送间隔:"+(intervalTime+loopIntervalTime)/1000)+"秒\n"+log;logMess();setTimeout(function(){text=GM_getValue('loopText',"小助手NB");if(document.getElementById("chattail").checked){danmu(fullTail(text))}else{danmu(text)}loopEndSelectFn(++count,loopIntervalTime);},intervalTime)}else{loopSelect()}}else{loopFlag=false}}function getCookie(cname){var name=cname+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i].trim();if(c.indexOf(name)==0)return c.substring(name.length,c.length)}return""}(function($){var supportedCSS,supportedCSSOrigin,styles=document.getElementsByTagName("head")[0].style,toCheck="transformProperty WebkitTransform OTransform msTransform MozTransform".split(" ");for(var a=0;a<toCheck.length;a++)if(styles[toCheck[a]]!==undefined){supportedCSS=toCheck[a]}if(supportedCSS){supportedCSSOrigin=supportedCSS.replace(/[tT]ransform/,"TransformOrigin");if(supportedCSSOrigin[0]=="T")supportedCSSOrigin[0]="t"}eval('IE = "v"=="\v"');jQuery.fn.extend({rotate:function(parameters){if(this.length===0||typeof parameters=="undefined")return;if(typeof parameters=="number")parameters={angle:parameters};var returned=[];for(var i=0,i0=this.length;i<i0;i++){var element=this.get(i);if(!element.Wilq32||!element.Wilq32.PhotoEffect){var paramClone=$.extend(true,{},parameters);var newRotObject=new Wilq32.PhotoEffect(element,paramClone)._rootObj;returned.push($(newRotObject))}else{element.Wilq32.PhotoEffect._handleRotation(parameters)}}return returned},getRotateAngle:function(){var ret=[0];for(var i=0,i0=this.length;i<i0;i++){var element=this.get(i);if(element.Wilq32&&element.Wilq32.PhotoEffect){ret[i]=element.Wilq32.PhotoEffect._angle}}return ret},stopRotate:function(){for(var i=0,i0=this.length;i<i0;i++){var element=this.get(i);if(element.Wilq32&&element.Wilq32.PhotoEffect){clearTimeout(element.Wilq32.PhotoEffect._timer)}}}});var Wilq32=window.Wilq32||{};Wilq32.PhotoEffect=(function(){if(supportedCSS){return function(img,parameters){img.Wilq32={PhotoEffect:this};this._img=this._rootObj=this._eventObj=img;this._handleRotation(parameters)}}else{return function(img,parameters){this._img=img;this._onLoadDelegate=[parameters];this._rootObj=document.createElement('span');this._rootObj.style.display="inline-block";this._rootObj.Wilq32={PhotoEffect:this};img.parentNode.insertBefore(this._rootObj,img);if(img.complete){this._Loader()}else{var self=this;jQuery(this._img).bind("load",function(){self._Loader()})}}}})();Wilq32.PhotoEffect.prototype={_setupParameters:function(parameters){this._parameters=this._parameters||{};if(typeof this._angle!=="number"){this._angle=0}if(typeof parameters.angle==="number"){this._angle=parameters.angle}this._parameters.animateTo=(typeof parameters.animateTo==="number")?(parameters.animateTo):(this._angle);this._parameters.step=parameters.step||this._parameters.step||null;this._parameters.easing=parameters.easing||this._parameters.easing||this._defaultEasing;this._parameters.duration='duration'in parameters?parameters.duration:parameters.duration||this._parameters.duration||1000;this._parameters.callback=parameters.callback||this._parameters.callback||this._emptyFunction;this._parameters.center=parameters.center||this._parameters.center||["50%","50%"];if(typeof this._parameters.center[0]=="string"){this._rotationCenterX=(parseInt(this._parameters.center[0],10)/100)*this._imgWidth*this._aspectW}else{this._rotationCenterX=this._parameters.center[0]}if(typeof this._parameters.center[1]=="string"){this._rotationCenterY=(parseInt(this._parameters.center[1],10)/100)*this._imgHeight*this._aspectH}else{this._rotationCenterY=this._parameters.center[1]}if(parameters.bind&¶meters.bind!=this._parameters.bind){this._BindEvents(parameters.bind)}},_emptyFunction:function(){},_defaultEasing:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},_handleRotation:function(parameters,dontcheck){if(!supportedCSS&&!this._img.complete&&!dontcheck){this._onLoadDelegate.push(parameters);return}this._setupParameters(parameters);if(this._angle==this._parameters.animateTo){this._rotate(this._angle)}else{this._animateStart()}},_BindEvents:function(events){if(events&&this._eventObj){if(this._parameters.bind){var oldEvents=this._parameters.bind;for(var a in oldEvents){if(oldEvents.hasOwnProperty(a)){jQuery(this._eventObj).unbind(a,oldEvents[a])}}}this._parameters.bind=events;for(a in events){if(events.hasOwnProperty(a)){jQuery(this._eventObj).bind(a,events[a])}}}},_Loader:(function(){if(IE){return function(){var width=this._img.width;var height=this._img.height;this._imgWidth=width;this._imgHeight=height;this._img.parentNode.removeChild(this._img);this._vimage=this.createVMLNode('image');this._vimage.src=this._img.src;this._vimage.style.height=height+"px";this._vimage.style.width=width+"px";this._vimage.style.position="absolute";this._vimage.style.top="0px";this._vimage.style.left="0px";this._aspectW=this._aspectH=1;this._container=this.createVMLNode('group');this._container.style.width=width;this._container.style.height=height;this._container.style.position="absolute";this._container.style.top="0px";this._container.style.left="0px";this._container.setAttribute('coordsize',width-1+','+(height-1));this._container.appendChild(this._vimage);this._rootObj.appendChild(this._container);this._rootObj.style.position="relative";this._rootObj.style.width=width+"px";this._rootObj.style.height=height+"px";this._rootObj.setAttribute('id',this._img.getAttribute('id'));this._rootObj.className=this._img.className;this._eventObj=this._rootObj;var parameters;while(parameters=this._onLoadDelegate.shift()){this._handleRotation(parameters,true)}}}else{return function(){this._rootObj.setAttribute('id',this._img.getAttribute('id'));this._rootObj.className=this._img.className;this._imgWidth=this._img.naturalWidth;this._imgHeight=this._img.naturalHeight;var _widthMax=Math.sqrt((this._imgHeight)*(this._imgHeight)+(this._imgWidth)*(this._imgWidth));this._width=_widthMax*3;this._height=_widthMax*3;this._aspectW=this._img.offsetWidth/this._img.naturalWidth;this._aspectH=this._img.offsetHeight/this._img.naturalHeight;this._img.parentNode.removeChild(this._img);this._canvas=document.createElement('canvas');this._canvas.setAttribute('width',this._width);this._canvas.style.position="relative";this._canvas.style.left=-this._img.height*this._aspectW+"px";this._canvas.style.top=-this._img.width*this._aspectH+"px";this._canvas.Wilq32=this._rootObj.Wilq32;this._rootObj.appendChild(this._canvas);this._rootObj.style.width=this._img.width*this._aspectW+"px";this._rootObj.style.height=this._img.height*this._aspectH+"px";this._eventObj=this._canvas;this._cnv=this._canvas.getContext('2d');var parameters;while(parameters=this._onLoadDelegate.shift()){this._handleRotation(parameters,true)}}}})(),_animateStart:function(){if(this._timer){clearTimeout(this._timer)}this._animateStartTime=+new Date;this._animateStartAngle=this._angle;this._animate()},_animate:function(){var actualTime=+new Date;var checkEnd=actualTime-this._animateStartTime>this._parameters.duration;if(checkEnd&&!this._parameters.animatedGif){clearTimeout(this._timer)}else{if(this._canvas||this._vimage||this._img){var angle=this._parameters.easing(0,actualTime-this._animateStartTime,this._animateStartAngle,this._parameters.animateTo-this._animateStartAngle,this._parameters.duration);this._rotate((~~(angle*10))/10)}if(this._parameters.step){this._parameters.step(this._angle)}var self=this;this._timer=setTimeout(function(){self._animate.call(self)},10)}if(this._parameters.callback&&checkEnd){this._angle=this._parameters.animateTo;this._rotate(this._angle);this._parameters.callback.call(this._rootObj)}},_rotate:(function(){var rad=Math.PI/180;if(IE){return function(angle){this._angle=angle;this._container.style.rotation=(angle%360)+"deg";this._vimage.style.top=-(this._rotationCenterY-this._imgHeight/2)+"px";this._vimage.style.left=-(this._rotationCenterX-this._imgWidth/2)+"px";this._container.style.top=this._rotationCenterY-this._imgHeight/2+"px";this._container.style.left=this._rotationCenterX-this._imgWidth/2+"px"}}else{if(supportedCSS){return function(angle){this._angle=angle;this._img.style[supportedCSS]="rotate("+(angle%360)+"deg)";this._img.style[supportedCSSOrigin]=this._parameters.center.join(" ")}}else{return function(angle){this._angle=angle;angle=(angle%360)*rad;this._canvas.width=this._width;this._canvas.height=this._height;this._cnv.translate(this._imgWidth*this._aspectW,this._imgHeight*this._aspectH);this._cnv.translate(this._rotationCenterX,this._rotationCenterY);this._cnv.rotate(angle);this._cnv.translate(-this._rotationCenterX,-this._rotationCenterY);this._cnv.scale(this._aspectW,this._aspectH);this._cnv.drawImage(this._img,0,0);}}}})()};if(IE){Wilq32.PhotoEffect.prototype.createVMLNode=(function(){document.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!document.namespaces.rvml&&document.namespaces.add("rvml","urn:schemas-microsoft-com:vml");return function(tagName){return document.createElement('<rvml:'+tagName+' class="rvml">')}}catch(e){return function(tagName){return document.createElement('<'+tagName+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}})()}})(jQuery);