File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 11document . addEventListener ( 'DOMContentLoaded' , function ( ) {
22 // Platform detection is now handled by platform-utils.js
3- // Update the displayed shortcut text is now handled by platform-utils.js
3+ /**
4+ * Dynamically loads a stylesheet into the document's head.
5+ *
6+ * Creates a <link> element with the specified URL, sets attributes necessary for secure loading,
7+ * and appends it to the document's head. If the stylesheet fails to load, an error is logged
8+ * to the console.
9+ *
10+ * @param {string } href - The URL of the stylesheet to be loaded.
11+ * @returns {HTMLLinkElement } The created and appended link element.
12+ */
413
514 function loadStylesheet ( href ) {
615 const link = document . createElement ( 'link' ) ;
Original file line number Diff line number Diff line change @@ -9,7 +9,13 @@ function isMacPlatform() {
99}
1010
1111/**
12- * Update UI elements based on platform (Mac vs non-Mac)
12+ * Updates UI elements to reflect the user's platform.
13+ *
14+ * This function determines whether the current platform is a Mac by calling `isMacPlatform()`
15+ * and adjusts the visibility of UI elements accordingly:
16+ * - Elements with the class `.default-theme-text` are hidden on Mac platforms.
17+ * - Elements with the class `.mac-theme-text` are shown on Mac platforms.
18+ * On non-Mac platforms, the visibility settings are reversed.
1319 */
1420function updatePlatformSpecificElements ( ) {
1521 const isMac = isMacPlatform ( ) ;
You can’t perform that action at this time.
0 commit comments