Created
August 26, 2022 06:31
-
-
Save theapache64/3b031b948efe14c45940c4fdd9f8fdba to your computer and use it in GitHub Desktop.
Auto redirect to different account - crashlytics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Extension URL RegEx : https:\/\/console.firebase.google.com\/u\/0\/.+ | |
var accountIndex = 1 // Auto redirect account index | |
var newUrl = "https://console.firebase.google.com/u/" | |
+ accountIndex | |
+ window.location.toString().split("/u/0")[1] | |
window.location = newUrl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!
I ended up a bit modifying it so not only
/u/0
are handled, as sometimes somebody will send you a link and they might have a different profile numeration than you (ex. company profile can be 3 and not 1).I wanted to avoid using REGEX so that is why it doesn't handle >9 profile digits (perf but also my sanity and I have never received link with profile number higher than one-digit number).
As I'm using Tempermonkey script executes only on websites fulfilling match argument, but as somebody might copy without reading I left checking if we are on Firebase domain.