Skip to content

Commit

Permalink
Merge pull request #240 from jiaojiaodubai/Pishu
Browse files Browse the repository at this point in the history
fix (Pishu Data.js): 适配vpn用户
  • Loading branch information
l0o0 authored Nov 29, 2023
2 parents 28cd749 + eb036bb commit 9dcbf1c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Pishu Data.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"translatorID": "8651aa89-eb54-47bc-9916-17720fe22a86",
"label": "Pishu Data",
"creator": "jiaojiaodubai23",
"target": "^https?://(www|gf)\\.pishu\\.com\\.cn",
"target": "^https?://.*(www|gf)\\.pishu\\.com\\.cn",
"minVersion": "5.0",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2023-11-24 19:50:29"
"lastUpdated": "2023-11-29 03:42:08"
}

/*
Expand Down Expand Up @@ -177,7 +177,9 @@ async function scrape(doc, url = doc.location.href, type) {
tittle: 'Snapshot',
document: doc,
});
newItem.url = url;
newItem.url = /^https?:\/\/.+(www|gf)\.pishu\.com\.cn/.test(url)
? `https://${url.match(/(www|gf)\.pishu\.com\.cn.*/)[0]}`
: url;
newItem.complete();
}

Expand Down

0 comments on commit 9dcbf1c

Please sign in to comment.