-
-
Notifications
You must be signed in to change notification settings - Fork 938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replaceAll-workaround #3348
replaceAll-workaround #3348
Conversation
cb0bdb1
to
05fb3b9
Compare
This comment has been minimized.
This comment has been minimized.
05fb3b9
to
fd1c58e
Compare
This comment has been minimized.
This comment has been minimized.
fd1c58e
to
a990b77
Compare
This comment has been minimized.
This comment has been minimized.
a990b77
to
b4be08b
Compare
b4be08b
to
1c5e15a
Compare
This comment has been minimized.
This comment has been minimized.
AUTOMERGE: (FAIL)
|
Should this be limited to Android only?
|
Didn't seem to break anything on Linux, but only lightly tested. Might prefer limiting to Android just in case as stated above. |
Yes tried yesterday on line 187 - adding now. userAgent is not defined :) |
This comment has been minimized.
This comment has been minimized.
I was able to use it on an Android 9 (Jan 2020) phone. Basic PIDs/Ports/CLI tabs. Did not test others. |
src/js/main.js
Outdated
if (/android/i.test(navigator.userAgent)) { | ||
if (typeof String.prototype.replaceAll === "undefined") { | ||
String.prototype.replaceAll = function(match, replace) { | ||
return this.replace(new RegExp(match, 'g'), () => replace); | ||
}; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need that android test tbh. typeof
sort of covers all the required bases imo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you; sounds fair. if that's the case @haslinghuis can revert and it can just be merged since it was tested the other way already,
a790821
to
1c5e15a
Compare
Kudos, SonarCloud Quality Gate passed!
|
Do you want to test this code? Here you have an automated build: |
Credit to @semics https://stackoverflow.com/a/72049058
Tested by: @rabbitambulance-ra
Co-authored-by: @nerdCopter 56646290+nerdCopter@users.noreply.github.com