一键清空微博

2020-11-07  本文已影响0人  微风玉米

步骤1:建立「一键清空微博」书签

创建「一键清空微博」书签有两种办法:推荐使用方法1,操作简单
方法1:首先进入一键清空微博,然后拖拽文章中「一键清空微博」按钮到书签栏。

拖拽示意图
方法2:鼠标左键点击地址栏中你不想要的书签,比如小说大全,然后点击编辑,弹出一个书签编辑弹窗。
image.png

将标题改成「一键清空微博」并将地址改成下面的代码

javascript:!function(){if(/https?:\/\/weibo\.com/.test(location.href))if(Number($CONFIG.islogin))try{if(!confirm('确定清空微博!!!'))return;var e=document.createElement('script');e.type='text/javascript',e.src='//lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js',e.onload=function(){var e,t='W_clear-feeds__'+(new Date).getTime(),i='//weibo.com/'+parent.$CONFIG.uid+'/profile?profile_ftype=1&is_all=1&ajaxpagelet=1&ajaxpagelet_v6=1',n='//weibo.com/'+parent.$CONFIG.uid+'/profile?pids=Pl_Official_MyProfileFeed__20&profile_ftype=1&is_all=1&ajaxpagelet=1&ajaxpagelet_v6=1';function o(){document.body.appendChild($('<div id='+t+'></div>')[0])}function a(i,n){$.get(i).done(function(i){$('div#'+t).length||o(),$('#'+t).html(i),e=setTimeout(function(){clearTimeout(e),n()},2e3)}).fail(function(e){console.log(e),alert('清空失败!请刷新页面后重试!')})}o(),a(i,function e(){var t,i=$('[action-type=feed_list_item]'),o=i.length,l=0,r=0;if(0===o)return alert('清空微博成功!');!function c(){t=setTimeout(()=>{clearTimeout(t);const f=i[r];(function(e){return $.ajax({url:'//weibo.com/aj/mblog/del?ajwvr=6',type:'POST',dataType:'json',data:{mid:e}}).done(function(t){if('100000'===t.code){var i=$('[mid='+e+']');i.length&&i.hide('slow',function(){i.remove()});var n=$($('.tb_counter .W_f18')[2]).text();n--,$($('.tb_counter .W_f18')[2]).text(n)}})})($(f).attr('mid')).always(function(){++l===o&&a(n,e)}),++r<o&&c()},1e3)}()})},e.onerror=function(e){alert(e)},document.getElementsByTagName('head')[0].appendChild(e)}catch(e){alert(e)}else alert('请先登录微博!')}();

步骤2:打开微博主页并登录

进入微博首页,如果微博已经登录的,可以进入步骤3。如果没有登录,需要登录自己的微博账号。

步骤3:点击书签栏上的「一键清空微博」

点击书签

其他

上一篇 下一篇

猜你喜欢

热点阅读