-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbitplanesapp.js
More file actions
36 lines (27 loc) · 1.11 KB
/
bitplanesapp.js
File metadata and controls
36 lines (27 loc) · 1.11 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
function start() {
////MADE FOR VERSION 0.12.0 SCRIPT SYSTEM////
////CONFIG////
var link = "https://v6p9d9t4.ssl.hwcdn.net/html/2713283/dist/index.html"; // link to app webpage
var title = "Bit Planes"; // title shown in navbar
var id = "https://l413.github.io/Clockworks-OS-Custom/bitplanesapp.js"; // set this to the url location of your script
////SCRIPT////
var ExampleLink = document.createElement("a");
var ExampleIFrame = document.createElement("iframe");
ExampleIFrame.style = "display: none;";
ExampleIFrame.className = "app "+id;
ExampleIFrame.id = id;
ExampleIFrame.src = "about:blank";
ExampleLink.href = "javascript:openapp('"+ ExampleIFrame.id +"','" + link + "');" ;
ExampleLink.innerHTML = title;
ExampleLink.className = id;
ExampleLink.addEventListener('dblclick', (e) => {
uninstallApp(ExampleIFrame.id);
});
ExampleLink.addEventListener('contextmenu', (e) => {
e.preventDefault();
closeApp(ExampleIFrame.id);
});
document.getElementById("navbar").appendChild(ExampleLink);
document.getElementById("main").appendChild(ExampleIFrame);
}
start();