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
/*! | |
* CSS animation plugin | |
* Copyright 2012, Vitaliy Petrychuk | |
*/ | |
;(function ($, _) { | |
// usage | |
// 1! register ($el - jQuery element) | |
// 2. setAnimationClass || onAnimationStart || onAnimationEnd |
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
/*! | |
* Log plugin | |
* Copyright 2012, Vitaliy Petrychuk | |
*/ | |
;(function(window) { | |
var log = function() { | |
if (window.debug_mode) { | |
var stack = (new Error).stack; |
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
package com.LALALA; | |
import org.json.JSONArray; | |
import org.json.JSONException; | |
import android.content.Context; | |
import android.view.KeyEvent; | |
import android.view.inputmethod.InputMethodManager; | |
import org.apache.cordova.api.CallbackContext; | |
import org.apache.cordova.api.CordovaPlugin; |
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
[user] | |
name = Vitalii Petrychuk | |
email = [email protected] | |
[difftool "sourcetree"] | |
cmd = opendiff \"$LOCAL\" \"$REMOTE\" | |
path = | |
[mergetool "sourcetree"] | |
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" | |
trustExitCode = true | |
[color] |
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
/** | |
* Substitute {d} with passed arguments | |
* @example substitute('key is {0} and value is {1}', 'some_key', 'some_value'); | |
* @param string {String} initial string | |
* @returns {String} modified string | |
*/ | |
var substitute = function (string) { | |
if (!string) { | |
return ''; | |
} |
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
Marionette.AppRouter.prototype.processAppRoutes = function(controller, appRoutes) { | |
var routeNames = _.keys(appRoutes).reverse(); // Backbone requires reverted order of routes | |
_.each(routeNames, function(route) { | |
var methodName = appRoutes[route]; | |
var params = methodName.split('#'); | |
var ctrl = controller; | |
var method; | |
if (params.length > 1) { |
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 makePrint = function (win, src) { | |
if (!src) { | |
win = window.open(); | |
src = win; | |
} | |
var add = function () { | |
var img = win.document.createElement('img'); | |
var style = win.document.createElement('style'); | |
style.setAttribute('media', 'all'); | |
style.innerHTML = '@page{size:auto;margin:0;}body{border:0;background:#fff;margin:0;padding:0;}img{max-width:100%;max-height:100%;margin:0;display:block;}'; |
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
@page { | |
size: auto; | |
margin: 0; | |
} | |
@media screen, print { | |
html, | |
body { | |
height: 100%; | |
} | |
body { |
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
/*global define */ | |
/*jshint expr:true */ | |
define([], function () { | |
'use strict'; | |
var hasLocalStorageSupport = (function () { | |
var str = 'storage-test-' + Math.random(); | |
try { |
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
/** | |
* Update the param value of the passed URI. | |
* In case parameter wasn't found we have to add it. | |
* @param {string} uri - URI. | |
* @param {string} key - Parameter name. | |
* @param {string} value - Parameter value. | |
* @returns {string} Updated URI. | |
*/ | |
var updateQueryStringParameter = function (uri, key, value) { | |
var re = new RegExp('([?&])' + key + '=.*?(&|$)', 'i'); |
OlderNewer