MCPcopy Create free account
hub / github.com/ChinaGodMan/UserScripts / createAcrylicOverlay

Function createAcrylicOverlay

popup-window/popup-window.user.js:519–533  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

517 await delay(1)
518 }
519 function createAcrylicOverlay() {
520 const acrylicOverlay = document.createElement('div')
521 acrylicOverlay.style.position = 'fixed'
522 acrylicOverlay.style.top = '0'
523 acrylicOverlay.style.left = '0'
524 acrylicOverlay.style.width = '100%'
525 acrylicOverlay.style.height = '100%'
526 acrylicOverlay.style.zIndex = '9999'
527 acrylicOverlay.style.backdropFilter = config.blurEnabled ? `blur(${config.blurIntensity}px)` : 'none'
528 if (config.closeOnMouseClick) {
529 acrylicOverlay.addEventListener('click', handleAcrylicOverlayClick)
530 }
531 document.body.appendChild(acrylicOverlay)
532 return acrylicOverlay
533 }
534 function handleAcrylicOverlayClick(event) {
535 if (event.target === state.acrylicOverlay) {
536 closePopupWindow()

Callers 1

openPopupWindowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected