Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Recursive.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import { decode } from './content/cbor-x.mjs';
* const myId = getId();
*/
export const getId = () => {
let id = window.location.pathname.split('/')[2];
return id;
let rex = /\/([a-f0-9]{64}i[0-9]{1,3})\/?/i;
Copy link
Member

@elocremarc elocremarc Mar 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a limit after i? The batch inscription index can be over 1000.

Suggested change
let rex = /\/([a-f0-9]{64}i[0-9]{1,3})\/?/i;
let rex = /([a-f0-9]{64}i[0-9]+)/i;

return rex.exec(window.location.pathname).pop();
};

/**
Expand Down