Bladeren bron

Adding Reload 1337x.to

Jason Tarka 1 jaar geleden
bovenliggende
commit
dd89b707fa
1 gewijzigde bestanden met toevoegingen van 22 en 0 verwijderingen
  1. 22 0
      JS/Reload 1337x.to.user.js

+ 22 - 0
JS/Reload 1337x.to.user.js

@@ -0,0 +1,22 @@
+// ==UserScript==
+// @name         Reload 1337x.to
+// @namespace    http://tampermonkey.net/
+// @version      2024-01-28
+// @description  Reload when getting rate limited.
+// @author       Jason
+// @match        https://1337x.to/*
+// @icon         https://www.google.com/s2/favicons?sz=64&domain=1337x.to
+// @grant        none
+// ==/UserScript==
+
+(function() {
+    'use strict';
+
+    const DELAY = 1000 + (Math.random() * 2000);
+
+    let header = document.querySelector('h1');
+    // Header is showing rate limited error.
+    if(header.innerText.includes('1015')) {
+        setTimeout(() => location.reload(), DELAY);
+    }
+})();