Welcome to Trojanware

Explore my collection of tutorials and JavaScript bookmarklets.

Tutorials

A few tutorials for things that have helped me with my public school education for the last twelve years.

Tutorial 1: How to host your own proxy

Tutorial 2: Create a custom bookmarklet

Demo Video here.

Tutorial 3: Use experimental Chrome features

Demo Video here.

Tutorial 4: Use (Chat)GPT-4 for free at school

Tutorial 5: How to get access to the school account of any/every senior

Tutorial 6: Transcribe all Audio from Assignments

Demo Video here.

Tutorial 7: Bypass News Paywalls

Tutorial 8: Bypass Chegg Paywall

Tutorial 9: Bypass Numerade Video Paywall

Tutorial 10: Prevent Chromebook (ChromeOS) Updates

Tutorial 11: Jailbreak School Chromebook

JavaScript Bookmarklets

Hover over the description button to see the descriptions.

Notice: As of Chrome v114, bookmarklets will no longer work on school devices (with devtools blocked).

Canvas Anti-log

javascript:(function() {Object.defineProperty(document, 'visibilityState', {value: 'visible', writable: true});Object.defineProperty(document, 'hidden', {value: false, writable: true});Object.defineProperty(document, 'webkitVisibilityState', {value: 'visible', writable: true});Object.defineProperty(document, 'webkitHidden', {value: false, writable: true});Window.prototype.realEventListener = Window.prototype.addEventListener;Window.prototype.addEventListener = (a,b,c) => {if (a == 'focus' || a == 'blur' || a == 'visibilitychange')console.log(`[AD] '${a}' event subscription prevented.`);elserealEventListener(a,b,c);};})();

Change tab header and image to G-Drive

javascript:function gcloak() { var link = document.querySelector("link[rel*='icon']") || document.createElement('link');link.type = 'image/x-icon';link.rel = 'shortcut icon';link.href = 'https://cdn-icons-png.flaticon.com/512/5968/5968523.png';document.title = 'My Drive - Google Drive';console.log(document.title);document.getElementsByTagName('head')[0].appendChild(link) };gcloak();setInterval(gcloak, 1000);

Inspect Element Clone

javascript:(function () { var script = document.createElement('script'); script.src="//cdn.jsdelivr.net/npm/eruda"; document.body.appendChild(script); script.onload = function () { eruda.init() } })();

Site In-Tab

javascript:(function(){var a=document.getElementById("rusic-modal")||document.createElement("iframe");a.setAttribute("allow","fullscreen");a.src=prompt("Enter URL:","example.com");a.id="rusic-modal";a.style="position:fixed;width:100vw;height:100vh;top:0px;left:0px;right:0px;bottom:0px;z-index:2147483647;background-color:white;border:none;";document.body.appendChild(a);}());

Flood Browsing History

javascript:var num=prompt("History flood amount:");done=false;x=window.location.href;for (var i=1; i<=num; i++){history.pushState(0, 0, i==num?x:i.toString());if(i==num){done=true}}if(done===true){alert(%22History%20flood%20successful!%20%22+window.location.href+%22%20now%20appears%20in%20your%20history%20%22+num+(num==1?%22%20time.%22:%22%20times.%22))}

Prevent Tab Closing

javascript:window.onbeforeunload = function() { return "Do you want to close"; }; alert("Tab Secured");

EdPuzzle Auto-Complete

javascript: fetch("https://cdn.jsdelivr.net/gh/ading2210/edpuzzle-answers@latest/script.js").then(r => r.text()).then(r => eval(r))

Speed Up Video

javascript:setInterval(() => document.querySelector("video").playbackRate = (window.speed || (window.speed = +prompt("New speed", 10))), 50)

Autoclicker

javascript: var DELAY = 1;var autoClickerStyleElement = document.createElement('style');autoClickerStyleElement.innerHTML='*{cursor: crosshair !important;}';document.body.appendChild(autoClickerStyleElement);function addClicker(e) {if(!e.isTrusted) {return;}if(e.target.classList.contains('auto-clicker-target')) {e.target.classList.remove('auto-clicker-target');} else {e.target.classList.add('auto-clicker-target');}document.body.removeChild(autoClickerStyleElement);document.body.removeEventListener('click', addClicker);e.preventDefault();autoClick(e.target);}function autoClick(element) {if(element.classList.contains('auto-clicker-target')) {element.click();setTimeout(function(){ autoClick(element); }, DELAY);}}document.body.addEventListener('click', addClicker, 99999999999);

Open an "about:blank" Tab

javascript: (function () {var url = prompt("Paste the link you want to be embedded into an about:blank page.\n(INCLUDE https://)", "https://example.com"); var urlObj = new window.URL(window.location.href); win = window.open(); win.document.body.style.margin = "0"; win.document.body.style.height = "100vh"; var iframe = win.document.createElement("iframe"); iframe.style.border = "none"; iframe.style.width = "100%"; iframe.style.height = "100%"; iframe.style.margin = "0"; iframe.referrerpolicy = "no-referrer"; iframe.src = url; win.document.body.appendChild(iframe); })();

Dark Mode

javascript:(function() { var darkReaderScript = document.createElement('script'); darkReaderScript.type = 'text/javascript'; darkReaderScript.src = 'https://cdn.jsdelivr.net/npm/darkreader@4.9.58/darkreader.min.js'; darkReaderScript.onload = function() { DarkReader.setFetchMethod(window.fetch); DarkReader.enable({ brightness: 100, contrast: 90, sepia: 10 }); }; document.head.appendChild(darkReaderScript);})();

Auto-Complete Google Form Responses

javascript:(function(){if (location.href.indexOf("?entry.") > 0) return;var inputAreas = document.querySelectorAll("div[data-params]");var urlPrefillParams = new URLSearchParams();inputAreas.forEach((inputArea) => {try {var areaParams = inputArea.getAttribute("data-params");var decodedAreaParams = JSON.parse("[" + areaParams.substr(areaParams.indexOf("["), areaParams.length));if (Array.isArray(decodedAreaParams) && decodedAreaParams.length > 0) {var questionParams = decodedAreaParams[0][4][0];if (Array.isArray(questionParams) && questionParams.length > 4) {var questionEntryId = questionParams[0];var validationParams = questionParams[4];if (Array.isArray(validationParams) && validationParams.length > 0) {var validationRule = validationParams[0];var valueToFill = null;if (validationRule[0] === 1 && validationRule[1] === 5) {valueToFill = validationRule[2][0];}if (validationRule[0] === 2 && validationRule[1] === 100) {valueToFill = validationRule[2][0];}if (valueToFill !== null) {urlPrefillParams.set("entry." + questionEntryId, valueToFill);}}}}} catch (ex) {console.error("Param decoding failed", ex, inputArea);}});if (Array.from(urlPrefillParams).length > 0) {if (confirm("Found " + Array.from(urlPrefillParams).length + " exact values in form validation. Prefill form?")) {location.search = urlPrefillParams;}}})();

Timed Page Refresh

javascript:setTimeout(()=>location.reload(), prompt('Reload the page in how many seconds:')*1000)