@jojoee/is-darkmode
Advanced tools
+15
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
| <title>is-darkmode</title> | ||
| </head> | ||
| <body> | ||
| <script src="https://rawcdn.githack.com/jojoee/is-darkmode/v1.0.0/index.js"></script> | ||
| </body> | ||
| </html> |
+3
-0
| sudo: false | ||
| language: node_js | ||
| node_js: | ||
| - "10.0.0" | ||
| - "11.0.0" | ||
| - "12.0.0" | ||
| - "13.0.0" | ||
| cache: | ||
@@ -6,0 +9,0 @@ directories: |
+1
-1
@@ -7,3 +7,3 @@ /** | ||
| function isDarkMode () { | ||
| return window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches | ||
| return window && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches | ||
| } | ||
@@ -10,0 +10,0 @@ |
+4
-3
| { | ||
| "name": "@jojoee/is-darkmode", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "description": "Is macOS using Dark appearance", | ||
@@ -29,4 +29,5 @@ "main": "./index.js", | ||
| "keywords": [ | ||
| "baht", | ||
| "text" | ||
| "macOS", | ||
| "Dark", | ||
| "appearance" | ||
| ], | ||
@@ -33,0 +34,0 @@ "author": "Nathachai Thongniran <inid3a@gmail.com>", |
7840
30.54%10
11.11%39
3800%