MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / findPostId

Function findPostId

scripts/insta_injectDownloadBtn.js:718–728  ·  view source on GitHub ↗
(articleNode)

Source from the content-addressed store, hash-verified

716 }
717
718 function findPostId(articleNode) {
719 let aNodes = articleNode.querySelectorAll("a");
720 for (let i = 0; i < aNodes.length; ++i) {
721 let link = aNodes[i].getAttribute("href");
722 if (link) {
723 let match = link.match(postIdPattern);
724 if (match) return match[1];
725 }
726 }
727 return null;
728 }
729
730 async function fetchVideoURL(articleNode, videoElem) {
731 let poster = videoElem.getAttribute("poster");

Callers 2

postOnClickedFunction · 0.85
method3Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected