- Go to the
Preferencesscreen. - Click
Sidebar theme.
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
| module.exports = (test, pattern) => { | |
| return new RegExp(test.replace(/\*/g, '([^*]+)'), 'g').test(pattern); | |
| }; |
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
| module.exports = (string) => { | |
| return string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase(); | |
| }; |
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
| input::-webkit-input-placeholder { | |
| color: #666666; | |
| } | |
| input :-moz-placeholder { | |
| color: #666666; | |
| } | |
| input::-moz-placeholder { | |
| color: #666666; |
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
| module.exports = (node, callback) => { | |
| if (node.childNodes) { | |
| for (let index = 0; index < node.childNodes.length; index++) { | |
| const child = node.childNodes[index] | |
| const next = callback(child) | |
| if (!next) { | |
| walk(child, callback) | |
| } | |
| } |
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
| module.exports = (query, result, insensitive) => { | |
| let index = 0; | |
| let last = 0; | |
| let matched = false; | |
| // Normalize the strings we are comparing to each other. | |
| if (insensitive) { | |
| query = query.toLowerCase(); | |
| result = result.toLowerCase(); | |
| } |
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
| module.exports = weights => { | |
| let seed = Math.random() * weights.length; | |
| return weights.find(weight => (seed - weight) <= 0); | |
| }; |
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
| let events = []; | |
| let timeout = null; | |
| let interval = 100; | |
| const getScheduled = () => { | |
| let now = Date.now(); | |
| return events.filter(event => { | |
| return (event.lastInvoked + event.interval) < now; | |
| }); |
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
| module.exports = (red, green, blue, preferShorthand = false) => { | |
| let colours = [red, green, blue].map(value => value.toString(16)); | |
| let canBeCondensed = colours.every(value => value.charAt(0) === value.charAt(1)); | |
| if (canBeCondensed && preferShorthand) { | |
| colours = colours.map(v => v.charAt(0)); | |
| } | |
| return '#' + colours.join(''); | |
| }; |
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
| module.exports = hex => { | |
| if (hex.charAt(0) === '#') { | |
| hex = hex.substring(1); | |
| } | |
| if (hex.length !== 3 && hex.length !== 6) { | |
| return false; | |
| } | |
| if (hex.length === 3) { |
OlderNewer