1 <!-- Fancy consoomer JavaScript version of LRS wiki, allows changing CSS. -->
5 let thisPage
= "pimp_my_lrs.html";
9 function placeCSS(name
, file
)
11 var link
= document
.createElement("a");
12 link
.href
= thisPage
+ "?p=" + page
+ "&s=" + file
;
13 link
.innerHTML
= "_" + name
+ "_";
14 var elem
= document
.getElementsByTagName("body")[0];
20 var url
= new URL(window
.location
.href
);
21 style
= url
.searchParams
.get("s");
22 page
= url
.searchParams
.get("p");
24 document
.body
.innerHTML
= "";
26 var req
= new XMLHttpRequest();
29 req
.onload = function()
31 document
.body
.innerHTML
=
32 req
.response
.toString().replaceAll(
33 /(<a[^>]*href=\")([^\"]*\.html)\"/g,"$1" + thisPage
+ "?p=$2&s=" + style
+ "\"");
35 var cl
= document
.getElementsByTagName('link')[0];
36 cl
.parentNode
.removeChild(cl
);
38 var link
= document
.createElement("link");
39 link
.rel
= "stylesheet";
40 link
.type
= "text/css";
43 document
.getElementsByTagName("head")[0].prepend(link
);
45 var fl
= document
.getElementById("fancylink");
46 fl
.href
= "index.html";
47 fl
.innerHTML
= "chad version";
49 placeCSS("$$$","style_gold.css");
50 placeCSS("gay","style_gay.css");
51 placeCSS("lol","style_lol.css");
52 placeCSS("90s","style_90s.css");
53 placeCSS("unix","style_unix.css");
54 placeCSS("txt","style_txt.css");
55 placeCSS("dark","style_dark.css");
56 placeCSS("fancy","style_fancy.css");
57 placeCSS("plain","style.css");
63 <body onload=
"load()">
64 <p> u need javascript to consoom this site, wanna go
<a href=
"index.html">back
</a>?
</p>