zlacker

[return to "Please disable JavaScript to view this site"]
1. g5095+hM[view] [source] 2020-11-29 06:14:36
>>abused+(OP)
javascript-golf challenge: expose the content of heydonworks.com from the browser console using only javascript.
◧◩
2. daniel+eY3[view] [source] 2020-11-30 16:34:00
>>g5095+hM
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); 
    });
[go to top]