// ==UserScript== // @name 百度贴吧增强——【花生米】 // @namespace http://www.popcat3.xyz/ // @version 1.0 // @description 百度贴吧增强;去广告、自动签到、免除重定向直接跳转到目标链接、搜索楼主全部贴子 // @author HuaShengMi // @require http://cdn.bootcss.com/jquery/1.8.3/jquery.min.js // @match *://tieba.baidu.com/* // @license GPL-3.0-only // @grant GM_setClipboard // @grant GM_getValue // @grant GM_setValue // @run-at document-end // @compatible Chrome // @downloadURL none // ==/UserScript== /* eslint-disable no-redeclare */ /* eslint-disable no-undef */ (function() { 'use strict'; var titleStr=''; function my_ads() { var k=0; var obj1=$('iframe'); //console.log(obj1.length); var i=0; if(obj1 != null && obj1.length>0) { for(i=0;i0) { for(i=0;i0) { for(i=0;i0) { for(i=0;i0) { var var2=var1[0].querySelector('a.dialogJclose'); if(var2!=null) { var2.click(); } } //---------- }, 1000); setTimeout(function(){ var obj6 = document.querySelector('a.focus_btn.cancel_focus'); var obj5 = document.querySelector('a[title="签到完成"]'); var obj7 = document.querySelector('a[title="签到"]'); if(obj5==null && obj6!=null && obj7!=null) { obj7.click(); setTimeout(() => { var obj4=document.querySelectorAll("div.j_succ_info.sign_succ1"); if(obj4!=null && obj4.length>0) obj4[0].style.display = "none"; }, 1000); } var seastr=''; var obj10 = document.querySelectorAll('div.d_author'); if(obj10!=null && obj10.length>0) { for(var i=0;i1 && titleStr.length>1) { const newLi = document.createElement('li'); newLi.classList.add('j_tbnav_tab'); const newLink = document.createElement('a'); newLink.href = 'https://tieba.baidu.com/f/search/res?ie=utf-8&kw='+titleStr+'&qw='+seastr; newLink.textContent = '搜索楼主全部贴子'; newLink.target = '_blank'; newLi.appendChild(newLink); obj1.appendChild(newLi); } }, 1500); })();