()
| 4781 | const inCanvasGrace = () => Date.now() - lastCanvasOffAt < POST_CANVAS_GRACE; |
| 4782 | const UNCLIP_CLASS = "cs-unclip"; |
| 4783 | let unclipped = []; |
| 4784 | const unclipAncestors = (from) => { |
| 4785 | clearUnclipped(); |
| 4786 | const stop = document.querySelector(".Root__right-sidebar"); |
| 4787 | for (let el = from; el && el !== stop; el = el.parentElement) { |
| 4788 | if (getComputedStyle(el).overflowX === "visible") continue; |
| 4789 | el.classList.add(UNCLIP_CLASS); |
| 4790 | unclipped.push(el); |
| 4791 | } |
| 4792 | }; |
| 4793 | const clearUnclipped = () => { |
| 4794 | for (const el of unclipped) el.classList.remove(UNCLIP_CLASS); |
| 4795 | unclipped = []; |
| 4796 | }; |
| 4797 | const mount = (container) => { |
| 4798 | if (track) return; |
| 4799 | mountedContainer = container; |
| 4800 | origPosition = container.style.position; |
| 4801 | if (getComputedStyle(container).position === "static") { |
| 4802 | container.style.position = "relative"; |
| 4803 | } |
| 4804 | track = document.createElement("div"); |
| 4805 | track.id = TRACK_ID; |
| 4806 | clip = document.createElement("div"); |
| 4807 | clip.className = "cs-clip"; |
| 4808 | prevSlot = Object.assign(document.createElement("div"), { className: "cs-slot cs-prev" }); |
| 4809 | currentSlot = Object.assign(document.createElement("div"), { className: "cs-slot cs-current" }); |
| 4810 | nextSlot = Object.assign(document.createElement("div"), { className: "cs-slot cs-next" }); |
| 4811 | for (const slot of [prevSlot, currentSlot, nextSlot]) { |
| 4812 | slot.appendChild(Object.assign(document.createElement("div"), { className: "cs-face" })); |
| 4813 | } |
| 4814 | clip.append(prevSlot, currentSlot, nextSlot); |
| 4815 | track.appendChild(clip); |
| 4816 | container.appendChild(track); |
| 4817 | unclipAncestors(container); |
| 4818 | currentUrl2 = getCurrentCoverUrl(); |
| 4819 | currentUri = getCurrentUri(); |
| 4820 | prevUrl = getPrevCoverUrl(); |
| 4821 | prevUri = getPrevUri(); |
| 4822 | nextUrl = getNextCoverUrl(); |
| 4823 | nextUri = getNextUri(); |
| 4824 | setSlot(prevSlot, prevUrl); |
| 4825 | setSlot(currentSlot, currentUrl2); |
no test coverage detected