Skip to content

Commit

Permalink
chore: build
Browse files Browse the repository at this point in the history
  • Loading branch information
ipcjs authored and github-actions[bot] committed Jan 3, 2024
1 parent 2141901 commit 76f61df
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions scripts/bilibili_bangumi_area_limit_hack.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3216,15 +3216,31 @@ function scriptSource(invokeBy) {
RegExps.urlPath = (path) => new RegExp(`^(https?:)?//[\\w\\-\\.]+${_raw(path)}`);
})(RegExps || (RegExps = {}));

const data = {
"11783021": { "code": 0, "message": "0", "ttl": 1, "data": { "mid": 11783021, "name": "哔哩哔哩番剧出差", "sex": "保密", "face": "http://i2.hdslb.com/bfs/face/9f10323503739e676857f06f5e4f5eb323e9f3f2.jpg", "face_nft": 0, "face_nft_type": 0, "sign": "", "rank": 10000, "level": 6, "jointime": 0, "moral": 0, "silence": 0, "coins": 0, "fans_badge": false, "fans_medal": { "show": false, "wear": false, "medal": null }, "official": { "role": 3, "title": "哔哩哔哩番剧出差 官方账号", "desc": "", "type": 1 }, "vip": { "type": 0, "status": 0, "due_date": 0, "vip_pay_type": 0, "theme_type": 0, "label": { "path": "", "text": "", "label_theme": "", "text_color": "", "bg_style": 0, "bg_color": "", "border_color": "", "use_img_label": true, "img_label_uri_hans": "", "img_label_uri_hant": "", "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/d7b702ef65a976b20ed854cbd04cb9e27341bb79.png", "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/KJunwh19T5.png" }, "avatar_subscript": 0, "nickname_color": "", "role": 0, "avatar_subscript_url": "", "tv_vip_status": 0, "tv_vip_pay_type": 0, "tv_due_date": 0 }, "pendant": { "pid": 0, "name": "", "image": "", "expire": 0, "image_enhance": "", "image_enhance_frame": "", "n_pid": 0 }, "nameplate": { "nid": 0, "name": "", "image": "", "image_small": "", "level": "", "condition": "" }, "user_honour_info": { "mid": 0, "colour": null, "tags": [], "is_latest_100honour": 0 }, "top_photo": "http://i1.hdslb.com/bfs/space/cb1c3ef50e22b6096fde67febe863494caefebad.png", "theme": {}, "sys_notice": {}, "live_room": { "roomStatus": 1, "liveStatus": 0, "url": "https://live.bilibili.com/931774?broadcast_type=0\u0026is_room_feed=0", "title": "", "cover": "", "roomid": 931774, "roundStatus": 0, "broadcast_type": 0 }, "birthday": "", "school": { "name": "" }, "profession": { "name": "", "department": "", "title": "", "is_show": 0 }, "tags": null, "series": { "user_upgrade_status": 3, "show_upgrade_window": false }, "is_senior_member": 0, "mcn_info": null, "gaia_res_type": 0, "gaia_data": null, "is_risk": false, "elec": { "show_info": { "show": false, "state": -1, "title": "", "icon": "", "jump_url": "?oid=11783021" } }, "contract": { "is_display": false, "is_follow_display": false }, "certificate_show": false } },
"1988098633": { "code": 0, "message": "0", "ttl": 1, "data": { "mid": 1988098633, "name": "b站_戲劇咖", "sex": "保密", "face": "https://i1.hdslb.com/bfs/face/9718fb1aa9fa37d62749506f677c8f2f5804c725.jpg", "face_nft": 0, "face_nft_type": 0, "sign": "提供bilibili港澳台地區專屬戲劇節目。", "rank": 10000, "level": 6, "jointime": 0, "moral": 0, "silence": 0, "coins": 0, "fans_badge": false, "fans_medal": { "show": false, "wear": false, "medal": null }, "official": { "role": 0, "title": "", "desc": "", "type": -1 }, "vip": { "type": 0, "status": 0, "due_date": 0, "vip_pay_type": 0, "theme_type": 0, "label": { "path": "", "text": "", "label_theme": "", "text_color": "", "bg_style": 0, "bg_color": "", "border_color": "", "use_img_label": true, "img_label_uri_hans": "", "img_label_uri_hant": "", "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/d7b702ef65a976b20ed854cbd04cb9e27341bb79.png", "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/KJunwh19T5.png" }, "avatar_subscript": 0, "nickname_color": "", "role": 0, "avatar_subscript_url": "", "tv_vip_status": 0, "tv_vip_pay_type": 0, "tv_due_date": 0 }, "pendant": { "pid": 0, "name": "", "image": "", "expire": 0, "image_enhance": "", "image_enhance_frame": "", "n_pid": 0 }, "nameplate": { "nid": 0, "name": "", "image": "", "image_small": "", "level": "", "condition": "" }, "user_honour_info": { "mid": 0, "colour": null, "tags": [], "is_latest_100honour": 0 }, "top_photo": "http://i1.hdslb.com/bfs/space/cb1c3ef50e22b6096fde67febe863494caefebad.png", "theme": {}, "sys_notice": {}, "live_room": null, "birthday": "01-01", "school": { "name": "" }, "profession": { "name": "", "department": "", "title": "", "is_show": 0 }, "tags": null, "series": { "user_upgrade_status": 3, "show_upgrade_window": false }, "is_senior_member": 0, "mcn_info": null, "gaia_res_type": 0, "gaia_data": null, "is_risk": false, "elec": { "show_info": { "show": false, "state": -1, "title": "", "icon": "", "jump_url": "?oid=1988098633" } }, "contract": { "is_display": false, "is_follow_display": false }, "certificate_show": false } },
"2042149112": { "code": 0, "message": "0", "ttl": 1, "data": { "mid": 2042149112, "name": "b站_綜藝咖", "sex": "保密", "face": "https://i0.hdslb.com/bfs/face/member/noface.jpg", "face_nft": 0, "face_nft_type": 0, "sign": "", "rank": 10000, "level": 6, "jointime": 0, "moral": 0, "silence": 0, "coins": 0, "fans_badge": false, "fans_medal": { "show": false, "wear": false, "medal": null }, "official": { "role": 0, "title": "", "desc": "", "type": -1 }, "vip": { "type": 0, "status": 0, "due_date": 0, "vip_pay_type": 0, "theme_type": 0, "label": { "path": "", "text": "", "label_theme": "", "text_color": "", "bg_style": 0, "bg_color": "", "border_color": "", "use_img_label": true, "img_label_uri_hans": "", "img_label_uri_hant": "", "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/d7b702ef65a976b20ed854cbd04cb9e27341bb79.png", "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/KJunwh19T5.png" }, "avatar_subscript": 0, "nickname_color": "", "role": 0, "avatar_subscript_url": "", "tv_vip_status": 0, "tv_vip_pay_type": 0, "tv_due_date": 0 }, "pendant": { "pid": 0, "name": "", "image": "", "expire": 0, "image_enhance": "", "image_enhance_frame": "", "n_pid": 0 }, "nameplate": { "nid": 0, "name": "", "image": "", "image_small": "", "level": "", "condition": "" }, "user_honour_info": { "mid": 0, "colour": null, "tags": [], "is_latest_100honour": 0 }, "top_photo": "http://i1.hdslb.com/bfs/space/cb1c3ef50e22b6096fde67febe863494caefebad.png", "theme": {}, "sys_notice": {}, "live_room": null, "birthday": "", "school": { "name": "" }, "profession": { "name": "", "department": "", "title": "", "is_show": 0 }, "tags": null, "series": { "user_upgrade_status": 3, "show_upgrade_window": false }, "is_senior_member": 0, "mcn_info": null, "gaia_res_type": 0, "gaia_data": null, "is_risk": false, "elec": { "show_info": { "show": false, "state": -1, "title": "", "icon": "", "jump_url": "?oid=2042149112" } }, "contract": { "is_display": false, "is_follow_display": false }, "certificate_show": false } },
};
const typedData = data;

function injectFetch() {
// 当前未替换任何内容...
const originFetch = window.fetch;
window.fetch = function (input, init) {
util_debug('fetch', input, init);
return originFetch(input, init)
.then(r => {
// log('then', r)
return r;
return __awaiter(this, void 0, void 0, function* () {
const originResponse = yield originFetch(input, init);
if (typeof input === 'string') {
if (input.match(RegExps.url('api.bilibili.com/x/space/wbi/acc/info?'))) {
const json = yield originResponse.json();
if (json.code === -404) {
const mid = new URL(input, document.location.href).searchParams.get('mid');
if (mid && typedData[mid || '']) {
return new Response(JSON.stringify(typedData[mid]));
}
}
return new Response(JSON.stringify(json));
}
}
return originResponse;
});
};
}
Expand Down Expand Up @@ -3269,12 +3285,6 @@ function scriptSource(invokeBy) {
}), error => error);
}

var space_account_info_map = {
"11783021": { "code": 0, "message": "0", "ttl": 1, "data": { "mid": 11783021, "name": "哔哩哔哩番剧出差", "sex": "保密", "face": "http://i0.hdslb.com/bfs/face/9f10323503739e676857f06f5e4f5eb323e9f3f2.jpg", "sign": "", "rank": 10000, "level": 6, "jointime": 0, "moral": 0, "silence": 0, "coins": 0, "fans_badge": false, "fans_medal": { "show": false, "wear": false, "medal": null }, "official": { "role": 3, "title": "哔哩哔哩番剧出差 官方账号", "desc": "", "type": 1 }, "vip": { "type": 0, "status": 0, "due_date": 0, "vip_pay_type": 0, "theme_type": 0, "label": { "path": "", "text": "", "label_theme": "", "text_color": "", "bg_style": 0, "bg_color": "", "border_color": "" }, "avatar_subscript": 0, "nickname_color": "", "role": 0, "avatar_subscript_url": "" }, "pendant": { "pid": 0, "name": "", "image": "", "expire": 0, "image_enhance": "", "image_enhance_frame": "" }, "nameplate": { "nid": 0, "name": "", "image": "", "image_small": "", "level": "", "condition": "" }, "user_honour_info": { "mid": 0, "colour": null, "tags": [] }, "is_followed": true, "top_photo": "http://i2.hdslb.com/bfs/space/cb1c3ef50e22b6096fde67febe863494caefebad.png", "theme": {}, "sys_notice": {}, "live_room": { "roomStatus": 1, "liveStatus": 0, "url": "https://live.bilibili.com/931774", "title": "「梦之祭!部」 社团活动最终回", "cover": "http://i0.hdslb.com/bfs/live/c89c499096fa6527765de1fcaa021c9e2db7fbf8.jpg", "online": 0, "roomid": 931774, "roundStatus": 0, "broadcast_type": 0 }, "birthday": "", "school": { "name": "" }, "profession": { "name": "" }, "tags": null, "series": { "user_upgrade_status": 3, "show_upgrade_window": false } } },
"1988098633": { "code": 0, "message": "0", "ttl": 1, "data": { "mid": 1988098633, "name": "b站_戲劇咖", "sex": "保密", "face": "http://i0.hdslb.com/bfs/face/member/noface.jpg", "sign": "提供bilibili港澳台地區專屬戲劇節目。", "rank": 10000, "level": 2, "jointime": 0, "moral": 0, "silence": 0, "coins": 0, "fans_badge": false, "fans_medal": { "show": false, "wear": false, "medal": null }, "official": { "role": 0, "title": "", "desc": "", "type": -1 }, "vip": { "type": 0, "status": 0, "due_date": 0, "vip_pay_type": 0, "theme_type": 0, "label": { "path": "", "text": "", "label_theme": "", "text_color": "", "bg_style": 0, "bg_color": "", "border_color": "" }, "avatar_subscript": 0, "nickname_color": "", "role": 0, "avatar_subscript_url": "" }, "pendant": { "pid": 0, "name": "", "image": "", "expire": 0, "image_enhance": "", "image_enhance_frame": "" }, "nameplate": { "nid": 0, "name": "", "image": "", "image_small": "", "level": "", "condition": "" }, "user_honour_info": { "mid": 0, "colour": null, "tags": [] }, "is_followed": true, "top_photo": "http://i0.hdslb.com/bfs/space/cb1c3ef50e22b6096fde67febe863494caefebad.png", "theme": {}, "sys_notice": {}, "live_room": { "roomStatus": 0, "liveStatus": 0, "url": "", "title": "", "cover": "", "online": 0, "roomid": 0, "roundStatus": 0, "broadcast_type": 0 }, "birthday": "01-01", "school": { "name": "" }, "profession": { "name": "" }, "tags": null, "series": { "user_upgrade_status": 3, "show_upgrade_window": false } } },
"2042149112": { "code": 0, "message": "0", "ttl": 1, "data": { "mid": 2042149112, "name": "b站_綜藝咖", "sex": "保密", "face": "http://i0.hdslb.com/bfs/face/member/noface.jpg", "sign": "提供bilibili港澳台地區專屬綜藝節目。", "rank": 10000, "level": 3, "jointime": 0, "moral": 0, "silence": 0, "coins": 0, "fans_badge": false, "fans_medal": { "show": false, "wear": false, "medal": null }, "official": { "role": 0, "title": "", "desc": "", "type": -1 }, "vip": { "type": 0, "status": 0, "due_date": 0, "vip_pay_type": 0, "theme_type": 0, "label": { "path": "", "text": "", "label_theme": "", "text_color": "", "bg_style": 0, "bg_color": "", "border_color": "" }, "avatar_subscript": 0, "nickname_color": "", "role": 0, "avatar_subscript_url": "" }, "pendant": { "pid": 0, "name": "", "image": "", "expire": 0, "image_enhance": "", "image_enhance_frame": "" }, "nameplate": { "nid": 0, "name": "", "image": "", "image_small": "", "level": "", "condition": "" }, "user_honour_info": { "mid": 0, "colour": null, "tags": [] }, "is_followed": true, "top_photo": "http://i0.hdslb.com/bfs/space/cb1c3ef50e22b6096fde67febe863494caefebad.png", "theme": {}, "sys_notice": {}, "live_room": { "roomStatus": 0, "liveStatus": 0, "url": "", "title": "", "cover": "", "online": 0, "roomid": 0, "roundStatus": 0, "broadcast_type": 0 }, "birthday": "", "school": { "name": "" }, "profession": { "name": "" }, "tags": null, "series": { "user_upgrade_status": 3, "show_upgrade_window": false } } },
};

var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};

var fullExports = {};
Expand Down Expand Up @@ -3912,8 +3922,8 @@ function scriptSource(invokeBy) {
const json = JSON.parse(xhr.responseText);
if (json.code === -404) {
const mid = new URL(url).searchParams.get('mid');
if (space_account_info_map[mid]) {
return space_account_info_map[mid];
if (typedData[mid]) {
return typedData[mid];
}
}
}
Expand Down

0 comments on commit 76f61df

Please sign in to comment.