mirror of
https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated.git
synced 2025-03-01 21:09:37 +05:00
remove message before redirect because it breaks the bypass in some cases
This commit is contained in:
parent
a2ef8cf6bb
commit
88280f1163
4 changed files with 7 additions and 5 deletions
|
@ -4,7 +4,7 @@
|
||||||
// @run-at document-start
|
// @run-at document-start
|
||||||
// @author Amm0ni4
|
// @author Amm0ni4
|
||||||
// @noframes
|
// @noframes
|
||||||
// @version 94.0.19
|
// @version 94.0.20
|
||||||
// @grant GM_setValue
|
// @grant GM_setValue
|
||||||
// @grant GM_getValue
|
// @grant GM_getValue
|
||||||
// @grant GM_addStyle
|
// @grant GM_addStyle
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
// @run-at document-start
|
// @run-at document-start
|
||||||
// @author Amm0ni4
|
// @author Amm0ni4
|
||||||
// @noframes
|
// @noframes
|
||||||
// @version 94.0.19
|
// @version 94.0.20
|
||||||
// @grant GM_setValue
|
// @grant GM_setValue
|
||||||
// @grant GM_getValue
|
// @grant GM_getValue
|
||||||
// @grant GM_addStyle
|
// @grant GM_addStyle
|
||||||
|
@ -1503,7 +1503,8 @@
|
||||||
const isValidUrl = url => /^(?:https?|ftp):\/\/(?:\w+\.){1,3}\w+(?:\/\S*)?$/.test(url);
|
const isValidUrl = url => /^(?:https?|ftp):\/\/(?:\w+\.){1,3}\w+(?:\/\S*)?$/.test(url);
|
||||||
function redirect(finalUrl) {
|
function redirect(finalUrl) {
|
||||||
if (isValidUrl(finalUrl)) {
|
if (isValidUrl(finalUrl)) {
|
||||||
typeof redirectWithMessage === 'function' ? redirectWithMessage(finalUrl) : window.location.assign(finalUrl);
|
//typeof redirectWithMessage === 'function' ? redirectWithMessage(finalUrl) : window.location.assign(finalUrl);
|
||||||
|
window.location.assign(finalUrl);
|
||||||
} else {
|
} else {
|
||||||
showAlert("Invalid URL: " + finalUrl, 'error', 3000, '', 'secondary');
|
showAlert("Invalid URL: " + finalUrl, 'error', 3000, '', 'secondary');
|
||||||
}
|
}
|
||||||
|
|
|
@ -250,7 +250,8 @@
|
||||||
const isValidUrl = url => /^(?:https?|ftp):\/\/(?:\w+\.){1,3}\w+(?:\/\S*)?$/.test(url);
|
const isValidUrl = url => /^(?:https?|ftp):\/\/(?:\w+\.){1,3}\w+(?:\/\S*)?$/.test(url);
|
||||||
function redirect(finalUrl) {
|
function redirect(finalUrl) {
|
||||||
if (isValidUrl(finalUrl)) {
|
if (isValidUrl(finalUrl)) {
|
||||||
typeof redirectWithMessage === 'function' ? redirectWithMessage(finalUrl) : window.location.assign(finalUrl);
|
//typeof redirectWithMessage === 'function' ? redirectWithMessage(finalUrl) : window.location.assign(finalUrl);
|
||||||
|
window.location.assign(finalUrl);
|
||||||
} else {
|
} else {
|
||||||
showAlert("Invalid URL: " + finalUrl, 'error', 3000, '', 'secondary');
|
showAlert("Invalid URL: " + finalUrl, 'error', 3000, '', 'secondary');
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
// @namespace Violentmonkey Scripts
|
// @namespace Violentmonkey Scripts
|
||||||
// @run-at document-start
|
// @run-at document-start
|
||||||
// @author Bloggerpemula
|
// @author Bloggerpemula
|
||||||
// @version 94.0.19
|
// @version 94.0.20
|
||||||
// @match *://*/*
|
// @match *://*/*
|
||||||
// @grant GM_setValue
|
// @grant GM_setValue
|
||||||
// @grant GM_getValue
|
// @grant GM_getValue
|
||||||
|
|
Loading…
Reference in a new issue