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 utm parameters from url | |
* ( Use this as bookmarklet ) | |
*/ | |
(function(){ | |
var loc, search, params, i; | |
loc = location; | |
search = loc.search.replace( /^\?/, '' ).split( '&' ); | |
params = []; | |
i = search.length; |
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
export const vnodeRender = { | |
methods: { | |
vnodeRender(vnode) { | |
if (process.browser) { | |
if (!vnode.tag) { | |
return document.createTextNode(vnode.text) | |
} | |
const el = document.createElement(vnode.tag) | |
if (vnode.data) { | |
if (vnode.data.staticClass) { |
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 _delegate = function(elms, type, selector, callback){ | |
elms = (_type(elms) === "string") ? document.querySelectorAll(elms) | |
: (! elms.length) ? [elms] | |
: elms; | |
Array.from(elms).forEach(function(elm){ | |
elm.addEventListener(type, function(e){ | |
var valid = !! Array.from(this.querySelectorAll(selector)) | |
.filter(function(el){ | |
return el === e.target; | |
}).length; |
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.xgradient.js | |
* http://blog.mach3.jp/ | |
* | |
* Publish Date : 2010/5/13 | |
* Requirement : jQuery 1.4 or later | |
* http://jquery.com/ | |
* | |
* Copyright 2010, Mach3 | |
*/ |
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
/** | |
* Grunt task for pngquant | |
* ----------------------- | |
*/ | |
// @example: | |
// | |
// pngquant: { | |
// options: { | |
// preserve_mtime: true |
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($, undefined){ | |
/** | |
* Get all custom attributes | |
* @param HTMLElement el | |
* @return Object | |
*/ | |
$.getAttributes = function(el){ | |
var $el, data, add, i; | |
$el = $(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
(function($){ | |
/** | |
* Detect support of css transition, event name | |
*/ | |
$.support.transitionInfo = (function(){ | |
var el, names, name, info = null; | |
el = document.createElement("div"); | |
names = { | |
"WebkitTransition": "webkitTransitionEnd", |
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($){ | |
/** | |
* Detect supports | |
*/ | |
$.support.touchEvents = "ontouchstart" in document; | |
$.support.msPointerEvents = window.navigator.msPointerEnabled; | |
/** | |
* Swipe event object |
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(win, doc){ | |
var Assets = function(){ | |
this.items = []; | |
this.nodes = []; | |
this.attrs = { | |
callback: null, | |
append: true | |
}; | |
}; |
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(win, doc){ | |
/** | |
* Namespace | |
* --------- | |
*/ | |
var ns = win._harvest = {}; | |
/** | |
* Loader |
NewerOlder