-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdecoded.js
74 lines (74 loc) · 2.67 KB
/
decoded.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
var ce = function(e) {return document.createElement(e);};
async function mkmdl() {
var modalbox = ce('div');
modalbox.id = 'fwgfsmdl';
await fetch('https://raw.githubusercontent.com/pickle69420/fwgfs-box/main/structure.html')
.then((response) => response.text())
.then((data) => {
modalbox.innerHTML = data;
});
document.body.appendChild(modalbox);
var headerstyles = ce('style');
await fetch('https://raw.githubusercontent.com/pickle69420/fwgfs-box/main/fwmain.css')
.then((response) => response.text())
.then((data) => {
headerstyles.innerHTML = data;
});
document.head.appendChild(headerstyles);
document.getElementsByClassName("fwclosebtn")[0].onclick = function() {
document.getElementById('fwgfsmdl').remove();
};
document.getElementsByClassName("fwclosebtn")[1].onclick = function() {
document.getElementById('fwgfsmdl').style.display = 'none';
fwmmdl();
};
var modal = document.getElementById('fwgfsmdl');
modal.style.display = 'block';
chmdl('https://raw.githubusercontent.com/pickle69420/fwgfs-box/main/allgames.html','FREE WEB GAMES FOR SCHOOL');
}
function mdlcxs() {
if (document.getElementById('fwgfsmdl') !== undefined) {
return true;
} else {return false;}
}
function chmdl(url, title) {
var modaltitle = document.getElementsByClassName('fwmodal-title')[0];
var modalcontent = document.getElementsByClassName('fwimportcontent')[0];
}
function fwmmdl() {
var box = ce('button');
box.innerHTML = `+`;
box.style = 'border: none!important;padding: 12px 16px;position: fixed;right:0;bottom:0;background-color: rgba(0, 0, 0, 0);z-index: 9999;';
var modal = document.getElementById('fwgfsmdl');
box.onclick = function() {
modal.style.display = 'block';
this.remove();
};
document.body.appendChild(box);
}
if (mdlcxs()) {
mkmdl();
}
function getgame(gname, glink) {
var modalcontent = document.getElementsByClassName('fwimportcontent')[0];
var modaldivcontent = document.getElementsByClassName('fwmodal-content')[0];
var modaltitle = document.getElementsByClassName('fwmodal-title')[0];
while(modalcontent.firstChild) {
modalcontent.removeChild(modalcontent.firstChild);
}
let framewidth = (window.innerWidth/100)*93;
let frameheight = window.innerHeight-80;
var fwiframe = document.createElement('iframe');
modaltitle.remove();
modalcontent.style.height = '100%';
modalcontent.style.width = '100%';
fwiframe.width = framewidth;
fwiframe.height = frameheight;
fwiframe.id = 'gameframe';
fwiframe.frameBorder = 0;
fwiframe.src = glink;
fwiframe.title = gname;
modaldivcontent.style.height = '99.95%';
modaldivcontent.style.width = '100%';
modalcontent.appendChild(fwiframe);
}