mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 10:01:39 -05:00
unexport rain, rename more d ->overlaydiv
This commit is contained in:
parent
507be18665
commit
c1e0ebc4f0
1 changed files with 15 additions and 15 deletions
|
@ -27,20 +27,20 @@ export function no_mouse() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeBlock() {
|
function makeBlock() {
|
||||||
const d = document.createElement("div")
|
const overlaydiv = document.createElement("div")
|
||||||
d.className = "_tridactyl_no_mouse_"
|
overlaydiv.className = "_tridactyl_no_mouse_"
|
||||||
d.style.position = "fixed"
|
overlaydiv.style.position = "fixed"
|
||||||
d.style.display = "block"
|
overlaydiv.style.display = "block"
|
||||||
d.style.width = String(window.innerWidth)
|
overlaydiv.style.width = String(window.innerWidth)
|
||||||
d.style.height = String(window.innerHeight)
|
overlaydiv.style.height = String(window.innerHeight)
|
||||||
d.style.top = "0"
|
overlaydiv.style.top = "0"
|
||||||
d.style.left = "0"
|
overlaydiv.style.left = "0"
|
||||||
d.style.right = "0"
|
overlaydiv.style.right = "0"
|
||||||
d.style.bottom = "0"
|
overlaydiv.style.bottom = "0"
|
||||||
d.style.zIndex = "1000"
|
overlaydiv.style.zIndex = "1000"
|
||||||
d.style.opacity = "0.5"
|
overlaydiv.style.opacity = "0.5"
|
||||||
document.body.appendChild(d)
|
document.body.appendChild(overlaydiv)
|
||||||
return d
|
return overlaydiv
|
||||||
}
|
}
|
||||||
|
|
||||||
export function removeBlock() {
|
export function removeBlock() {
|
||||||
|
@ -54,7 +54,7 @@ export function removeBlock() {
|
||||||
|
|
||||||
export const snow = () => rain(makeBlock(), ["❄"], "#FFF", 0.15)
|
export const snow = () => rain(makeBlock(), ["❄"], "#FFF", 0.15)
|
||||||
|
|
||||||
export function rain(overlaydiv, characters: string[], colour, darkening = 0.05) {
|
function rain(overlaydiv, characters: string[], colour, darkening = 0.05) {
|
||||||
const c = document.createElement("canvas")
|
const c = document.createElement("canvas")
|
||||||
overlaydiv.appendChild(c)
|
overlaydiv.appendChild(c)
|
||||||
const ctx = c.getContext("2d")
|
const ctx = c.getContext("2d")
|
||||||
|
|
Loading…
Add table
Reference in a new issue