Skip to content

Instantly share code, notes, and snippets.

@nikjft
Last active September 12, 2022 03:53
Show Gist options
  • Save nikjft/0f12cd7832f742dccba56ae2f4959752 to your computer and use it in GitHub Desktop.
Save nikjft/0f12cd7832f742dccba56ae2f4959752 to your computer and use it in GitHub Desktop.
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 url.match%28%2F%5Ehttps%3A%5C%2F%5C%2Fdocs%5C.google%5C.com%5C%2F%28%5B%5E%5C%2F%5D%2B%29%5C%2Fd%5C%2F%2Fi%29%3B %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 %28window.location.search%29 %7B %09%09%09newURL %2B%3D window.location.search %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