Home > Technical & Creative Skills > Programming, Servers & Scripts

[Request] Backbutton redirect script (4)


01-21-2022 10:54 AM #1 affcombo (Member)
[Request] Backbutton redirect script

As title, can anybody share with me a good backbutton redirect scritp?
As far as now, i've not been able to find something that works on chrome.


04-07-2022 12:41 PM #2 xkuba (Junior Member)

I am experiencing the same problem...


04-07-2022 12:44 PM #3 jasclick (Member)

! function() {
var t;
var tmp = "yoururlhere";
try {
for (t = 0; 10 > t; ++t) history.pushState({}, '', '');
onpopstate = function(t) {
t.state && location.replace(tmp);
}
} catch (o) {}
}();

This is what I was rocking and as far as I know it still works on mobile at least


04-07-2022 05:00 PM #4 affpayinggao (Veteran Member)

Quote Originally Posted by jasclick View Post
! function() {
var t;
var tmp = "yoururlhere";
try {
for (t = 0; 10 > t; ++t) history.pushState({}, '', '');
onpopstate = function(t) {
t.state && location.replace(tmp);
}
} catch (o) {}
}();

This is what I was rocking and as far as I know it still works on mobile at least
It works, nice share. Thanks


Home > Technical & Creative Skills > Programming, Servers & Scripts