-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More info on releases
- Loading branch information
Showing
43 changed files
with
366 additions
and
366 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"uploadUuid":"4175f406c31444aebb4b608bd9554e65","channel":"unlisted","xpiCrcHash":"e08424b181a96fc32fe09abf0ab2d35e2db866b9657ca1e19494586c0ec279ba"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200"); | ||
|
||
div#peekpage { | ||
height: 100vh; | ||
width: 74vw; | ||
margin: auto; | ||
border: 0; | ||
padding: 0; | ||
border-radius: 4px; | ||
animation: peekopen 0.5s; | ||
} | ||
div#peekpage::backdrop { | ||
background: rgba(57, 59, 82, 0.6); | ||
} | ||
div#peekpage iframe { | ||
width: 100%; | ||
height: 100%; | ||
border: 0; | ||
margin-bottom: -5px; | ||
} | ||
.peektools { | ||
border-radius: 100px; | ||
border: 0; | ||
font-family: "Material Symbols Outlined"; | ||
font-size: 20px; | ||
font-weight: 300; | ||
width: 30px; | ||
height: 30px; | ||
margin-top: 20px; | ||
position: fixed; | ||
transform: translateX(calc(74vw + 10px)); | ||
z-index: 1000; | ||
cursor: default; | ||
animation: buttonappear 1s; | ||
background: white; | ||
color: black; | ||
} | ||
.peektools#open_in_full { | ||
margin-top: 60px; | ||
} | ||
@keyframes peekopen { | ||
from { | ||
scale: 0; | ||
} | ||
50% { | ||
scale: 1.03; | ||
} | ||
} | ||
@keyframes buttonappear { | ||
from { | ||
margin-left: 20px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// Peek | ||
var peekPage = document.createElement("div"); | ||
peekPage.id = "peekpage"; | ||
peekPage.popover = true; | ||
|
||
// Backdrop | ||
var peekBackdrop = document.createElement('div'); | ||
peekBackdrop.style = "display: none; height: 100vh; width: 100vw; top: 0; left: 0; position: fixed; z-index: 2147483647;"; | ||
peekBackdrop.onclick = () => closePeek(); | ||
|
||
// Iframe | ||
var iframeOldSrc; | ||
var peekIframe = document.createElement("iframe"); | ||
|
||
// Tools | ||
var tools = [{ name: 'close' }, { name: 'open_in_full' }] | ||
tools.forEach((tool) => { | ||
var btn = document.createElement('button'); | ||
btn.innerHTML = tool.name | ||
btn.className = 'peektools' | ||
btn.id = tool.name | ||
if (tool.name == 'close') { | ||
btn.onclick = () => closePeek() | ||
} else { | ||
btn.onclick = () => { | ||
closePeek(); | ||
window.open(iframeOldSrc); | ||
} | ||
} | ||
peekPage.appendChild(btn); | ||
}) | ||
|
||
function closePeek() { | ||
peekPage.hidePopover(); | ||
document.body.style.overflow = '' | ||
peekBackdrop.style.display = 'none' | ||
iframeOldSrc = peekIframe.src | ||
peekIframe.src = "" | ||
} | ||
|
||
document.body.appendChild(peekBackdrop); | ||
document.body.appendChild(peekPage); | ||
peekPage.appendChild(peekIframe); | ||
|
||
// Make peek functional in Anchor elements | ||
let collection = document.getElementsByTagName("a"); | ||
Array.from(collection).forEach(function (element) { | ||
var oldhref = element.href; | ||
element.href = "javascript:;"; | ||
element.removeAttribute("jsaction"); | ||
element.removeAttribute("target"); | ||
element.onclick = (event) => { | ||
if (event.shiftKey) { | ||
event.preventDefault(); | ||
peekIframe.src = oldhref; | ||
peekBackdrop.style.display = 'block'; | ||
document.body.style.overflow = 'hidden'; | ||
peekPage.showPopover(); | ||
} else { | ||
if (element.href == "javascript:;") { | ||
element.href = oldhref | ||
} | ||
} | ||
}; | ||
}); |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.