kemono.user.js を更新

このコミットが含まれているのは:
skscript 2023-10-28 12:46:14 +09:00
コミット 2f89e44374
1個のファイルの変更10行の追加10行の削除

ファイルの表示

@ -31,7 +31,7 @@
this.href = href;
}
extract_user_id() {
extract_metadata() {
const re = /https:\/\/fantia.jp\/fanclubs\/(?<userid>\d+)/i;
const match = this.href.match(re);
if(match) {
@ -56,7 +56,7 @@
this.href = href;
}
extract_user_id() {
extract_metadata() {
return {err: 'Try again in the Pixiv user page of this person. Note: Pixiv and Fanbox are run by the same company.\nこの人のPixiv(Fanboxではなく)のユーザーページへ移動してからもう一度実行してください'};
}
@ -74,7 +74,7 @@
this.href = href;
}
extract_user_id() {
extract_metadata() {
const re = /https:\/\/www.pixiv.net\/users\/(?<userid>\d+)/i;
const match = href.match(re);
if(match) {
@ -99,7 +99,7 @@
this.href = href;
}
extract_user_id() {
extract_metadata() {
// https://www.patreon.com/user?u=35870453
const re = /https:\/\/www.patreon.com\/user\?u=(?<userid>\d+)/i;
const match = href.match(re);
@ -125,7 +125,7 @@
this.href = href;
}
extract_user_id() {
extract_metadata() {
const re = /https:\/\/kemono.(su|party)\/(?<platform>\w+)\/user\/(?<userid>\d+)/i;
const match = href.match(re);
if(match) {
@ -136,8 +136,8 @@
}
}
generate_kemono_url(user_id) {
return 'https://kemono.su/' + user_id.platform + '/user/' + user_id.userid;
generate_kemono_url(metadata) {
return 'https://kemono.su/' + metadata.platform + '/user/' + metadata.userid;
}
}
@ -168,10 +168,10 @@
return;
}
const result = url.extract_user_id();
const result = url.extract_metadata();
if(result.ok) {
const user_id = result.ok;
const kemono_url = url.generate_kemono_url(user_id);
const metadata = result.ok;
const kemono_url = url.generate_kemono_url(metadata);
window.open(kemono_url, '_blank');
}
else {