Javascript code to set a CSS var --real-vh with the real value in px.
It updates when the browser gets resized.
function realVH() {
document.documentElement.style.setProperty('--real-vh', (window.innerHeight) + "px")
}
realVH()| # download every image from an artist profile in last.fm! | |
| # full resolution! and multithreading! | |
| # .webp images and .gifs | |
| # want .jpg images instead of .webp? Search for the .replace('jpg' part in the code and delete that line | |
| # jpg in 2022, can you imagine? | |
| # | |
| # usage: | |
| # $ python3 lastfm-p-dw.py https://www.last.fm/es/music/Yung+Lean/+images | |
| # | |
| # SUBMIT A LINK LIKE THAT ONE without any "?page=1". Just clean as the example. |
Javascript code to set a CSS var --real-vh with the real value in px.
It updates when the browser gets resized.
function realVH() {
document.documentElement.style.setProperty('--real-vh', (window.innerHeight) + "px")
}
realVH()by Jenny Knuth, based on the work of Chris Coyier and Taylor Hunt
A data URI is a nice way to include a web resource without needing to make an HTTP request. Chris Coyier explains the technique nicely in Probably Don't Base64 SVG.
While a PNG might use Base64 encoding, for SVG, there is a better way.
Taylor Hunt's experiments led to this solution for optimizing SVGs in data URIs:
"So the best way of encoding SVG in a data URI is data:image/svg+xml,[actual data]. We don’t need the ;charset=utf-8 parameter (or the invalid ;utf8 parameter…), because URLs are always ASCII."
| ; ------------------------------------------------- | |
| ; Figma Slides is beautiful! | |
| ; But we can't fully control the presentation | |
| ; using a mouse, which is a great tool to present | |
| ; while walking around the auditorium. | |
| ; | |
| ; This hack: | |
| ; 1. Adds Right Click support to go to the | |
| ; previous slide in Presenter Mode | |
| ; |