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

Function preloadLink

popup-window/popup-window.user.js:510–518  ·  view source on GitHub ↗
(link, attributes = {})

Source from the content-addressed store, hash-verified

508 return new Promise(resolve => setTimeout(resolve, ms))
509 }
510 async function preloadLink(link, attributes = {}) {
511 const preloadElement = document.createElement('link')
512 preloadElement.rel = 'preload'
513 preloadElement.href = link
514 preloadElement.as = '*/*'
515 Object.assign(preloadElement, attributes)
516 document.head.appendChild(preloadElement)
517 await delay(1)
518 }
519 function createAcrylicOverlay() {
520 const acrylicOverlay = document.createElement('div')
521 acrylicOverlay.style.position = 'fixed'

Callers 2

handleDragStartFunction · 0.85
onProgresFunction · 0.85

Calls 1

delayFunction · 0.85

Tested by

no test coverage detected