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 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 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
| 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 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
| /** | |
| * 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 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
| [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 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
| 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 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
| /*! | |
| * Log plugin | |
| * Copyright 2012, Vitaliy Petrychuk | |
| */ | |
| ;(function(window) { | |
| var log = function() { | |
| if (window.debug_mode) { | |
| var stack = (new Error).stack; |
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
| /*! | |
| * CSS animation plugin | |
| * Copyright 2012, Vitaliy Petrychuk | |
| */ | |
| ;(function ($, _) { | |
| // usage | |
| // 1! register ($el - jQuery element) | |
| // 2. setAnimationClass || onAnimationStart || onAnimationEnd |
NewerOlder