forked from CKStudios2018/OpenSource-uTube
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
178 lines (169 loc) · 12.9 KB
/
index.html
File metadata and controls
178 lines (169 loc) · 12.9 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<!DOCTYPE html>
<html lang="en" typography="" typography-spacing="" standardized-themed-scrollbar="" dark="true" data-arp-injected="true">
<head>
<link rel="apple-touch-icon" href="icons/apple-icon-180.png">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="apple-touch-startup-image" href="icons/apple-splash-2048-2732.jpg" media="(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-2732-2048.jpg" media="(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-1668-2388.jpg" media="(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-2388-1668.jpg" media="(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-1536-2048.jpg" media="(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-2048-1536.jpg" media="(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-1668-2224.jpg" media="(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-2224-1668.jpg" media="(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-1620-2160.jpg" media="(device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-2160-1620.jpg" media="(device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-1290-2796.jpg" media="(device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-2796-1290.jpg" media="(device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-1179-2556.jpg" media="(device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-2556-1179.jpg" media="(device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-1284-2778.jpg" media="(device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-2778-1284.jpg" media="(device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-1170-2532.jpg" media="(device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-2532-1170.jpg" media="(device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-1125-2436.jpg" media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-2436-1125.jpg" media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-1242-2688.jpg" media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-2688-1242.jpg" media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-828-1792.jpg" media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-1792-828.jpg" media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-1242-2208.jpg" media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-2208-1242.jpg" media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-750-1334.jpg" media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-1334-750.jpg" media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-640-1136.jpg" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/apple-splash-1136-640.jpg" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)">
<script src="https://www.gstatic.com/firebasejs/8.9.1/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.9.1/firebase-firestore.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.9.1/firebase-auth.js"></script>
<title>OpenSource uTube</title>
<link rel="shortcut icon" href="https://tallerthanshort.github.io/ut3.ggpht/icons/utube.png" type="image/x-icon">
<link rel="icon" href="https://tallerthanshort.github.io/ut3.ggpht/icons/utube.png" type="image/png">
<meta property="og:locale" content="en">
<meta property="og:site_name" content="uTube">
<meta property="og:title" content="OpenSource-uTube">
<meta property="og:image" content="https://tallerthanshort.github.io/ut3.ggpht/icons/utube.png">
<meta property="og:description" content="Enjoy videos and music, upload original content and share it with friends, all without Google's Monetisation on uTube.">
<meta name="keywords" content="video, free, upload. uTube">
<script src="auth.js"></script>
<script src="search.js"></script>
<link rel="preload" href="somestyle.css" as="style">
<link rel="stylesheet" href="somestyle.css" data-n-g="">
<link rel="manifest" href="manifest.json">
<script>
var config = {
apiKey: "AIzaSyA7WMeyqjkkcwDaL2KtNjsfQvHPgm2sWLA",
authDomain: "bugfreechat-600c4.firebaseapp.com",
databaseURL: "https://bugfreechat-600c4-default-rtdb.firebaseio.com",
projectId: "bugfreechat-600c4",
storageBucket: "bugfreechat-600c4.appspot.com",
messagingSenderId: "1022793471622",
appId: "1:1022793471622:web:6b1204419148dd4e426307"
};
firebase.initializeApp(config);
const auth = firebase.auth();
const store = firebase.firestore();
//store.settings({ timestampsInSnapshots: true });
</script>
</head>
<body>
<div id="title" style="position: relative;">
<div class="logo" style="position: absolute;">
<img src="https://tallerthanshort.github.io/ut3.ggpht/icons/utube.png" style="height: 60px; width: 60px;" title="uTube Logo" style="position: absolute; left: 0;" alt="uTube_Logo" onclick="location.href='/'">
</div>
</div>
<div class="row-31oovZ header-V8Sgnz">
<header class="wrapper-2bm6Le">
<nav class="nav-3_Sybl">
<div id="search-div" style="position: relative; top: 0; width: 100%;">
<input id="querygo" type="text" placeholder="Find something interesting..." style="width: 50%; position: relative; top: 0; left: 16%;">
<button onclick="searchFunction()" style="border: none; cursor: pointer; height: 22px; width: 32px; position: absolute; top: 0; left: 67%;">
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="true" style="pointer-events: none; display: block; width: 100%; height: 100%;">
<g>
<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 13 4 10.99 4 8.5S7.01 4 8.5 4 13 6.01 13 8.5 10.99 13 8.5 13z"></path>
</g>
</svg>
</button>
</input>
<div id="login" style="position: relative;">
<button onclick="loginFunction()" style="border: none; background-color: crimson; color: white; position: absolute; top: -20px; right: 5%;">LOGIN</button>
</div>
</div>
</nav>
</header>
</div>
<div class="app-container">
<div class="gridz"></div>
</div>
<script>
const container = document.querySelector('.gridz');
store.collection('vid').get().then(snapshot => {
setupSite(snapshot.docs);
});
const setupSite = (data) => {
let totalVid = 0;
let list = []
data.forEach(doc => {
const video = doc.data();
totalVid++
list[totalVid] = `${video.id}`;
});
shuffle(list);
setTimeout(function(){displaySite(list)}, 100)
}
const displaySite = (data) => {
data.forEach((div) => {
if(div != undefined){
store.collection('vid').where("id", "==", div).get().then((querySnapshot) => {
querySnapshot.forEach((doc) => {
const video = doc.data();
const li = `
<div>
<div class="slot">
<div class="banner" onclick="location.href='https://common-codes.github.io/uTube/watch#vid=${video.id}';" title="Watch ${video.title}">
<img class="banner-img" src="${video.vod}">
</div>
<div class="image">
<img class="image-img" src="${video.uploader}" onclick="location.href='https://common-codes.github.io/uTube/c#user=${video.channel}';" title="Go to ${video.channel}'s Channel">
</div>
<div class="video-descriptors">
<div class="video-desc" onclick="location.href='https://common-codes.github.io/uTube/watch#vid=${video.id}';" title="Watch ${video.title}">
<div class="video-name">${video.title}</div>
<div class="owner-descriptors">
<div>
<p id="video-id">${video.channel}</p>
</div>
</div>
</div>
</div>
</div>
</div>
`;
container.innerHTML += li;
})
})
} else {
return;
}
})
}
</script>
<script>
function shuffle(array) {
var m = array.length, t, i;
while(m){
i = Math.floor(Math.random() * m--);
t = array[m];
array[m] = array[i];
array[i] = t;
}
return array;
}
</script>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/mobile.js');
}
</script>
</body>
</html>