您好,欢迎访问一九零五行业门户网

92cc.com脚本:一键点赞;一键留言板或回复;群发私信;全站广告拦截;美化92cc.com歌曲播放页面_html/css_WEB-ITnose

// ==userscript==// @name 92cc.com重排版// @namespace gsf@92cc.com// @author xinggsf~gmail。com// @description 一键点赞;一键留言板或回复;群发私信;全站广告拦截;美化92cc.com歌曲播放页面// @description:en set css sytle on 92cc.com site// @license gpl version 3// @include http://*.92cc.com/*// @homepageurl https://greasyfork.org/scripts/6562// @updateurl https://greasyfork.org/scripts/6562/code/92cccom.user.js// @downloadurl https://greasyfork.org/scripts/6562/code/92cccom.user.js// @version 0.2.23// @encoding utf-8// @modified 01/28/2015// @run-at document-body// @grant none// ==/userscript==window._92cc_utils = { jsaddrinfo: '嗨友必备眩酷神器\nhttps://greasyfork.org/zh-cn/scripts/6562\n', frcount: 0, failgetlist: false, frlist: [], callback: null,//响应事件 itimer: null, infoindex: 0, info:'', page: 1, ptimer: null, praiseindex: 0,//轮询计数 getinput: function (atitle) { var res = '', x = '
'; $.dialog({ id:'sendmsg', title: atitle, width:'360px', lock:true, content: x, okvalue: '确认', ok: function() { var s, $fnote = $(#fnote); s = $.trim($fnote.emoteditor(content)); s = (s==)? '请输入内容' : (s.length > 470)? '您写多了!' : ''; if (s==='') { res = $.trim($fnote.emoteditor(content)); return true; } $.tipmessage(s, 1, 1000); $fnote.focus(); return false; }, cancelvalue: '取消', cancel:function() {} }); return res; }, //解析html parsehtml: function(resp) { var s, me = _92cc_utils; me.failgetlist = false; if (0 === me.frcount) { s = resp.match(/(\d+)/); if (null === s) { me.failgetlist = true; $.tipmessage('网络错误或解析失败!', 2, 3000); return; } me.frcount = 0 | s[1]; //console.log(me.frcount); if (0 === me.frcount) { me.failgetlist = true; $.tipmessage('你没有加关注的朋友!', 2, 3000); return; } } s = resp.match(/\d+(?=\/ +?class=user_card>)/g); //s = resp.split(/uid=(\d+)/); //if (0 === s.length) if (!s) { me.failgetlist = true; $.tipmessage('网络错误或解析失败!', 2, 3000); return; } //console.log(s.length); if (me.frlist.length === 0) me.frlist = s; else s.push.apply(me.frlist, s); if (me.callback) { //me.callback(); me.callback = null; } if (me.frcount > me.frlist.length) { me.page += 1; settimeout('_92cc_utils.getfriendlist();', 1222); } }, getfriendlist: function () { if (this.frcount === 0 || this.frcount > this.frlist.length) { var s = (this.page === 1) ? /relation?a=following : /relation?a=following&currpage= + this.page; this.failgetlist = false; $.get(s, this.parsehtml, html); } }, dopraise: function() { var me = _92cc_utils; if (me.callback) return; if (me.frcount === me.praiseindex || (me.failgetlist && me.frlist.length === me.praiseindex)) { clearinterval(me.ptimer); me.ptimer = null; $.tipmessage('已点赞了你所有的朋友!共 '+ me.praiseindex + ' 个!', 0, 3000); return; } if (0 === me.frlist.length || me.frlist.length === me.praiseindex) return;//等待数据 $.post(/user?a=douserpraiseupdate&uid=+ me.frlist[me.praiseindex]); me.praiseindex++; }, praiseallfriend: function() { if (this.ptimer) { $.tipmessage('今天已点赞!', 1, 3000); return; } this.praiseindex = 0; this.getfriendlist(); this.callback = this.frcount === 0; this.ptimer = setinterval(_92cc_utils.dopraise, 100); $.tipmessage('正在点赞!请稍候......', 0, 3000); }, dosendinfo: function() { var me = _92cc_utils; if (me.callback) return; if (me.frcount === me.infoindex || (me.failgetlist && me.frlist.length === me.infoindex)) { clearinterval(me.itimer); me.itimer = null; $.tipmessage(me.infoindex + ' 条私信已全部发出!', 0, 3000); return; } if (0 === me.frlist.length || me.frlist.length === me.infoindex) return;//等待数据 $.post(/message?a=domsgadd, {uid: me.frlist[me.infoindex], note: me.info}, text ); me.infoindex++; }, sendallinfo: function() { if (this.itimer) { $.tipmessage('还有私信正在发送,请稍候......', 1, 3000); return; } var s = this.getinput('请输入对所有朋友发送的私信'); if (s === '') return; this.info = this.jsaddrinfo + s; this.infoindex = 0; this.callback = this.frcount === 0; this.getfriendlist(); //if (this.failgetlist) return; this.itimer = setinterval(_92cc_utils.dosendinfo, 200); $.tipmessage('正在发送私信!请稍候......', 0, 3000); }, init: function() { this.getfriendlist(); }, uninit: function() { // for (let i in this.timers) { // clearinterval(this.timers[i]); // } }};(function () { var s, x, addr; //要删除的元素列表,填入css选择器 s = ['script[src^=http://cbjs.baidu.com/]', 'script[src^=http://cb.baidu.com/]', 'script[src*=.baidustatic.com/]', 'script[src*=.cnzz.com/]', '[id^=baidu_]', '#mp_banner_top', '.player > h1', '.logo', '.header+.play_content', '.banner_text']; //用原生api queryselectorall加快速度 addr = s.foreach; s.foreach(function (o) { x = document.queryselectorall(o); if (x.length > 0) addr.call(x, function (e) { e.parentnode.removechild(e); }); }); s = null; x = $('script[src*=/new/recommend/player]'); if (x.length > 0) { var src = x.attr('src'); //console.log(src); //删除低效的内容生成js,和可能已经生成的内容 s = x.parent().empty(); x = null; $.get(src, function (res) { var t = res.replace(/document\.writeln\((.+?)\);/g, '$1') //删除多加在双引号前的斜线号 .replace(/\\/g, '\'); //console.log(t); s.html(t); //替换内容生成js s = null; //重新绑定事件 mplayer.addlist(); mplayer.selectdanceall(); }, 'text'); } addr = document.url.tolowercase(); if (/^http:\/\/www\.92cc\.com\/p\d+\.html/.test(addr)) { x = $(.play_content > .right_bot); $(.play_content > .right).replacewith(x); x.css({ 'right' : '0', 'float' : 'right' }); x.children(':gt(0)').css('margin-top', '-12px'); x = null; $(.header).css('height', '55px'); $(.content).css('top', '-15px'); $(.play_content).css('top', '-9px'); //删除div.banner内的广告;并用链式语法设定高度 $(.banner).empty().css('height', '3px'); } //会员功能 else if (document.userinfo && 0 === addr .indexof('http://i.92cc.com/')) { //添加按钮 }})();
其它类似信息

推荐信息