This repository has been archived by the owner on Nov 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwatcher.js
116 lines (100 loc) · 4.21 KB
/
watcher.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
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
console.log('watcher.js >> V2.02.25');
// File: Create Watcher Page
function monNouveauCode () {
console.log('Mimiala');
}
var htmlElement = document.querySelector('html');
htmlElement.removeAttribute('style');
htmlElement.setAttribute('class', 'has-background-dark has-text-danger-light');
window.stop();
const head = document.querySelector('head');
head.innerHTML = `
<link rel="stylesheet" href="https://miala-python.github.io/yt/lib/bulma-V0.9.4.min.css">
<link rel="stylesheet" href="https://miala-python.github.io/yt/lib/bulma-switch.min.css">
<title>Chargement en cours... | MialaMusic</title>
<link rel="icon" href="https://miala-python.github.io/yt/icon.png" type="image/png">
<link rel="stylesheet" href="https://miala-python.github.io/yt/lib/style.css">
<link rel="stylesheet" href="https://miala-python.github.io/yt/lib/outlined.icon.fonts.google.css"> <!-- Copyright Google - All right reserved -->`
const body = document.querySelector('body');
body.setAttribute('class', 'has-background-dark has-text-danger-light');
var scr_list = [
// "https://www.youtube.com/s/player/d23221b6/www-widgetapi.vflset/www-widgetapi.js",
"https://www.youtube.com/iframe_api",
// "https://miala-python.github.io/yt/iframe_api.js",
"https://miala-python.github.io/yt/lib/saver.js?ver=" + Math.random(), //MàJ auto
"https://miala-python.github.io/yt/lib/jquery.js",
"https://miala-python.github.io/yt/lib/pubblock.js"
// "https://cdnjs.cloudflare.com/ajax/libs/fetch/2.6.0/fetch.min.js"
];
scr_list.forEach(element => {
let js = document.createElement("script");
js.type = "text/javascript";
js.src = element;
body.appendChild(js);
});
body.innerHTML =
`
<div id='inProgress' class='block'>
<div class='content'>
<progress id="loading_progress" class="progress is-large is-link" value="50" max="100">Attente de votre réponse...</progress><br><br>
<h1>Veuillez répondre à la question: OK = Oui , Annuler = Non</h1><br>
<p class="image is-128x128 is-centered">
<img class="is-rounded" src="https://miala-python.github.io/yt/icon.png" alt="Lecteur MiYT">
</p><br><br>
</div></div>
`
+ body.innerHTML +
`
<div class="block">
<div class="tags are-medium">
<span class="tag is-primary"><a href="https://miala.000webhostapp.com/YT/" class="has-text-warning-light">Lecteur MiYT</a></span>
<span class="tag is-danger"><a id="pllink" href="#" class="has-text-warning-light">Playlist</a></span>
<span class="tag is-danger"><a href="https://www.youtube.com/?Mi=Music" class="has-text-warning-light">YouTube</a></span>
</div>
<br><br>
<div id="player"></div>
<br>
<span id="infos_vid" class="tag">Chargement en cours... - MialaMusic</span><br><br>
<br>
<div class="buttons">
<button id="prev_btn" class="button is-danger">
<span class="material-symbols-outlined gfonticon_button icon is-small">
skip_previous
</span>
</button>
<button id="next_btn" class="button is-success">
<span class="material-symbols-outlined gfonticon_button icon is-small">
skip_next
</span></button>
<!--
<button id="PiP_btn" class="button is-info" onclick="if (document.pictureInPictureElement) {
document.exitPictureInPicture();
} else if (document.pictureInPictureEnabled) {
video.requestPictureInPicture();
}">
PiP</button> -->
</div>
<div class="field">
<label for="PauseForbidSw">Lecture automatique (pause interdite): Au début uniquement</label>
<input id="PauseForbidSw" type="checkbox" name="PauseForbidSw" class="switch is-danger">
<label for="PauseForbidSw"Pendant toute la video</label>
</div>
<br>
<div class="buttons">
<button id="reset_btn" class="button is-warning">
<span class="material-symbols-outlined gfonticon_button icon is-small">
restart_alt
</span>
</button>
</div>
<br>
</div>
`;
var js = document.createElement("script");
js.type = "text/javascript";
js.src = "https://miala-python.github.io/yt/YT.js";
js.onreadystatechange = monNouveauCode;
js.onload = monNouveauCode;
js.id = "PlayMI";
//Ajout de la balise dans la page
document.body.appendChild(js);