forked from code-charity/youtube
-
Notifications
You must be signed in to change notification settings - Fork 0
/
page.js
28 lines (22 loc) · 990 Bytes
/
page.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
document.addEventListener('DOMContentLoaded', function() {
var charset = document.createElement('meta'),
viewport = document.createElement('meta'),
title = document.createElement('title'),
style = document.createElement('style');
charset.setAttribute('charset', 'utf-8');
viewport.setAttribute('name', 'viewport');
viewport.setAttribute('content', 'width=device-width,initial-scale=1');
title.textContent = 'ImprovedTube';
style.textContent = 'body{width:100vw;height:100vh}';
for (var i = document.head.childNodes.length - 1; i > -1; i--) {
document.head.childNodes[i].remove();
}
document.head.appendChild(charset);
document.head.appendChild(viewport);
document.head.appendChild(title);
document.head.appendChild(style);
document.documentElement.setAttribute('page', true);
for (var i = document.body.childNodes.length - 1; i > -1; i--) {
document.body.childNodes[i].remove();
}
});