Skip to content

Instantly share code, notes, and snippets.

@1208nn
Last active March 16, 2024 14:46
Show Gist options
  • Save 1208nn/78cc02183c222412ef24457f7e704275 to your computer and use it in GitHub Desktop.
Save 1208nn/78cc02183c222412ef24457f7e704275 to your computer and use it in GitHub Desktop.
Hides torn's crime stories but keeps outcome (success/fail) info. Thanks to https://greasyfork.org/scripts/477977
// ==UserScript==
// @name Torn Crimes Hide Stories
// @namespace https://github.com/1208nn
// @version 0.4.2
// @description Hides torn's crime stories but keeps outcome (success/fail) info. Thanks to https://greasyfork.org/scripts/477977
// @author 1208nn
// @match https://www.torn.com/loader.php?sid=crimes*
// @icon https://www.torn.com/favicon.ico
// @grant none
// @downloadURL https://gist.github.com/1208nn/78cc02183c222412ef24457f7e704275/raw/TornCrimesHideStories.user.js
// @updateURL https://gist.github.com/1208nn/78cc02183c222412ef24457f7e704275/raw/TornCrimesHideStories.user.js
// ==/UserScript==
(async function () {
'use strict';
const styles = 'p.story___GmRvQ { display: none; } div.divider___RUQMk { display: none; }';
let style = document.createElement("style");
style.type = "text/css";
style.innerHTML = styles;
while (document.head == null) {
await sleep(50);
}
document.head.appendChild(style);
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment