Korbs / 3ebf2984005d4207bbb98c5e221aa678
Последняя активность 1 month ago
Web Tricks and Methods
HTML
Number Keyboard for Mobile Devices
When it comes to creating a number input, we would create an <input/> with the type attribute set to number. This makes arrow buttons show up that can let us go up and down.
On mobile, we don't want this. It's expected by the end-user that their numberic keyboard shows up, so we set the inputmode instead.
Korbs / Fallback Native Player for NonJS users
Последняя активность 1 month ago
When building a custom video player, it will likely not work for end-users that have decided to disable JavaScript in their web browser. To get around this, it's best to add a fallback that'll allow them to switch over to the web browser's native player.
To pull this off, we'll take advantage of the HTML tag known as details and noscript.
Detect JavaScript is Disabled
First, we need to tell if JavaScript is disabled, we can use the noscript tag. Anything used within a noscript tag is shown if JavaScript is not present.
<noscript>If you're seeing this, JavaScript is not enabled.</noscript>
Korbs / 2e7daad1c7544aadb072977ac6ac69ad
Последняя активность 1 month ago
During the day, I happen to switch between my speakers and headphones quite a bit. I've recently decided to setup custom shortcuts to switch quickly between them without needing to open the volume menu in GNOME or KDE.
Install
Firstly, the pactl tool is used for this, please install it:
sudo dnf install pactl
Korbs / 0d15f713716348d99e7ec1da1e81af5c
Последняя активность 1 month ago

Requirements
- ffmpeg
- NodeJS
Script
In a new directory, create a file called generate.js, then install the sprite-vtt-generator package:
Korbs / eae4fe420bbf4610a5dc6c54ac345f8b
Последняя активность 1 month ago
License
LICENSE HERE
Korbs / f5a50d08e3d247d6abbe81d7a8ed6c18
Последняя активность 1 month ago
My Setup for Alpine Linux on Framework 13
# Install GNOME Desktop - Use 'gdm' to launch after installation
setup-desktop gnome
# Change GNOME Settings
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
gsettings set org.gnome.desktop.peripherals.mouse accel-profile 'flat'
gsettings set org.gnome.desktop.interface enable-hot-corners false
Korbs / f5fec77801364faeb736fb2becf1d336
Последняя активность 1 month ago
| 1 | // Find elements |
| 2 | var SyncVideo = document.querySelector("#main-video") |
| 3 | var SyncAudio = document.querySelector("#main-audio") |
| 4 | |
| 5 | // Object for synchronization of multiple media/sources |
| 6 | if (typeof window.MediaController === "function") { |
| 7 | var controller = new MediaController() |
| 8 | SyncVideo.controller = controller |
| 9 | SyncAudio.controller = controller |
| 10 | } else { |