Fullscreen any element on a webpage
This userscript allows you to full screen any element on the page with a click! Focus on the main content of an article, fullscreen gifs or videos even if they don't have a fullscreen option, zoom in on pictures, etc...
You can easily customize the keypress, the style applied to focused elements, and the style applied to the fullscreen element
Edit the lines in the following sections to change those options
var toggleElementSelectionKey = "F";
var toggleElementSelectionAlt = false;
var toggleElementSelectionCtrl = true;
var focusedStyle = `box-shadow: 0 3px 6px rgba(0,0,0,0.16),
0 3px 6px rgba(0,0,0,0.23),
0 3px 6px rgba(255,255,255,0.16),
0 3px 6px rgba(255,255,255,0.23) !important;`;
var fullScreenStyle = "padding: 1em !important;";
I make no promises about prompt replies or maintenance, but if you run into an issue, please follow these steps, and I'll try to look into it:
DEBUG (immediately under the metadata block) to true: var DEBUG = true;