// ==UserScript== // @name 知乎去首页加载广告【油猴教程专用,可能出现bug,不更新】 // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match https://www.zhihu.com/ // @icon https://www.google.com/s2/favicons?domain=zhihu.com // @grant none // @run-at document-start // ==/UserScript== let oldfetch=fetch function newobj(){} function fuckfetch(...bianliang){ return new Promise(function(resolve, reject){ oldfetch(...bianliang).then(function(response) { let handler = { get: function(target, prop, receiver) { if(typeof Reflect.get(target,prop)==='function') { if(Reflect.get(target,prop+'proxy')===undefined) { target[prop+'proxy']=(...funcargs)=> { let result=target[prop].call(target,...funcargs) if(bianliang.length!==0&&bianliang[0].indexOf('/api/v3/feed/topstory/recommend')!==-1&&prop==='json'){ return new Promise(function(resolve, reject){ result.then( function(data){ console.log('bianliang',bianliang) let retobj={ data:[], fresh_text:data.fresh_text, paging:data.paging, } for(let index=0;index