Created
July 4, 2022 13:56
-
-
Save fagci/6385edf2b30177bdd316c755e396663f to your computer and use it in GitHub Desktop.
Via browser toolbar
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
;(function(){ | |
const d=document; | |
const css = d.createElement('style'); | |
css.innerText = ` | |
.ymb { | |
position: fixed; | |
bottom: 0; | |
left: 0; | |
right: 0; | |
height: 28px; | |
box-sizing: content-box; | |
padding: 1px; | |
background: rgba(0, 0, 0, 0.25); | |
z-index: 99999; | |
display: grid; | |
gap: 16px; | |
grid-template-columns: repeat(auto-fill, 28px); | |
} | |
.ymb button { | |
background: rgba(0,0,0,0.65); | |
border: none; | |
border-radius: 8px; | |
} | |
`; | |
d.head.appendChild(css); | |
const bar = d.createElement('div'); | |
bar.classList.add('ymb'); | |
d.body.appendChild(bar); | |
// Console button | |
const vcb = d.createElement('button'); | |
vcb.innerText = '💻'; | |
vcb.onclick = function() { | |
const s=d.createElement("script"); | |
s.onload=function(){ new window.VConsole() }; | |
s.setAttribute( | |
"src", | |
"https://unpkg.com/" | |
+ "vconsole@latest/dist/vconsole.min.js" | |
); | |
d.head.appendChild(s); | |
} | |
bar.appendChild(vcb); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment