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
| $.resolved = function () { | |
| var defers = arguments, | |
| defersResolvedData = [], | |
| alwaysCount = 0 | |
| var resolvedDeferWrapper = $.Deferred() | |
| var always = function checkQueue() { | |
| if (++alwaysCount === defers.length) { | |
| resolvedDeferWrapper.resolveWith($, defersResolvedData) |
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
| var gulp = require('gulp'); | |
| var less = require('gulp-less'); | |
| var path = require('path');// | |
| var fs = require('fs'); | |
| var ensureDirectory = function (filepath) { | |
| var dir = path.dirname(filepath), | |
| cmd, | |
| existsSync = fs.existsSync || path.existsSync; | |
| if (!existsSync(dir)) { |
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
| var ReadyChecker = (function () { | |
| /** | |
| * Simple Deferred | |
| * @param {Function} readyCheckerResolver | |
| * @param {Function} [callback] | |
| * @constructor | |
| */ | |
| function ReadyChecker (readyCheckerResolver, callback) { | |
| this.onReady(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
| var requirejs = require('requirejs'); | |
| // Build config file. See example in https://github.com/jrburke/r.js/blob/master/build/example.build.js | |
| var jsBuildFile = '../../static/js/app/build.js' | |
| try { | |
| var buildConfig = eval( | |
| String(fs.readFileSync(jsBuildFile)) | |
| ) | |
| } |
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
| /* jQuery throttle https://github.com/cowboy/jquery-throttle-debounce */ | |
| (function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this); | |
| ; | |
| (function ($) { | |
| var $window | |
| $(function () { | |
| $window = window.$window || $(window) | |
| }) |
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
| var transformStylePropertyName | |
| window.getTransformStyleProperty = function getTransformStyleProperty() { | |
| if (transformStylePropertyName !== undefined) { | |
| return transformStylePropertyName | |
| } | |
| var detectedTransform, | |
| el = document.createElement('transformdetector'), | |
| transforms = [ |
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
| Backbone.Model.prototype.set = function(key, val, options) { | |
| var attr, attrs, unset, changes, silent, changing, prev, current; | |
| if (key == null) return this; | |
| // Handle both `"key", value` and `{key: value}` -style arguments. | |
| if (typeof key === 'object') { | |
| attrs = key; | |
| options = val; | |
| } else { | |
| (attrs = {})[key] = val; |
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
| /* | |
| * Copyright (C) 2007 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
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
| if (!Function.prototype.bind) { | |
| Function.prototype.bind = function () { | |
| return _.bind.apply(_, [this].concat(_.toArray(arguments))) | |
| } | |
| } |
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
| /** | |
| * BetterAfterlag 1.0.0 — Plugin for tracking page load lags. | |
| * Author: Alex Batalov | |
| * Based on Afterlag Plugin (https://github.com/iserdmi/afterlag-js) of Sergey Dmitriev (serdmi.com). Licensed MIT. | |
| **/ | |
| ;(function (root, factory) { | |
| if (typeof define === 'function' && define.amd) { | |
| define([], function () { | |
| return (root.Afterlag = factory()); | |
| }); |
OlderNewer