Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Set max-scale and min-scale values in Youtube's viewport #2616

Merged
merged 1 commit into from
Jan 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class YoutubeExtension {

// If missing, inject a `<meta name="viewport">` tag to trigger YouTube's mobile layout.
overrideViewport() {
const content = `width=device-width;`;
const content = `width=device-width;maximum-scale=1;minimum-scale=1;initial-scale=1;`;
let viewport = document.querySelector('meta[name="viewport"]');
if (viewport) {
viewport.setAttribute('content', content);
Expand Down