bilibili怎么看仅限台湾地区的番剧,b站仅限台湾地区怎么看,有网友表示进击的巨人第二季在B站就有,但是仅限港澳台地区,那怎么才能看呢?其实网友只需要修改脚本就可以了,下面为大家带来了B站仅限港澳台地区视频在线观看方法!
解决B站区域限制浏览器脚本
https://greasyfork.org/zh-CN/scripts/25718-%E8%A7%A3%E9%99%A4b%E7%AB%99%E5%8C%BA%E5%9F%9F%E9%99%90%E5%88%B6
怎么解除b站地区限制
十分简单的脚本 右键弹出菜单切换ip 方便国外用户切换到大陆ip看番
点击下面的脚本复制就可以了!
// ==UserScript==
// @Name Fuckbili.uc.js
// @description BiliBili破解地区限制
// @author 颜太吓
// @include chrome://browser/content/browser.xul
// @charset UTF-8
// @version 0.1
// ==/UserScript==
(function() {
'use strict';
let ip1 = '59.125.39.0';
let ip2 = '220.181.111.81';
window.bilibili = {
status: false,//启动时是否开启
ip: ip1,//默认ip,ip1为台湾ip ip2为大陆ip
ClickBtn: function(aEvent) {
aEvent.preventDefault();
aEvent.stopPropagation();
let btn = aEvent.target;
if (aEvent.button === 0) {
if (this.status == false) {
btn.setAttribute('status', "true");
this.load();
} else {
btn.setAttribute('status', "false");
this.unload();
}
}
if (aEvent.button === 2) {
let popup = document.getElementById('BiliBili-popup');
let x = btn.boxObject.screenX;
let y = btn.boxObject.screenY + btn.boxObject.height;
popup.showPopup(btn, x, y, 'popup', null, null);
}
},
load: function() {
let os = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService);
os.addObserver(this, "http-on-modify-request", false);
this.status = true;
},
unload: function() {
let os = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService);
os.removeObserver(this, "http-on-modify-request");
this.status = false;
},
observe: function(subject, topic, data) {
if (topic != "http-on-modify-request") return;
var http = subject.QueryInterface(Ci.nsIHttpChannel);
if (http.URI && (new RegExp("http://www.bilibili.com/video/av.*")).test(http.URI.spec)) {
http.setRequestHeader("X-Forwarded-For", this.ip, false);
http.setRequestHeader("Client-IP", this.ip, false);
}
if (http.URI && (new RegExp("http://interface.bilibili.com/playurl.*")).test(http.URI.spec)) {
http.setRequestHeader("X-Forwarded-For", this.ip, false);
http.setRequestHeader("Client-IP", this.ip, false);
}
},
};
if (bilibili.status == true) {
bilibili.load()
};
let aPopup = $C('menupopup', {
id: 'BiliBili-popup',
position: 'after_start',
onclick: 'event.preventDefault(); event.stopPropagation();',
onpopupshowing: 'let button = document.getElementById("BiliBili-button");button.setAttribute("open", "true");',
onpopuphiding: 'let button = document.getElementById("BiliBili-button");button.removeAttribute("open");'
});
document.getElementById('mainPopupSet').appendChild(aPopup);
let mi = $C("menuitem", {
label: '台湾ip',
oncommand: 'bilibili.ip = "' + ip1 + '";if(bilibili.status == true) {bilibili.unload();bilibili.load();}',
type: 'radio',
checked: bilibili.ip == ip1
});
aPopup.appendChild(mi);
let mi2 = $C("menuitem", {
label: '大陆ip',
oncommand: 'bilibili.ip = "' + ip2 + '";if(bilibili.status == true) {bilibili.unload();bilibili.load();}',
type: 'radio',
checked: bilibili.ip == ip2
});
aPopup.appendChild(mi2);
try {
CustomizableUI.createWidget({
id: 'BiliBili-button',
type: 'custom',
defaultArea: CustomizableUI.AREA_NAVBAR,
onBuild: function(aDocument) {
let toolbarbutton = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton');
let attributes = {
id: 'BiliBili-button',
class: 'toolbarbutton-1',
removable: 'true',
label: 'BiliBili破解地区限制',
tooltiptext: 'BiliBili破解地区限制',
onclick: 'bilibili.ClickBtn(event)',
status: bilibili.status
};
for (let a in attributes)
toolbarbutton.setAttribute(a, attributes[a]);
return toolbarbutton;
}
})
} catch (e) {};
let style = ' \
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); \
#BiliBili-button[cui-areatype="toolbar"] .toolbarbutton-icon {\
list-style-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABV0lEQVR42o2TTU7DMBCFHf6qIn7u0uxQFwFFSFF+drkFd+iyqNv2EHAIymnoCiElqF1QoTJfNVNZDkFEerI982b8/Ow4p18cx6d5nj8IblgnSXIiQwR07sjBgWt1rq7rY8aiKEaCneBDMCY2mUyOgObHmoMzOtQaQRZDSTxBkF3ey7K8y7JsAGR9S0xzzzKe2wZWOBO8CVrdAWwFa8XWi7fKnVGLtHlQAKHRcd0Ts4ZzjPmUybfgHnPSNL2uqupSpF8x+nNycOBSQ63TTg0Ec9+M9T9idhtwVdHOGrTsom6/CpZaFymIL8kxh2t+HRpgiBq64ZymyNuRs288XqfBhe0kZ3sJj0DMlMHtNMAglTcQwll4BGLkmMMNGzSe5Mj1f1HHxN+u0b9C/yrDa6QJChaq4ksN/A/sIS32T1lUTGWxUjXtX1DOSv6Vx/1T9kwahrL7YIXU/gCZVyQ0CpcVlwAAAABJRU5ErkJggg==);\
}\
#BiliBili-button[cui-areatype="toolbar"][status="true"] .toolbarbutton-icon {\
list-style-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABGElEQVR42o2SQU7DMBBFXQhERk1yF5YVG1j0NNyjFdtyAXZwiNJbcIOyQpWSKFlQVe6PeCNZliVa6TWTnz8/9jjOvX0ZN+JZLLgvxAwKtAUeeenT3zU39yKIg3hAuwKHdhAB719vZPDiHcOPeBIlPKIF8SHu7AXW+CL2ohMBjmKAo+l49vT4KWATN2BouQ6plgRupoBenMSS4TSiEjXXuG7wLOnpHUktBqbPYCPQCuqKnuCifdU83IlP6hk4tJ1weLs0wMMoBlsRVGij+XIB8+hNW+qYbbSyeS6g4WEpbtMtoJXUTRrAEGnK/whMhpg9Ro4toc4cYzsFvLKKXzFeCB+SepnoSnyzmu4ferxr4W1fFlRdiLd5nQELzdzzKdj2dgAAAABJRU5ErkJggg==);\
}\
#BiliBili-button[cui-areatype="menu-panel"] .toolbarbutton-icon, toolbarpaletteitem[place="palette"]> #BiliBili-button .toolbarbutton-icon {\
list-style-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABYUlEQVR42u1Xu27CQBB0EcVdaBP5Z1xYsvwqXUciteGXKPkB+APkggL4hwgkKOOCVMlOdI5Ox2FuwQ9AWBrJWu/NzN3ad2vLusbLdd2nOI5HhC1hHATBC5cDYzCWsAMXOI0HR1H0ToN+JMw4JoT4TOYAJ8dAXzFgbEInDiRJ8mFsIE3TZx0JYp7n9bjiiIHznBoam+DmH5v1gJBTCb40RBdBcObQOFgNCjqERd2iFYCWI8+8TfESSyqbjTc+60C8LEtmibrID6a+77/VvbmBE9yKVg4D33KwCXHFhGxgb6nL0vQ2f6B39QZoCw0ovgZwf0rgVD7bgCArn68NZliZf44BVonYfLdgQF7SDbMEmzoMhCAifOLewEBl/u19hg8DbRho7TAKw/BV7ZJ0x/EEiQ3MHF3XRHccD7pqSKCNbtZGe9SB+OqvJeuoKV3+N6VKWz4kzAlFA6KF4B6yf1Lu+voFX7p2BZ/wNVwAAAAASUVORK5CYII=);\
}\
#BiliBili-button[cui-areatype="menu-panel"][status="true"] .toolbarbutton-icon, toolbarpaletteitem[place="palette"]> #BiliBili-button[status="true"] .toolbarbutton-icon {\
list-style-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABMklEQVR42u2XvYrCUBCFbyHaxdbgE7kvIWhtfKW12xfYfQNJsYWx8QkkgpZarNXsGZgiHC5cLvm5CBYfhJnJOScpcidORJLi3O7kYwQ+wRV8gQy4SDK792ZaI+8cF4wlkAZ7kEWa70ljGRNgBSQ2BJsT65gAY5+I1aax5lYbBwJEiU1bzxv81AUowR1Ix9xNu1AvDjAHByADcTBPZ09u5sNSgYkG2ABJxEYDlFT8ATlwHZOrNnmV2nhS0cx7ISevPy0K4fqE/V4iwALUxoL74fn2AepGr+Z+aL5tgGA/NP/yAfiVXrgfnm8f4MOEznrN/dh59nt/B94Bhj6MZrwl+Y7jbxt0HTNXbd9xXABJRKEBJqBKYH5U71RLaaWevrV8C37BowfTh2lvm2t56r/j9AH+AZvzJ99l3mYpAAAAAElFTkSuQmCC);\
}\
'.replace(/\s+/g, " ");
let sspi = document.createProcessingInstruction('xml-stylesheet', 'type="text/css" href="data:text/css,' + encodeURIComponent(style) + '"');
document.insertBefore(sspi, document.documentElement);
function $C(name, attr) {
let el = document.createElement(name);
if (attr) Object.keys(attr).forEach(function(n) el.setAttribute(n, attr[n]));
return el;
};
})();
大多数人在上网的时候,都会浏览网页提供给我们的信息。……