Skip to content

Instantly share code, notes, and snippets.

@rousan
rousan / inject_script_netflix_subtitle_keyboard_shortcut.js
Last active January 8, 2022 10:57
Netflix doesn't provide any keyboard shortcut to toggle English subtitle, so inject the following script to enable that feature. Keyboard Shortcut: Ctrl + S
document.addEventListener("keypress", (evt) => {
if (evt.ctrlKey && evt.keyCode === 19) {
console.log("Subtitle shortcut triggered");
const btn = document.querySelector(".button-nfplayerSubtitles");
if (!btn) {
return;
}
const parent = btn.parentElement;
@c-kick
c-kick / hnl.mobileConsole.js
Last active January 14, 2024 18:24
NOTE: V2 Released! Seehttps://github.com/c-kick/mobileConsole hnl.mobileConsole.js - extends JavaScript's console to display a visual console inside the webpage. Very usefull for debugging JS on mobile devices with no real console. Info and demo: http://www.hnldesign.nl/work/code/mobileconsole-javascript-console-for-mobile-devices/
/*!
*
* NEW VERSION AT https://github.com/c-kick/mobileConsole
*
* hnl.mobileConsole - javascript mobile console - v1.3.8 - 04/01/2021
* Adds html console to webpage. Especially useful for debugging JS on mobile devices.
* Supports 'log', 'trace', 'info', 'warn', 'error', 'group', 'groupEnd', 'table', 'assert', 'clear'
* Inspired by code by Jakub Fiala (https://gist.github.com/jakubfiala/8fe3461ab6508f46003d)
* Licensed under the MIT license
*