From 886a8c44c2c6040dac3303aa7e6df8d3e9cf03b1 Mon Sep 17 00:00:00 2001 From: sample-text-here <56274831+sample-text-here@users.noreply.github.com> Date: Thu, 18 Nov 2021 19:10:12 -0800 Subject: [PATCH] re-add errors --- fuckit.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/fuckit.js b/fuckit.js index 3717406..0ac1114 100644 --- a/fuckit.js +++ b/fuckit.js @@ -8,9 +8,10 @@ //@TODO: give a shit (function($){ - $.ajaxSetup({ cache: true }); + window.didFuckItDoAnythingRemotelyUseful = false; + var _FuckIt = window.FuckIt; var FuckIt = function(script){ @@ -32,9 +33,16 @@ if (!window.fuckedScript) return; var parsed = window.fuckedScript.split("\n"); parsed.splice(line - 1, 1); + window.didFuckItDoAnythingRemotelyUseful = true; window.fuckedScript = parsed.join("\n"); $.getScript("fuckit.js", function(){ eval(window.fuckedScript); + if(!window.didFuckItDoAnythingRemotelyUseful) { + parsed.splice(Math.floor(Math.random() * parsed.length) - 1, 1); + window.fuckedScript = parsed.join("\n"); + //may cut out an extra line for free + throw "im still relevant!"; + } window.fuckingDeferred.resolve(); }); return true;