forked from CST1229/Customized
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lib.js
20 lines (16 loc) · 817 Bytes
/
lib.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
window.addEventListener('load', (event) => {
document.getElementsByClassName("paint-editor_mod-mode-tools_1IXSj")[0].insertAdjacentHTML("beforeEnd", `<div style="border-left: 1px dashed #D9D9D9;margin-left: 15px; padding-left: 15px;"><button class="playground_playgroundButton_hZeTH" style="display: inline-block;cursor:pointer;" onclick="window.location.replace('lib/index.html');">Library</button></div>`);
});
//Redirecting to costume library
let windowUrl = new URL(window.location);
if (!windowUrl.searchParams.has("lib")) {
window.location.replace("lib/index.html");
}
//Costume library logic
if (costumeLibrary.hasOwnProperty(windowUrl.searchParams.get("lib"))) {
svgString = costumeLibrary[windowUrl.searchParams.get("lib")].costume;
} else {
svgString = costumeLibrary.blank;
}
//Costume
var svgString;