MCPcopy Create free account
hub / github.com/zxlie/FeHelper / keepOnScreen

Function keepOnScreen

apps/color-picker/content-script.js:360–371  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

358 }
359
360 function keepOnScreen() {
361
362 if (!n) return;
363 n.style.top = (ly + 8) + "px";
364 n.style.left = (lx + 8) + "px";
365 if (n.clientWidth + n.offsetLeft + 24 > innerWidth) {
366 n.style.left = (lx - 8 - n.clientWidth) + "px";
367 }
368 if (n.clientHeight + n.offsetTop + 24 > innerHeight) {
369 n.style.top = (ly - 8 - n.clientHeight) + "px";
370 }
371 }
372
373 function updateColorPreview(ev) {
374 if (!isEnabled) return;

Callers 3

setPixelPreviewFunction · 0.85
setDisplayFunction · 0.85
updateColorPreviewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected