This file contains 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 join( | |
...classNames: ([boolean, string] | string | undefined | null)[] | |
) { | |
let result = ""; | |
for (let x = 0; x < classNames.length; x++) { | |
const value = classNames[x]; | |
if (!value) continue; | |
if (typeof value === "string") { | |
result += " " + value; | |
continue; |
This file contains 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
// javascript.json | |
{ | |
/* A VSCode snippet that makes it easy to time some lines of Javascript code. | |
* | |
* Usage: | |
* 1. Cut the lines you want to time: select, cmd + x | |
* 2. Type `ctime` and press enter/tab/whatever your autocomplete key is. | |
*/ | |
"Wrap console time": { | |
"prefix": "ctime", |
This file contains 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
var DDraggable = function(element, options) { | |
var base = this; | |
base.el = element; | |
var offset = null; | |
var temp_offset = 0; | |
var first = true; | |
var y = 0; | |
base.init = function() { | |
base.el.addEventListener('touchstart', touchStart, false); |
This file contains 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
.DWPG_selectedImg { | |
width:100%; | |
background:#efefef; | |
text-align: center; | |
} | |
.DWPG_selectedImg { | |
position:relative; | |
} |