From 7f8869d54f3bacb19525f73f891b602f26f58e3e Mon Sep 17 00:00:00 2001 From: Amm0ni4 Date: Sun, 25 Feb 2024 15:09:48 +0100 Subject: [PATCH] minor fix to last commit --- Bypass_All_Shortlinks.user.js | 7 +++++-- extra_bypasses/ad-maven.user.js | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Bypass_All_Shortlinks.user.js b/Bypass_All_Shortlinks.user.js index c492f2f..916f091 100644 --- a/Bypass_All_Shortlinks.user.js +++ b/Bypass_All_Shortlinks.user.js @@ -1754,8 +1754,11 @@ inputField.value = savedShortlink; GM_deleteValue('savedShortlink'); setTimeout(function() { - document.querySelector('#bttn').click(); - alert('Bypass started. Wait a few seconds.') + let bypassButton = document.querySelector('#bttn'); + if (bypassButton) { + bypassButton.click(); + alert('Bypass started. Wait a few seconds.') + } }, 500);// Wait 0.5 to press the button } }); diff --git a/extra_bypasses/ad-maven.user.js b/extra_bypasses/ad-maven.user.js index e54778c..a5b4030 100644 --- a/extra_bypasses/ad-maven.user.js +++ b/extra_bypasses/ad-maven.user.js @@ -24,8 +24,11 @@ inputField.value = savedShortlink; GM_deleteValue('savedShortlink'); setTimeout(function() { - document.querySelector('#bttn').click(); - alert('Bypass started. Wait a few seconds.') + let bypassButton = document.querySelector('#bttn'); + if (bypassButton) { + bypassButton.click(); + alert('Bypass started. Wait a few seconds.') + } }, 500);// Wait 0.5 to press the button } });