Skip to content

Commit

Permalink
Possibly fix #1218
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Sep 23, 2023
1 parent 69b46d1 commit 5fe465a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56895,13 +56895,16 @@ var $$IMU_EXPORT$$;

if (domain_nowww === "instagram.com") {
newsrc = website_query({
website_regex: /^[a-z]+:\/\/[^/]+\/+p\/+([^/]+)(?:\/+(?:(?:media|embed).*)?)?(?:[?#].*)?$/,
id: "post:${id}",
website_regex: {
regex: /^[a-z]+:\/\/[^/]+\/+(p|tv|reel)\/+([^/]+)(?:\/+(?:(?:media|embed).*)?)?(?:[?#].*)?$/,
groups: ["type", "id"]
},
id: "post:${type}:${id}",
run: function(cb, match) {
var info:any = [{
type: "post",
subtype: "link",
url: "https://www.instagram.com/p/" + match[1] + "/",
url: "https://www.instagram.com/" + match[1] + "/" + match[2] + "/",
element: options.element
}];

Expand Down
9 changes: 6 additions & 3 deletions userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -51665,13 +51665,16 @@ var $$IMU_EXPORT$$;
}
if (domain_nowww === "instagram.com") {
newsrc = website_query({
website_regex: /^[a-z]+:\/\/[^/]+\/+p\/+([^/]+)(?:\/+(?:(?:media|embed).*)?)?(?:[?#].*)?$/,
id: "post:${id}",
website_regex: {
regex: /^[a-z]+:\/\/[^/]+\/+(p|tv|reel)\/+([^/]+)(?:\/+(?:(?:media|embed).*)?)?(?:[?#].*)?$/,
groups: ["type", "id"]
},
id: "post:${type}:${id}",
run: function(cb, match) {
var info = [{
type: "post",
subtype: "link",
url: "https://www.instagram.com/p/" + match[1] + "/",
url: "https://www.instagram.com/" + match[1] + "/" + match[2] + "/",
element: options.element
}];
var queries = common_functions["parse_imu_hash"](src);
Expand Down

0 comments on commit 5fe465a

Please sign in to comment.