Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/jquery
File: jquery.hotkeys.js
/******************************************************************************************************************************
[0] Fix | Delete
[1] Fix | Delete
* @ Original idea by by Binny V A, Original version: 2.00.A
[2] Fix | Delete
* @ http://www.openjs.com/scripts/events/keyboard_shortcuts/
[3] Fix | Delete
* @ Original License : BSD
[4] Fix | Delete
[5] Fix | Delete
* @ jQuery Plugin by Tzury Bar Yochay
[6] Fix | Delete
mail: tzury.by@gmail.com
[7] Fix | Delete
blog: evalinux.wordpress.com
[8] Fix | Delete
face: facebook.com/profile.php?id=513676303
[9] Fix | Delete
[10] Fix | Delete
(c) Copyrights 2007
[11] Fix | Delete
[12] Fix | Delete
* @ jQuery Plugin version Beta (0.0.2)
[13] Fix | Delete
* @ License: jQuery-License.
[14] Fix | Delete
[15] Fix | Delete
TODO:
[16] Fix | Delete
add queue support (as in gmail) e.g. 'x' then 'y', etc.
[17] Fix | Delete
add mouse + mouse wheel events.
[18] Fix | Delete
[19] Fix | Delete
USAGE:
[20] Fix | Delete
$.hotkeys.add('Ctrl+c', function(){ alert('copy anyone?');});
[21] Fix | Delete
$.hotkeys.add('Ctrl+c', {target:'div#editor', type:'keyup', propagate: true},function(){ alert('copy anyone?');});>
[22] Fix | Delete
$.hotkeys.remove('Ctrl+c');
[23] Fix | Delete
$.hotkeys.remove('Ctrl+c', {target:'div#editor', type:'keypress'});
[24] Fix | Delete
[25] Fix | Delete
******************************************************************************************************************************/
[26] Fix | Delete
(function (jQuery){
[27] Fix | Delete
this.version = '(beta)(0.0.3)';
[28] Fix | Delete
this.all = {};
[29] Fix | Delete
this.special_keys = {
[30] Fix | Delete
27: 'esc', 9: 'tab', 32:'space', 13: 'return', 8:'backspace', 145: 'scroll', 20: 'capslock',
[31] Fix | Delete
144: 'numlock', 19:'pause', 45:'insert', 36:'home', 46:'del',35:'end', 33: 'pageup',
[32] Fix | Delete
34:'pagedown', 37:'left', 38:'up', 39:'right',40:'down', 112:'f1',113:'f2', 114:'f3',
[33] Fix | Delete
115:'f4', 116:'f5', 117:'f6', 118:'f7', 119:'f8', 120:'f9', 121:'f10', 122:'f11', 123:'f12'};
[34] Fix | Delete
[35] Fix | Delete
this.shift_nums = { "`":"~", "1":"!", "2":"@", "3":"#", "4":"$", "5":"%", "6":"^", "7":"&",
[36] Fix | Delete
"8":"*", "9":"(", "0":")", "-":"_", "=":"+", ";":":", "'":"\"", ",":"<",
[37] Fix | Delete
".":">", "/":"?", "\\":"|" };
[38] Fix | Delete
[39] Fix | Delete
this.add = function(combi, options, callback) {
[40] Fix | Delete
if ( typeof options === 'function' ){
[41] Fix | Delete
callback = options;
[42] Fix | Delete
options = {};
[43] Fix | Delete
}
[44] Fix | Delete
var opt = {},
[45] Fix | Delete
defaults = {type: 'keydown', propagate: false, disableInInput: false, target: jQuery('html')[0]},
[46] Fix | Delete
that = this;
[47] Fix | Delete
opt = jQuery.extend( opt , defaults, options || {} );
[48] Fix | Delete
combi = combi.toLowerCase();
[49] Fix | Delete
[50] Fix | Delete
// inspect if keystroke matches
[51] Fix | Delete
var inspector = function(event) {
[52] Fix | Delete
// WP: not needed with newer jQuery
[53] Fix | Delete
// event = jQuery.event.fix(event); // jQuery event normalization.
[54] Fix | Delete
var element = event.target;
[55] Fix | Delete
// @ TextNode -> nodeType == 3
[56] Fix | Delete
// WP: not needed with newer jQuery
[57] Fix | Delete
// element = (element.nodeType==3) ? element.parentNode : element;
[58] Fix | Delete
[59] Fix | Delete
if ( opt['disableInInput'] ) { // Disable shortcut keys in Input, Textarea fields
[60] Fix | Delete
var target = jQuery(element);
[61] Fix | Delete
[62] Fix | Delete
if ( ( target.is('input') || target.is('textarea') ) &&
[63] Fix | Delete
( ! opt.noDisable || ! target.is( opt.noDisable ) ) ) {
[64] Fix | Delete
[65] Fix | Delete
return;
[66] Fix | Delete
}
[67] Fix | Delete
}
[68] Fix | Delete
var code = event.which,
[69] Fix | Delete
type = event.type,
[70] Fix | Delete
character = String.fromCharCode(code).toLowerCase(),
[71] Fix | Delete
special = that.special_keys[code],
[72] Fix | Delete
shift = event.shiftKey,
[73] Fix | Delete
ctrl = event.ctrlKey,
[74] Fix | Delete
alt= event.altKey,
[75] Fix | Delete
meta = event.metaKey,
[76] Fix | Delete
propagate = true, // default behaivour
[77] Fix | Delete
mapPoint = null;
[78] Fix | Delete
[79] Fix | Delete
// in opera + safari, the event.target is unpredictable.
[80] Fix | Delete
// for example: 'keydown' might be associated with HtmlBodyElement
[81] Fix | Delete
// or the element where you last clicked with your mouse.
[82] Fix | Delete
// WP: needed for all browsers
[83] Fix | Delete
// if (jQuery.browser.opera || jQuery.browser.safari){
[84] Fix | Delete
while (!that.all[element] && element.parentNode){
[85] Fix | Delete
element = element.parentNode;
[86] Fix | Delete
}
[87] Fix | Delete
// }
[88] Fix | Delete
var cbMap = that.all[element].events[type].callbackMap;
[89] Fix | Delete
if(!shift && !ctrl && !alt && !meta) { // No Modifiers
[90] Fix | Delete
mapPoint = cbMap[special] || cbMap[character]
[91] Fix | Delete
}
[92] Fix | Delete
// deals with combinaitons (alt|ctrl|shift+anything)
[93] Fix | Delete
else{
[94] Fix | Delete
var modif = '';
[95] Fix | Delete
if(alt) modif +='alt+';
[96] Fix | Delete
if(ctrl) modif+= 'ctrl+';
[97] Fix | Delete
if(shift) modif += 'shift+';
[98] Fix | Delete
if(meta) modif += 'meta+';
[99] Fix | Delete
// modifiers + special keys or modifiers + characters or modifiers + shift characters
[100] Fix | Delete
mapPoint = cbMap[modif+special] || cbMap[modif+character] || cbMap[modif+that.shift_nums[character]]
[101] Fix | Delete
}
[102] Fix | Delete
if (mapPoint){
[103] Fix | Delete
mapPoint.cb(event);
[104] Fix | Delete
if(!mapPoint.propagate) {
[105] Fix | Delete
event.stopPropagation();
[106] Fix | Delete
event.preventDefault();
[107] Fix | Delete
return false;
[108] Fix | Delete
}
[109] Fix | Delete
}
[110] Fix | Delete
};
[111] Fix | Delete
// first hook for this element
[112] Fix | Delete
if (!this.all[opt.target]){
[113] Fix | Delete
this.all[opt.target] = {events:{}};
[114] Fix | Delete
}
[115] Fix | Delete
if (!this.all[opt.target].events[opt.type]){
[116] Fix | Delete
this.all[opt.target].events[opt.type] = {callbackMap: {}}
[117] Fix | Delete
jQuery.event.add(opt.target, opt.type, inspector);
[118] Fix | Delete
}
[119] Fix | Delete
this.all[opt.target].events[opt.type].callbackMap[combi] = {cb: callback, propagate:opt.propagate};
[120] Fix | Delete
return jQuery;
[121] Fix | Delete
};
[122] Fix | Delete
this.remove = function(exp, opt) {
[123] Fix | Delete
opt = opt || {};
[124] Fix | Delete
target = opt.target || jQuery('html')[0];
[125] Fix | Delete
type = opt.type || 'keydown';
[126] Fix | Delete
exp = exp.toLowerCase();
[127] Fix | Delete
delete this.all[target].events[type].callbackMap[exp]
[128] Fix | Delete
return jQuery;
[129] Fix | Delete
};
[130] Fix | Delete
jQuery.hotkeys = this;
[131] Fix | Delete
return jQuery;
[132] Fix | Delete
})(jQuery);
[133] Fix | Delete
[134] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function