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
| #!/bin/bash | |
| DEF='\e[0m' #Default color and effects | |
| case $TERM in *term*) | |
| #Color picker, usage: printf ${BLD}${CUR}${RED}${BBLU}"Hello!)"${DEF}| | |
| #----------------------------------------------------------+---------+ | |
| # Text color | Background color | | |
| #--------------------------------------------------------------------+ | |
| # Base color|Lighter shade| Base color | Lighter shade | | |
| BLK='\e[30m'; blk='\e[90m'; BBLK='\e[40m'; bblk='\e[100m' #| Black | |
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
| /** Class representing a simple swipe detection */ | |
| class SwipeMe { | |
| /** | |
| * @param {HTMLElement} el - The target | |
| * @param {function} callback - The callback that handles swipe event | |
| * @param {number} [threshold=100] - The minimum distance traveled to be considered swipe | |
| */ | |
| constructor(el, callback, threshold = 100) { | |
| this.el = el | |
| this.callback = callback |
OlderNewer