Open
Conversation
✅ Deploy Preview for tiddlywiki-previews ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Confirmed: pmario has already signed the Contributor License Agreement (see contributing.md) |
📊 Build Size Comparison:
|
| Branch | Size |
|---|---|
| Base (master) | 2487.2 KB |
| PR | 2487.3 KB |
Diff: ⬆️ Increase: +0.1 KB
⚠️ Change Note Status
This PR appears to contain code changes but doesn't include a change note.
Please add a change note by creating a .tid file in editions/tw5.com/tiddlers/releasenotes/<version>/
📚 Documentation: Release Notes and Changes
💡 Note: If this is a documentation-only change, you can ignore this message.
Member
Author
|
I did test all the checks with FireFox and Edge @Jermolene ... can you test on Mac |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
navigator.platformwith modernnavigator.userAgentData.platformAPI for browser platform detectionnavigator.platformfor browsers that don't yet supportuserAgentData(Firefox, Safari)userAgentDatareturns"macOS"vsnavigator.platformreturning"MacIntel")Test plan
$tw.platformvalues are correct in Chrome/Edge (usesuserAgentDatapath)$tw.platformvalues are correct in Firefox/Safari (usesnavigator.platformfallback)$:/info/browser/is-mac,is-windows,is-linuxtiddlers are set correctlyDetails
navigator.platformis deprecated and browsers may eventually remove it. This change uses feature detection to prefernavigator.userAgentData.platformwhen available, with a graceful fallback to the deprecated API for older browsers.Only the TiddlyWiki-owned code in
core/modules/startup/startup.jsis changed. Vendored third-party libraries (CodeMirror, Leaflet) that also usenavigator.platformare left as-is.Fixes #7621