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

Function openResource

scripts/insta_injectDownloadBtn.js:897–905  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

895 }
896
897 function openResource(url) {
898 // open url in new tab
899 var a = document.createElement("a");
900 a.href = url;
901 a.setAttribute("target", "_blank");
902 document.body.appendChild(a);
903 a.click();
904 a.remove();
905 }
906
907 function forceDownload(blob, filename, extension) {
908 // ref: https://stackoverflow.com/questions/49474775/chrome-65-blocks-cross-origin-a-download-client-side-workaround-to-force-down

Callers 3

profileOnClickedFunction · 0.85
postOnClickedFunction · 0.85
storyOnClickedFunction · 0.85

Calls 2

clickMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected