// ==UserScript== // @name Fix Orthodox History Layout // @version 2024.10.17 // @description Get rid of their dumb ad sidebar and make the content width normal again. // @author Rdr. Seraphim Pardee (srp) // @license Unlicense; https://opensource.org/license/unlicense // @namespace https://git.hl.srp.life/srp/userscripts // @homepageURL https://git.hl.srp.life/srp/userscripts // @supportURL https://git.hl.srp.life/srp/userscripts/issues // @downloadURL https://git.hl.srp.life/srp/userscripts/raw/branch/main/fix-orthodox-history-layout/fix_orthodox_history_layout.user.js // @updateURL https://git.hl.srp.life/srp/userscripts/raw/branch/main/fix-orthodox-history-layout/fix_orthodox_history_layout.meta.js // @match https://orthodoxhistory.org/* // @icon data:image/svg+xml,☦️ // @run-at document-start // @grant none // ==/UserScript== (function() { 'use strict'; // Fixing homepage. let originElem = document.getElementById("content"); if (originElem) { let firstColumn = originElem.getElementsByClassName("col-sm-3")[0]; firstColumn.remove(); let contentColumn = originElem.getElementsByClassName("col-sm-6")[0]; contentColumn.className = "col-sm-9"; } // Prevent scummy ad redirecting. window.onbeforeunload = function(e) { if (!window.location.href.startsWith("https://orthodoxhistory.org")) { e.preventDefault(); e.returnValue = "You are being directed outside of Orthodox History. Do you wish to continue?"; } }; })();