Skip to content

Instantly share code, notes, and snippets.

Last active September 12, 2022 03:53
What would you like to do?
javascript:%28function %28%29 %7B %09var newUser %3D 1%3B %09var newURL%3B %09url %3D window.location.href%3B %09var match1 %3D url.match%28%2F%5C%2Fu%5C%2F%28%5Cd%29%5C%2F%2Fi%29%3B %09var match2 %3D url.match%28%2Fauthuser%3D%28%5Cd%29%2Fi%29%3B %09var match3 %3D url.match%28%2F%5C%2Fb%5C%2F%28%5Cd%29%5C%2F%2Fi%29%3B %09var match4 %3D %09if %28match1%29 %7B %09%09console.log%28%27match1%27%29%3B %09%09if %28match1%5B1%5D %3D%3D 1%29 %7B %09%09%09newUser %3D 0%3B %09%09%7D %09%09newURL %3D window.location.href.replace%28%2F%5C%2Fu%5C%2F%5Cd%5C%2F%2Fi%2C "%2Fu%2F" %2B newUser %2B "%2F"%29%3B %09%7D %09else if %28match2%29 %7B %09%09console.log%28%27match2%27%29%3B %09%09if %28match2%5B1%5D %3D%3D 1%29 %7B %09%09%09newUser %3D 0%3B %09%09%7D %09%09newURL %3D window.location.href.replace%28%2Fauthuser%3D%5Cd%2Fi%2C "authuser%3D" %2B newUser%29%3B %09%7D %09else if %28match3%29 %7B %09%09console.log%28%27match3%27%29%3B %09%09if %28match3%5B1%5D %3D%3D 1%29 %7B %09%09%09newUser %3D 0%3B %09%09%7D %09%09newURL %3D window.location.href.replace%28%2F%5C%2Fb%5C%2F%5Cd%5C%2F%2Fi%2C "%2Fb%2F" %2B newUser %2B "%2F"%29%3B %09%7D %09else %7B %09%09newURL %3D window.location.origin %2B window.location.pathname%3B %09%09if %7B %09%09%09newURL %2B%3D %2B "%26authuser%3D" %2B newUser%3B %09%09%7D %09%09else %7B %09%09%09newURL %2B%3D "%3Fauthuser%3D" %2B newUser%3B %09%09%7D %09%09newURL %3D newURL %2B%3D window.location.hash%3B %09%7D %09window.location.href %3D newURL %7D %29%28%29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment