Updated regex for ID
parent
1aeb824093
commit
dd5cc14d31
|
@ -376,7 +376,7 @@ function isMod(prefix) {
|
||||||
function extractIDFromURL(url) {
|
function extractIDFromURL(url) {
|
||||||
// URL are in the format https://f95zone.to/threads/GAMENAME-VERSION-DEVELOPER.ID/
|
// URL are in the format https://f95zone.to/threads/GAMENAME-VERSION-DEVELOPER.ID/
|
||||||
// or https://f95zone.to/threads/ID/
|
// or https://f95zone.to/threads/ID/
|
||||||
const match = url.match(/(\.)?([0-9]+)(?!-)/);
|
const match = url.match(/([0-9]+)(?=\/|\b)(?!-)/);
|
||||||
if(!match) return -1;
|
if(!match) return -1;
|
||||||
|
|
||||||
// Parse and return number
|
// Parse and return number
|
||||||
|
|
Loading…
Reference in New Issue