MCPcopy Index your code
hub / github.com/hoothin/UserScripts / click

Function click

DownloadAllContent/DownloadAllContent.user.js:117–125  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

115
116
117 function click(node) {
118 try {
119 node.dispatchEvent(new MouseEvent('click'));
120 } catch (e) {
121 var evt = document.createEvent('MouseEvents');
122 evt.initMouseEvent('click', true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);
123 node.dispatchEvent(evt);
124 }
125 }
126
127
128 var isMacOSWebView = _global.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected