Add fix-orthodox-history-layout/fix_orthodox_history_layout.user.js
This commit is contained in:
parent
78a0089e91
commit
9557fa74e6
@ -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?";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})();
|
Loading…
Reference in New Issue
Block a user