Greasy Fork is available in English.

解除B站区域限制

通过替换获取视频地址接口的方式, 实现解除B站区域限制;

< Commentaires sur 解除B站区域限制

Question / commentaire

§
Posté le: 11/03/2017
Édité le: 11/03/2017

[Closed] Use GM_xmlhttpRequest to load http context in https pages

GM_xmlhttpRequest API spec Example:

// @grant        GM_xmlhttpRequest
const GM_ajax_Json=({url,success,error=console.log,async=true})=>GM_xmlhttpRequest({url,synchronous:!async,onload:resp=success(JSON.parse(resp.responseText)),onerror:error});
let ajax=location.protocol.match('https')?GM_ajax_Json:$.ajax;

tested in tempenmonkey

ipcjsAuteur
§
Posté le: 11/03/2017

这是? 网站为https时使用GMxmlhttpRequest进行联网? 不行,这个脚本不能用GMxmlhttpRequest。 原因1,GM_xmlhttpRequest在Chrome中不能进行同步请求 原因2,这个脚本需要修改网页上的jQuery对象,在Firefox中有个沙盒,只有不使用油猴脚本的API才能退出沙盒。

ipcjsAuteur
§
Posté le: 03/04/2017

已经有支持https的服务器了,直接修改脚本中的biliplusHost变量就行。 详见:一些事项 - Greasy Forum

Poster une réponse

Connectez-vous pour poster une réponse.