Skip to content

Commit

Permalink
Fix smugmug (fixes #555)
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Feb 19, 2024
1 parent a801e0a commit 7b119e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
11 changes: 5 additions & 6 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30850,9 +30850,9 @@ var $$IMU_EXPORT$$;
}
}

if (domain_nowww === "youtube.com" || domain === "m.youtube.com" || domain_nowww === "youtu.be") {
if (domain_nosub === "youtube.com" || domain === "m.youtube.com" || domain_nowww === "youtu.be") {
// for thumbnails
match = src.match(/^[a-z]+:\/\/(?:(?:www|m)\.)?youtube\.com\/+watch\?(?:.*&)?v=([^&#]*)/);
match = src.match(/^[a-z]+:\/\/(?:(?:www|m(?:usic)?)\.)?youtube\.com\/+watch\?(?:.*&)?v=([^&#]*)/);
if (!match) {
match = src.match(/^[a-z]+:\/\/(?:www\.)?youtu\.be\/+([^?&#]*)/);
}
Expand Down Expand Up @@ -54677,10 +54677,9 @@ var $$IMU_EXPORT$$;
};

if (newsrc !== src) {
obj = {
//url: src.replace(/(\/i-[A-Za-z0-9]+\/[0-9]\/[a-f0-9]+\/)[A-Z0-9]+(\/[^/.]*-)[A-Z0-9]+(\.[^/.?]*)(?:\?.*)?$/, "$1O$2O$3"),
url: newsrc,
redirects: true
common_functions["get_redirect_url"](api_cache, options, newsrc, options.cb);
return {
waiting: true
};
}

Expand Down
11 changes: 5 additions & 6 deletions userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -28127,9 +28127,9 @@ var $$IMU_EXPORT$$;
return newsrc;
}
}
if (domain_nowww === "youtube.com" || domain === "m.youtube.com" || domain_nowww === "youtu.be") {
if (domain_nosub === "youtube.com" || domain === "m.youtube.com" || domain_nowww === "youtu.be") {
// for thumbnails
match = src.match(/^[a-z]+:\/\/(?:(?:www|m)\.)?youtube\.com\/+watch\?(?:.*&)?v=([^&#]*)/);
match = src.match(/^[a-z]+:\/\/(?:(?:www|m(?:usic)?)\.)?youtube\.com\/+watch\?(?:.*&)?v=([^&#]*)/);
if (!match) {
match = src.match(/^[a-z]+:\/\/(?:www\.)?youtu\.be\/+([^?&#]*)/);
}
Expand Down Expand Up @@ -49787,10 +49787,9 @@ var $$IMU_EXPORT$$;
url: src
};
if (newsrc !== src) {
obj = {
//url: src.replace(/(\/i-[A-Za-z0-9]+\/[0-9]\/[a-f0-9]+\/)[A-Z0-9]+(\/[^/.]*-)[A-Z0-9]+(\.[^/.?]*)(?:\?.*)?$/, "$1O$2O$3"),
url: newsrc,
redirects: true
common_functions["get_redirect_url"](api_cache, options, newsrc, options.cb);
return {
waiting: true
};
}
if (options.force_page && options.do_request && options.cb && (newsrc !== src || regex.test(src))) {
Expand Down

0 comments on commit 7b119e6

Please sign in to comment.