Re:Please disable JavaScript to view this site
by g5095 on Sunday November 29, 2020 @01:14AM
(#25243292)
javascript-golf challenge: expose the content of heydonworks.com from the browser console using only javascript.
[ Parent
| on HN ]
Re:Please disable JavaScript to view this site
by danielearwicker on Monday November 30, 2020 @11:34AM
(#25255565)
This must be the most unnecessarily awkward way of doing it (have to do it from the console after navigating to the site, so the request is allowed).
fetch("https://heydonworks.com").then(x => x.text()).then(x => {
var f = document.createElement("iframe");
document.body.append(f);
f.style.left = "0px";
f.style.top = "0px";
f.style.width = "100%";
f.style.height = "100%";
f.style.position = "absolute";
f.style.border = 0;
x = x.replace(/\<\/?noscript\>/gi, "");
x = x.replace(/\<script\>.*\<\/script\>/gi, "");
f.contentDocument.write(x);
});
Re:Please disable JavaScript to view this site
by g5095 on Sunday November 29, 2020 @01:16AM
(#25243300)
currently exploring view-source:https://heydonworks.com/ by deconstructing the rendered source and injecting the output back into the body..