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
| (function () { | |
| const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches | |
| const setting = localStorage.getItem('color-schema') || 'auto' | |
| if (setting === 'dark' || (prefersDark && setting !== 'light')) | |
| document.documentElement.classList.toggle('dark', true) | |
| })() |
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
| function is( obj, type ) { | |
| return typeof obj === type; | |
| } | |
| var isEventSupported = (function() { | |
| var TAGNAMES = { | |
| 'select': 'input', 'change': 'input', | |
| 'submit': 'form', 'reset': 'form', | |
| 'error': 'img', 'load': 'img', 'abort': 'img' |
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
| const instance = { | |
| $scope: '我是$scope', | |
| $state: '我是$state', | |
| $timeout: '我是$timeout', | |
| $uibModal: '我是$uibModal' | |
| } | |
| let FN_ARGS = /^[^\(]*\(\s*([^\)]*)\)/m | |
| let FN_ARG_SPLIT = /,/ | |
| let FN_ARG = /^\s*(_?)(\S+?)\1\s*$/ |