comparison src/DML/MainVisBundle/Resources/assets/lib/underscore.mixins/underscore.isEventAnAttemptToOpenANewTab.js @ 0:493bcb69166c

added public content
author Daniel Wolff
date Tue, 09 Feb 2016 20:54:02 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:493bcb69166c
1 /**
2 * Changes the default functionality of _.uniqueId()
3 *
4 * Adds a new function _.markUniqueIdAsAlreadyUsed
5 *
6 * Quicker alternative to
7 * _.isObject(serializedAttributes) && !_.isArray(serializedAttributes) && !_.isFunction(serializedAttributes)
8 *
9 * @memberOf _
10 */
11 var toString = Object.prototype.toString;
12 if (_) {
13 _.mixin({
14 isEventAnAttemptToOpenANewTab: function(event) {
15 return event.ctrlKey || event.shiftKey || event.metaKey || event.which == 2;
16 }
17 });
18 } else {
19 console.error("Can't register _.isClickAnAttemptToOpenANewTab without underscore.js (global variable '_')");
20 }