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

Function findLargestCanvasInViewport

scripts/pip_canvas.js:50–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48 }
49
50 function findLargestCanvasInViewport() {
51 return Array.from(document.querySelectorAll("canvas")).sort(
52 (a, b) =>
53 UfsGlobal.DOM.getOverlapScore(b) - UfsGlobal.DOM.getOverlapScore(a)
54 )?.[0];
55 }
56
57 try {
58 if (window.ufs_pip_fullWebsite.isPIP) {

Callers 1

pip_canvas.jsFile · 0.85

Calls 1

sortMethod · 0.80

Tested by

no test coverage detected