您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
过滤掉响应体中未关注的用户(不包括快转)
当前为
// ==UserScript== // @name 去除广告模块 // @name:zh 去除广告模块 // @namespace Violentmonkey Scripts // @match *://*.weibo.com/* // @include *://weibo.com/* // @exclude *://weibo.com/tv* // @grant none // @version 2.2 // @author fbz // @description 过滤掉响应体中未关注的用户(不包括快转) // @description:zh 过滤掉响应体中未关注的用户(不包括快转) // @require https://unpkg.com/[email protected]/dist/ajaxhook.min.js // ==/UserScript== (function(){ ah.proxy({ //请求发起前进入 onRequest: (config, handler) => { // console.log(config.url) handler.next(config); }, //请求发生错误时进入,比如超时;注意,不包括http状态码错误,如404仍然会认为请求成功 onError: (err, handler) => { // console.log(err.type) handler.next(err) }, //请求成功后进入 onResponse: (response, handler) => { const url = response.config.url let res = response.response if (url.includes('friendstimeline') && res){ res = JSON.parse(res) res.statuses = res.statuses.filter(item => item.user.following || item.screen_name_suffix_new) response.response = JSON.stringify(res) } handler.next(response) } }) })()