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

Function onClickHandler

scripts/insta_injectDownloadBtn.js:326–341  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

324 }
325
326 function onClickHandler(e) {
327 // handle button click
328 let target = e.currentTarget;
329 e.stopPropagation();
330 e.preventDefault();
331 if (window.location.pathname.includes("stories")) {
332 storyOnClicked(target);
333 } else if (
334 document.querySelector("header") &&
335 document.querySelector("header").contains(target)
336 ) {
337 profileOnClicked(target);
338 } else {
339 postOnClicked(target);
340 }
341 }
342
343 function onMouseInHandler(e) {
344 let target = e.currentTarget;

Callers 1

keyDownHandlerFunction · 0.85

Calls 3

storyOnClickedFunction · 0.85
profileOnClickedFunction · 0.85
postOnClickedFunction · 0.85

Tested by

no test coverage detected