remove the posts which make you sick

移除讨厌鬼的帖子

当前为 2015-07-04 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name remove the posts which make you sick
  3. // @author burningall
  4. // @description 移除讨厌鬼的帖子
  5. // @version 2015.7.4.2.4
  6. // @include *tieba.baidu.com/p/*
  7. // @include *tieba.baidu.com/*
  8. // @include *tieba.baidu.com/f?*
  9. // @grant GM_addStyle
  10. // @grant GM_getValue
  11. // @grant GM_setValue
  12. // @grant GM_listValues
  13. // @grant GM_deleteValue
  14. // @supportURL http://www.burningall.com
  15. // @contributionURL troy450409405@gmail.com|alipay.com
  16. // @namespace https://gf.qytechs.cn/zh-CN/users/3400-axetroy
  17. // ==/UserScript==
  18.  
  19. //============快捷键==========
  20. //【Ctrl】+【F3】-----调出控制面板
  21. //============样式区==========
  22. var style='\
  23. body{\
  24. -webkit-backface-visibility: hidden;\
  25. }\
  26. .blur{\
  27. -webkit-filter: blur(10px);\
  28. -moz-filter: blur(10px);\
  29. -o-filter: blur(10px);\
  30. -ms-filter: blur(10px);\
  31. filter: blur(10px);\
  32. }\
  33. #pannal-troy{\
  34. width:200px;\
  35. height:auto;\
  36. background:#303030;\
  37. color:#fff;\
  38. position:fixed;\
  39. z-index:1000000000;\
  40. text-align:center;\
  41. }\
  42. #pannal-troy>div{\
  43. margin:10px 0;\
  44. }\
  45. #pannal-troy input{\
  46. color:#3e3e3e;\
  47. }\
  48. #pannal-troy h3{\
  49. color:rgb(0, 255, 226);\
  50. }\
  51. #pannal-setting input[type=range]{\
  52. width:80%;\
  53. }\
  54. #fn input{\
  55. padding:5px;\
  56. margin:0 5px;\
  57. border:none;\
  58. cursor:pointer;\
  59. }\
  60. #fn input:hover{\
  61. background:#2A959D;\
  62. color:#fff;\
  63. }\
  64. #pannal-troy>span{\
  65. position:absolute;\
  66. padding:0 10px;\
  67. top:0;\
  68. right:0;\
  69. cursor:pointer;\
  70. opacity:0.8;\
  71. background:#fff;\
  72. color:#303030;\
  73. }\
  74. #blockWay{\
  75. color:#3e3e3e;\
  76. border:none;\
  77. }\
  78. #mars{\
  79. position:fixed;\
  80. width:100%;\
  81. height:100%;\
  82. background:rgba(155, 155, 155,0.5);\
  83. top:0;\
  84. left:0;\
  85. z-index:999999999;\
  86. }\
  87. #showList{\
  88. position:relative;\
  89. overflow-y:auto;\
  90. overflow-x:hidden;\
  91. width:100%;\
  92. height:93%;\
  93. }\
  94. #list{\
  95. position:absolute;\
  96. width:0;\
  97. height:100%;\
  98. top:-10px;\
  99. left:200px;\
  100. background:#303030;\
  101. }\
  102. #showList>li{\
  103. width:100%;\
  104. height:18px;\
  105. clear:both;\
  106. margin:10px 0;\
  107. cursor:pointer;\
  108. }\
  109. #showList>li:hover{\
  110. background-color:#54A19E;\
  111. color:#303030;\
  112. }\
  113. .key{\
  114. float:left;\
  115. clear:both;\
  116. margin-left:10px;\
  117. }\
  118. .col{\
  119. border:none;\
  120. }\
  121. .deletThis{\
  122. float:right;\
  123. cursor:pointer;\
  124. margin-right:10px;\
  125. padding:0 5px;\
  126. border:0;\
  127. height:18px;\
  128. }\
  129. .disable-btn{\
  130. background:#6B6B6B;\
  131. cursor:not-allowed;\
  132. }\
  133. #addBlackList input{\
  134. width:80%;\
  135. }\
  136. #thread_list>li[data-field] .threadlist_lz>.threadlist_author,.l_post .d_name{\
  137. background:#303030;\
  138. }\
  139. #sear{\
  140. position:relative;\
  141. margin:0 auto;\
  142. display:none;\
  143. text-align:center;\
  144. height:21px;\
  145. width:100%;\
  146. border:none;\
  147. }\
  148. ';
  149. GM_addStyle(style);
  150. //============公共函数区==========
  151. function addEvent(obj, event, fn) {
  152. return obj.addEventListener ? obj.addEventListener(event, fn, false) : obj.attachEventListener('on' + event, fn);
  153. };
  154. function getStyle(obj, attr) {
  155. return obj.currentStyle ? obj.currentStyle[attr] : getComputedStyle(obj)[attr];
  156. };
  157. function $(id) {
  158. return document.getElementById(id)
  159. };
  160. function getSize(attr){
  161. return document.documentElement[attr] ? document.documentElement[attr] : document.body[attr]
  162. }
  163. function doMove(obj, attr, dir, target, endFn) {
  164. dir = parseInt(getStyle(obj, attr)) < target ? dir: -dir; //对于方向矫正
  165. clearInterval(obj.timerMove) //清楚定时器
  166. obj.timerMove = setInterval(function() {
  167. var speed = parseInt(getStyle(obj, attr)) + dir //步长
  168. if (speed > target && dir > 0 || speed < target && dir < 0) { //判断往前或往后
  169. speed = target;
  170. };
  171. obj.style[attr] = speed + "px" //赋值
  172. if (speed == target) {
  173. clearInterval(obj.timerMove);
  174. endFn && endFn(); //回掉函数
  175. };
  176. },
  177. 30)
  178. };
  179. function uniqueArray(data){
  180. data = data || [];
  181. var a = {};
  182. for (var i=0; i<data.length; i++) {
  183. var v = data[i];
  184. if (typeof(a[v]) == 'undefined'){
  185. a[v] = 1;
  186. }
  187. };
  188. data.length=0;
  189. for (var i in a){
  190. data[data.length] = i;
  191. }
  192. return data;
  193. }
  194. //============主要代码区==========
  195. function juggUrl(){
  196. var url=location.href;
  197. var postIn=/.*tieba.baidu.com\/p\/.*/ig;
  198. var postList=/.*tieba.baidu.com\/(f\?.*|[^p])/ig;
  199. if( postIn.test(url) ){//如果是帖子内
  200. return 1;
  201. }else if( postList.test(url) ){//如果在帖子列表
  202. return 2;
  203. }
  204. }
  205. function createList(){
  206. $('showList').innerHTML='';
  207. var li='';
  208. for(var i=0;i<GM_listValues().length;i++){
  209. //控制台输出 键名:键值
  210. var key = GM_listValues()[i];
  211. var value = GM_getValue( GM_listValues()[i],'');
  212. if( (typeof value =='number' && value>1000) || value==''){
  213. //console.log( GM_listValues()[i] + ":" + GM_getValue(GM_listValues()[i],'') );
  214. li += '<li class="show_list" data="'+ key +'">'+'<span class="key">'+key+'</span>'+'<input class="deletThis" type="button" value="删除"/>'+'</li>';
  215. }//if
  216. }//for
  217. $('showList').innerHTML=li;
  218. var aDeleBtn=document.querySelectorAll('.deletThis');
  219. for(var i=0;i<aDeleBtn.length;i++){
  220. aDeleBtn[i].onclick=function(){
  221. var thisKey = this.parentNode.getAttribute('data');//获取当前结点的key
  222. GM_deleteValue( thisKey );//删除变量
  223. this.parentNode.remove( this.parentNode );//删除节点
  224. }//clickb
  225. }//for
  226. };
  227. function marks(obj){
  228. if(obj.querySelectorAll('mar').length>=1){
  229. return;
  230. }
  231. var oMar = document.createElement('div');
  232. oMar.className = 'mar';
  233. obj.style.position = 'relative';
  234. obj.style.webkitFilter = 'blur('+ GM_getValue('setting-gus','3') +'px)';//chrome
  235. obj.style.filter = 'blur('+ GM_getValue('setting-gus','3') +'px)';//firefox
  236. obj.style.oFilter = 'blur('+ GM_getValue('setting-gus','3') +'px)';//opera
  237. obj.style.msFilter = 'blur('+ GM_getValue('setting-gus','3') +'px)';//IE
  238. obj.style.webkitBackfaceVisibility = 'hidden';
  239. obj.appendChild( oMar );
  240. oMar.style.width = parseInt( getStyle(obj,'width') ) + 'px';
  241. oMar.style.height = parseInt( getStyle(obj,'height') ) + 'px';
  242. oMar.style.background = GM_getValue('setting-col','#ffffff');
  243. oMar.style.position = 'absolute';
  244. oMar.style.top = '0';
  245. oMar.style.left = '0';
  246. oMar.style.zIndex = '999999998';
  247. oMar.style.opacity = GM_getValue('setting-opa','0.8');
  248. oMar.style.filter = 'alpha(opacity=' + GM_getValue('setting-opa','0.8')*100 +')';
  249. };
  250. function blockMod(){
  251. if( GM_getValue('setting-blockWay','遮罩屏蔽')=='遮罩屏蔽' ){
  252. return 1;//遮罩模式
  253. }else{
  254. return 2;//删除节点
  255. }
  256. }
  257.  
  258. function btclick(This,list,n){
  259. var _thisTop,_thisUserId,_thisUserName,nowUserId,nowUserName;
  260. if(n=='postList'){
  261. _thisTop = This.parentNode.parentNode.parentNode.parentNode;
  262. _thisUserId = JSON.parse(_thisTop.getAttribute('data-field')).id;//当前id
  263. _thisUserName = JSON.parse(_thisTop.getAttribute('data-field')).author_name;//当前userName
  264. }else if(n=='post'){
  265. _thisTop = This.parentNode.parentNode.parentNode;
  266. _thisUserId = JSON.parse(_thisTop.getAttribute('data-field')).author.user_id;//当前id
  267. _thisUserName = JSON.parse(_thisTop.getAttribute('data-field')).author.user_name;//当前userName
  268. }
  269. if ( confirm('是否屏蔽') == true) { //如果按下确认
  270. GM_setValue( _thisUserName,_thisUserId );
  271. for (var j = 0; j < list.length; j++) {//循环匹配是否符合
  272. var userInfo = JSON.parse(list[j].getAttribute('data-field'))
  273. if(n=='postList'){
  274. nowUserId = userInfo.id;
  275. nowUserName = userInfo.author_name;
  276. }else if(n=='post'){
  277. nowUserId = userInfo.author.user_id;
  278. nowUserName = userInfo.author.user_name;
  279. }
  280. if (nowUserId == _thisUserId || nowUserName==_thisUserName) {//匹配成功
  281. if( blockMod()==1 ){//遮罩模式
  282. marks(list[j]);
  283. }else{//删除节点模式
  284. list[j].style.display = 'none';
  285. }
  286. }//匹配是否符
  287. } //for
  288. }//if如果按下确认
  289. }
  290. function block(name,id,list,I){
  291. for(var j=0;j<GM_listValues().length;j++){
  292. if( GM_listValues()[j] == name || GM_getValue(GM_listValues()[j],'') == id ){//如果匹配到
  293. if( blockMod()==1 ){//遮罩模式
  294. marks(list[I]);
  295. }else{//删除节点模式
  296. list[I].style.display = 'none';
  297. }
  298. }//匹配是否符合
  299. }//for,遍历屏蔽
  300. }
  301.  
  302. function autoTips(){
  303. var aUsers,userName,userId;
  304. if( juggUrl()==1 ){//帖子内
  305. var aTipsArr = new Array();
  306. var newString = '';
  307. aUsers = document.querySelectorAll('#j_p_postlist>div[data-field]');//获取列表
  308. for(var i=0;i<aUsers.length;i++){
  309. userName = JSON.parse(aUsers[i].getAttribute('data-field')).author.user_name;//第i个userName
  310. userId = JSON.parse(aUsers[i].getAttribute('data-field')).author.user_id;//第i个userId
  311. aTipsArr.push( userName );
  312. }
  313. uniqueArray( aTipsArr );
  314. for(var i=0;i<aTipsArr.length;i++){
  315. newString += '<option value="' + aTipsArr[i] + '" />';
  316. }
  317. lst.innerHTML = newString;
  318. }else{//帖子列表
  319. var aTipsArr = new Array();
  320. var newString = '';
  321. aUsers=document.querySelectorAll('#thread_list>li[data-field]');//获取列表
  322. for(var i=0;i<aUsers.length;i++){
  323. userName = JSON.parse(aUsers[i].getAttribute('data-field')).author_name;//第i个userName
  324. userId = JSON.parse(aUsers[i].getAttribute('data-field')).id;//第i个userId
  325. aTipsArr.push( userName );
  326. }
  327. uniqueArray( aTipsArr );
  328. for(var i=0;i<aTipsArr.length;i++){
  329. newString += '<option value="' + aTipsArr[i] + '" />';
  330. }
  331. lst.innerHTML = newString;
  332. }//if....else
  333. }
  334. function init() {//初始化程序
  335. //先清空
  336. var aBlockBtn = document.querySelectorAll('.shutup-post,.shutup-list,.mar')
  337. for(var i=0;i<aBlockBtn.length;i++){
  338. aBlockBtn[i].remove(this);
  339. }
  340. //=======帖子内==========
  341. if( juggUrl()==1 ){
  342. var aUsers = document.querySelectorAll('#j_p_postlist>div[data-field]');//获取列表
  343. var aName = document.querySelectorAll('.l_post .d_name');//屏蔽按钮将要插入的位置
  344. for (var i = 0; i < aUsers.length; i++) {
  345. //获取id和name
  346. var userName = JSON.parse(aUsers[i].getAttribute('data-field')).author.user_name;//第i个userName
  347. var userId = JSON.parse(aUsers[i].getAttribute('data-field')).author.user_id;//第i个userId
  348. //添加点击事件
  349. aName[i].onclick=function(){
  350. var this_=this;
  351. btclick(this_,aUsers,'post','author[user_id]','author[user_name]');
  352. }
  353. //页面加载开始屏蔽
  354. block(userName,userId,aUsers,i);
  355. } //for,遍历所有节点
  356. //=======帖子列表==========
  357. }else if( juggUrl()==2 ){
  358. var aUsers=document.querySelectorAll('#thread_list>li[data-field]');//获取列表
  359. var aName = document.querySelectorAll('#thread_list>li[data-field] .threadlist_lz>.threadlist_author');//屏蔽按钮将要插入的位置
  360. for(var i=0;i<aUsers.length;i++){
  361. //获取id和name
  362. var userName = JSON.parse(aUsers[i].getAttribute('data-field')).author_name;//第i个userName
  363. var userId = JSON.parse(aUsers[i].getAttribute('data-field')).id;//第i个userId
  364. //添加点击事件
  365. aName[i].onclick=function(){
  366. var this_=this;
  367. btclick(this_,aUsers,'postList','id','author_name');
  368. }
  369. //页面加载开始屏蔽
  370. block(userName,userId,aUsers,i)
  371. }//for,遍历所有节点
  372. }//在帖子列表
  373. }//初始化
  374. //============执行区==========
  375. addEvent(window,'load',function(){
  376. init();
  377. })
  378. //跟随翻页加载
  379. var aUsers,aShut;
  380. addEvent(window,'scroll',function(){
  381. if( getSize('scrollTop') == 0){
  382. if( juggUrl()==1 ){//帖子内
  383. aUsers = document.querySelectorAll('#j_p_postlist>div[data-field]');
  384. aShut = document.querySelectorAll('.shutup-post');
  385. }else if(juggUrl()==2){//帖子列表
  386. aUsers=document.querySelectorAll('#thread_list>li[data-field]');
  387. aShut = document.querySelectorAll('.shutup-list');
  388. }
  389. if(aShut.length <= aUsers.length){//如果不存在屏蔽按钮
  390. init();
  391. }
  392. }//如果滚动到顶部
  393. })
  394. //============控制面板以及相关==========
  395. addEvent(window,'resize',function(){
  396. if( $('pannal-troy') ){
  397. $('pannal-troy').style.top = ( getSize('clientHeight') - $('pannal-troy').offsetHeight )/2 + 'px';
  398. $('pannal-troy').style.left = ( getSize('clientWidth') - $('pannal-troy').offsetWidth )/2 + 'px';
  399. }
  400. })
  401. addEvent(window,'keyup',function(e){
  402. var e = e || window.event;
  403. if( e.ctrlKey && e.keyCode==114 ){//快捷键ctrl+F3
  404. if( $('pannal-troy') ) return;
  405. var pannal = document.createElement('div');
  406. var pannal_mars = document.createElement('div');
  407. pannal_mars.id = 'mars';
  408. pannal_mars.className = "blur";
  409. pannal.id = 'pannal-troy';
  410. pannal.innerHTML='\
  411. <h3>配置参数</h3>\
  412. <div id="pannal-setting">\
  413. 屏蔽方式:<select id="blockWay">\
  414. <option>遮罩屏蔽</option>\
  415. <option>删除节点</option>\
  416. </select><br/>\
  417. 遮罩层颜色:<input id="col" type="color" /><br/>\
  418. 遮罩透明度(0~1):<span id="opa-text"></span><input id="opa" type="range" min="0" max="1" step="0.1" /><br/>\
  419. 高斯模糊像素(0~10):<span id="gus-text"></span><input id="gus" type="range" min="0" max="10" step="1" /><br/>\
  420. </div>\
  421. <hr/>\
  422. <h3>添加讨厌鬼</h3>\
  423. <div id="addBlackList">\
  424. 数字ID(选填):<input id="userId" type="text" placeholder="user_id"/><br/>\
  425. 贴吧ID(必填):<input id="userName" type="text" placeholder="user_name" list="lst" autocomplete="off"/>\
  426. <datalist id="lst" autocomplete="on"></datalist>\
  427. </div>\
  428. <hr/>\
  429. <h3>功能</h3>\
  430. <div id="fn">\
  431. <input id="save" type="button" value="保存" />\
  432. <input id="clear" type="button" value="清空" />\
  433. <input id="view" type="button" value=">>" />\
  434. </div>\
  435. <div id="list">\
  436. <input id="sear" type="text" list="BlackList" placeholder="搜索" autocomplete="off" />\
  437. <datalist id="BlackList" autocomplete="on"></datalist>\
  438. <ul id="showList"></ul>\
  439. </div>\
  440. <span id="queit">X</span>\
  441. '
  442. document.body.appendChild( pannal );
  443. document.body.appendChild( pannal_mars );
  444. pannal.style.top = ( getSize('clientHeight') - pannal.offsetHeight )/2 + 'px';
  445. pannal.style.left = ( getSize('clientWidth') - pannal.offsetWidth )/2 + 'px';
  446. //初始化
  447. $('blockWay').value = GM_getValue('setting-blockWay','遮罩屏蔽' );//屏蔽方式
  448. $('col').value = GM_getValue('setting-col','#ffffff'); //默认遮罩的颜色
  449. $('opa').value = GM_getValue('setting-opa','0.8'); //默认遮罩透明度
  450. $('opa-text').innerHTML = $('opa').value;
  451. $('gus').value = GM_getValue('setting-gus','3'); //默认遮罩下的高斯模糊半径
  452. $('gus-text').innerHTML = $('gus').value;
  453. createList(); //加载黑名单列表
  454. addEvent($('opa'),'input',function(){
  455. $('opa-text').innerHTML = $('opa').value;
  456. })
  457. addEvent($('gus'),'input',function(){
  458. $('gus-text').innerHTML = $('gus').value;
  459. })
  460. //智能提示userName和userId
  461. addEvent($('userName'),'input',function(){
  462. autoTips();
  463. })
  464. //删除节点模式则禁用选项
  465. addEvent($('blockWay'),'input',function(){
  466. var aInput=[$('col'),$('opa'),$('gus')]
  467. if( $('blockWay').value == '删除节点' ){//删除节点模式
  468. for(var i=0;i<aInput.length;i++){
  469. aInput[i].readOnly = 'true';
  470. aInput[i].className = 'disable-btn';
  471. }
  472. }else{//遮罩屏蔽模式模式
  473. for(var i=0;i<aInput.length;i++){
  474. aInput[i].readOnly = 'false';
  475. aInput[i].className = '';
  476. }
  477. }
  478. })
  479. //====保存按钮====
  480. addEvent($('save'),'click',function(){
  481. //判断屏蔽方式
  482. if($('blockWay').value=='遮罩屏蔽'){
  483. GM_setValue('setting-blockWay','遮罩屏蔽');
  484. }else if($('blockWay').value=='删除节点'){
  485. GM_setValue('setting-blockWay','删除节点');
  486. }
  487. //遮罩颜色
  488. GM_setValue('setting-col',$('col').value);
  489. //遮罩透明度1
  490. GM_setValue('setting-opa',$('opa').value);
  491. //高斯模糊半径
  492. GM_setValue('setting-gus',$('gus').value);
  493. //匹配ID是否正确
  494. var reg=/^[0-9]{9}$/ig;
  495. if( $('userName').value!='' && (reg.test($('userId').value)==true || $('userId').value=='') ){
  496. //保存形式:user_name:user_id
  497. GM_setValue( $('userName').value,$('userId').value );
  498. alert('保存成功' + "\n用户名:" + $('userName').value + "\nID:" + GM_getValue($('userName').value,'') + '\n屏蔽方式:'+ GM_getValue('setting-blockWay','遮罩屏蔽' )+'\n遮罩颜色:' + GM_getValue('setting-col','#fff') + '\n遮罩透明度:'+ GM_getValue('setting-opa','0.8') +'\n高斯模糊:'+GM_getValue('setting-gus','3') );
  499. }else if( $('userName').value=='' && $('userId').value==''){
  500. alert('保存成功\n屏蔽方式:'+ GM_getValue('setting-blockWay','遮罩屏蔽' )+'\n遮罩颜色:' + GM_getValue('setting-col','#fff') + '\n遮罩透明度:'+ GM_getValue('setting-opa','0.8') +'\n高斯模糊:'+GM_getValue('setting-gus','3') )
  501. }else{
  502. alert('输入不正确:\n数字ID:选填(如果填了必须是9位数字)\n贴吧ID:必填')
  503. }
  504. if( parseInt( getStyle($('list'),'width') )>0 ){//如果列表已经展开
  505. createList()//重新生成列表
  506. }
  507. })
  508. //====清空按钮====
  509. addEvent($('clear'),'click',function(){
  510. for(var i=0;i<GM_listValues().length;i++){
  511. //清空所有变量
  512. //GM_deleteValue( GM_listValues()[i] ) + ":" + GM_getValue( GM_listValues()[i],'' )
  513. var value = GM_getValue( GM_listValues()[i],'');
  514. if( (typeof value=='number' && value>1000) || value==''){
  515. GM_deleteValue( GM_listValues()[i] );//删除键名
  516. }
  517. }//for
  518. if( parseInt( getStyle($('list'),'width') )>0 ){//如果列表已经展开
  519. createList()//重新生成列表
  520. }
  521. })
  522. //====展开/收起按钮====
  523. var turn = false;
  524. addEvent($('view'),'click',function(){
  525. if(turn == false){
  526. $('showList').style.display = 'none';
  527. $('sear').style.display = 'none';
  528. doMove($('list'),'width',10,200,function(){//展开
  529. $('showList').style.display = 'block';
  530. $('sear').style.display = 'block';
  531. $('sear').focus();
  532. $('view').value = '<<';
  533. turn = true;
  534. });
  535. }else if( turn == true ){
  536. $('showList').style.display = 'none';
  537. $('sear').style.display = 'none';
  538. doMove($('list'),'width',10,0,function(){//收起
  539. $('view').value = '>>';
  540. turn = false;
  541. });
  542. }
  543. })
  544. //黑名单搜索
  545. var list = document.querySelectorAll('#showList .show_list');
  546. addEvent($('sear'),'input',function(){
  547. $('showList').innerHTML = '';
  548. var str = '';
  549. for(var i=0;i<list.length;i++){
  550. var userName = list[i].getAttribute('data');
  551. if( userName.indexOf( $('sear').value ) >=0 ){
  552. str += '<li class="show_list" data="'+ userName +'">'+'<span class="key">'+userName+'</span>'+'<input class="deletThis" type="button" value="删除"/>'+'</li>';
  553. }
  554. }//for
  555. $('showList').innerHTML = str;
  556. //添加点击事件
  557. var aDeleBtn=document.querySelectorAll('.deletThis');
  558. for(var i=0;i<aDeleBtn.length;i++){
  559. aDeleBtn[i].onclick=function(){
  560. var thisKey = this.parentNode.getAttribute('data');//获取当前结点的key
  561. GM_deleteValue( thisKey );//删除变量
  562. this.parentNode.remove( this.parentNode );//删除节点
  563. }//click
  564. }//for
  565. })
  566. //黑名单搜索
  567. addEvent(window,'keyup',function(e){
  568. var e= e || window.event;
  569. if(e.keyCode==8){//backspace
  570. if( $('sear').value == '' ){
  571. createList();
  572. }
  573. }
  574. })
  575. //===关闭按钮====
  576. addEvent($('queit'),'click',function(){
  577. $('pannal-troy').remove(this);
  578. $('mars').remove(this);
  579. })
  580. addEvent($('mars'),'click',function(){
  581. $('pannal-troy').remove(this);
  582. $('mars').remove(this);
  583. })
  584. }//if
  585. })//addEvent

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址