Last active
February 12, 2022 22:44
-
-
Save tacohitbox/3dabeb65c6cdd3f6ff003f67a52fb6c2 to your computer and use it in GitHub Desktop.
This is the userscript I used to defeat my school's blocking system. No joke, it worked.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Unhide Sites | |
// @version 1.0 | |
// @author tacohitbox | |
// @match *://*/* | |
// @icon https://upload.wikimedia.org/wikipedia/en/thumb/9/9a/Trollface_non-free.png/220px-Trollface_non-free.png | |
// @grant none | |
// ==/UserScript== | |
if (document.title == "Page Blocked") { | |
if (window.location.href.substring(0, 5) == "http:") {window.open(`https:${window.location.href.substring(6)}`, "_self"); return;} | |
request(window.location.href, "full"); | |
} | |
function request(url, type) { | |
var x = new XMLHttpRequest(); | |
x.open("GET", url); | |
x.setRequestHeader("Sec-Fetch-Dest", "image"); | |
x.send(); | |
x.onload = function() { | |
if (type == "full") {document.querySelector("html").innerHTML = x.responseText;} | |
else {return x.responseText;} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment