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
/*! jquery.redux.js | Copyright (c) 2015 nowri | The MIT License (MIT) */ | |
(function(factory) { | |
if(typeof exports === 'object') { | |
factory(require('jquery')); | |
} else if(typeof define === 'function' && define.amd) { | |
define(['jquery'], factory); | |
} else { | |
factory(jQuery); | |
} | |
}(function($) { |
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
/** | |
* @see http://www.bloggingdeveloper.com/post/JavaScript-QueryString-ParseGet-QueryString-with-Client-Side-JavaScript.aspx | |
*/ | |
<script type="text/jscript" language="javascript"> | |
function getQuerystring(key, default_) | |
{ | |
if (default_==null) default_=""; | |
key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); | |
var regex = new RegExp("[\\?&]"+key+"=([^&#]*)"); | |
var qs = regex.exec(window.location.href); |
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
import moment from 'moment' | |
export default { | |
formInputTime (val = '') { | |
let h, m, ar | |
val = val.replace(/(^\s+)|(\s+$)/g, '').replace(/\n/g, '') | |
ar = val.split(':') | |
if (ar.length === 2) { | |
h = ar[0] | |
m = ar[1] | |
} else { |
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 hoverEffect = function($dom, timerIdList) { | |
var CLASS_HOVER = "hover", | |
touthStart = (Modernizr.touch)? "touchstart" : "mouseover", | |
touthEnd = (Modernizr.touch)? "touchend" : "mouseout", | |
isAndroid = isMobile.Android(); | |
$dom.each(function(i, el){ |
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
const STATE_READY = 1; | |
const STATE_PLAYING = 2; | |
const STATE_PAUSE = 3; | |
const STATE_END = 0; | |
class Timer { | |
constructor(updateFunc, sec) { | |
this.sec = sec; | |
this.updateFunc = updateFunc; | |
this.state = STATE_READY; |
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
{ | |
"remove-empty-rulesets": true, | |
"always-semicolon": true, | |
"color-case": "lower", | |
"block-indent": " ", | |
"color-shorthand": false, | |
"element-case": "lower", | |
"eof-newline": true, | |
"leading-zero": true, | |
"quotes": "double", |
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
const NumberUtil = (function() { | |
"use strict"; | |
function normalize(value, minimum, maximum) { | |
return (value - minimum) / (maximum - minimum); | |
} | |
function interpolate(normValue, minimum, maximum) { |
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 onReady = function(func){ | |
function IEDOMContentLoaded(){ | |
try { | |
(new Image()).doScroll(); | |
func(); | |
} catch(err) { | |
setTimeout(IEDOMContentLoaded, 64); | |
} | |
} | |
if (typeof window.getSelection === "function") { |
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 getPrefix( prop ){ | |
var vendorPrefixes = ['Moz','Webkit','Khtml','O','ms'], | |
style = document.createElement('div').style, | |
upper = prop.charAt(0).toUpperCase() + prop.slice(1), | |
pref, len = vendorPrefixes.length; | |
while( len-- ){ | |
if((vendorPrefixes[len] + upper) in style){ | |
pref = (vendorPrefixes[len]); | |
} | |
} |
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
// Template | |
// (c) 2011 Jason Byrne, MileSplit | |
// May be freely distributed under the MIT license, with attribution. | |
// | |
// ** Usage ** | |
// | |
// HTML: | |
// <script type="text/html" id="tmplArticle"><h1>${Title}</h1></script> | |
// | |
// JavaScript: |
NewerOlder