fix_orthodox_history_layout #1

Merged
srp merged 6 commits from fix_orthodox_history_layout into main 2024-10-17 13:34:03 -04:00
Showing only changes of commit 9557fa74e6 - Show all commits

View File

@ -0,0 +1,37 @@
// ==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
// @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,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>☦️</text></svg>
// @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?";
}
};
})();