Browse code

Add support for old jquery functions

hiromipaw authored on16/06/2017 11:57:59
Showing3 changed files
... ...
@@ -14,7 +14,7 @@
14 14
   <ifneq "$(REDIRECT)" "" "<meta http-equiv="refresh" content="0;url=$(DOCROOT)/$(REDIRECT)">">
15 15
   <ifneq "$(REDIRECT_GLOBAL)" "" "<meta http-equiv="refresh" content="0;url=$(REDIRECT_GLOBAL)">">
16 16
 
17
-  # begin WML to generate css/js paths 
17
+  # begin WML to generate css/js paths
18 18
   <ifneq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/$(STYLESHEET)">">
19 19
   <ifeq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/master.css">">
20 20
 
... ...
@@ -30,7 +30,7 @@
30 30
   <![endif]-->
31 31
 
32 32
 #  <script language="javascript" type="text/javascript" src="$(DOCROOT)/global.js"></script>
33
-  # end WML to generate css/js paths 
33
+  # end WML to generate css/js paths
34 34
 
35 35
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
36 36
   <meta name="author" content="The Tor Project, Inc.">
... ...
@@ -46,6 +46,7 @@
46 46
   <script type="text/javascript" src="../js/jquery.ba-bbq.min.js">
47 47
 /*  Source: https://raw.github.com/cowboy/jquery-bbq/v1.2.1/jquery.ba-bbq.js */
48 48
   </script>
49
+  <script type="text/javascript" src="../js/jquery-migrate-1.0.0.js"></script>
49 50
   <script type="text/javascript" src="../js/dlpage01.js">
50 51
 # /* Displays detected section */
51 52
   </script>
... ...
@@ -84,9 +85,9 @@
84 85
             my $lang = "$(LANG)";
85 86
 
86 87
             for my $key (@keys) {
87
-              my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,;  
88
+              my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,;
88 89
 
89
-              # in directory of active link, set class active 
90
+              # in directory of active link, set class active
90 91
               my $class;
91 92
               if ((defined $dir) and ($WML_SRC_DIRNAME =~/$dir/) or ($WML_SRC_BASENAME eq $base)) {
92 93
                 $class = 'class="active"';
... ...
@@ -95,12 +96,12 @@
95 96
               }
96 97
 
97 98
 	            $dir = '.' unless defined $dir;
98
-                
99
+
99 100
               # translated version
100 101
               if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
101 102
                   printf '<li><a '.$class.' href="%s">%s</a></li>'."\n",
102 103
                          stripDotSlashs("$(DOCROOT)/$dir/$base.html.$(LANG)"),$navigation{$key};
103
-              } 
104
+              }
104 105
               # english version
105 106
               elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
106 107
               	printf '<li><a '.$class.' href="%s">%s</a></li>'."\n",
... ...
@@ -129,14 +130,14 @@ docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml),
129 130
               my $val = shift @calltoaction;
130 131
               push @keys, $key;
131 132
               $calltoaction{$key} = $val;
132
-            } 
133
+            }
133 134
 
134 135
             my $page = $WML_SRC_BASENAME;
135 136
             my $lang = "$(LANG)";
136 137
             for my $key (@keys) {
137
-              my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,;  
138
+              my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,;
138 139
 
139
-              # in directory, set active 
140
+              # in directory, set active
140 141
               my $class;
141 142
               if ((defined $dir) and ($WML_SRC_DIRNAME =~/$dir/) or ($WML_SRC_BASENAME eq $base)) {
142 143
               #if ($WML_SRC_BASENAME eq $base) {
... ...
@@ -150,7 +151,7 @@ docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml),
150 151
               if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
151 152
                   printf '<li class="donate"><a '.$class.' href="%s">%s</a></li>'."\n",
152 153
                          stripDotSlashs("$(DOCROOT)/$dir/$base.html.$(LANG)"),$calltoaction{$key};
153
-              } 
154
+              }
154 155
               # default to english version
155 156
               elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
156 157
               	printf '<li class="donate"><a '.$class.' href="%s">%s</a></li>'."\n",
... ...
@@ -158,7 +159,7 @@ docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml),
158 159
               } else {
159 160
                 warn "$WML_SRC_FILENAME has a [page $key] (parses to docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml), but that doesn't exist.";
160 161
               }
161
-            }    
162
+            }
162 163
           }:>
163 164
         </ul>
164 165
       </div>
165 166
new file mode 100644
... ...
@@ -0,0 +1,498 @@
1
+/*!
2
+ * jQuery Migrate - v1.0.0 - 2013-01-14
3
+ * https://github.com/jquery/jquery-migrate
4
+ * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
5
+ */
6
+(function( jQuery, window, undefined ) {
7
+"use strict";
8
+
9
+
10
+var warnedAbout = {};
11
+
12
+// List of warnings already given; public read only
13
+jQuery.migrateWarnings = [];
14
+
15
+// Set to true to prevent console output; migrateWarnings still maintained
16
+// jQuery.migrateMute = false;
17
+
18
+// Forget any warnings we've already given; public
19
+jQuery.migrateReset = function() {
20
+	warnedAbout = {};
21
+	jQuery.migrateWarnings.length = 0;
22
+};
23
+
24
+function migrateWarn( msg) {
25
+	if ( !warnedAbout[ msg ] ) {
26
+		warnedAbout[ msg ] = true;
27
+		jQuery.migrateWarnings.push( msg );
28
+		if ( window.console && console.warn && !jQuery.migrateMute ) {
29
+			console.warn( "JQMIGRATE: " + msg );
30
+		}
31
+	}
32
+}
33
+
34
+function migrateWarnProp( obj, prop, value, msg ) {
35
+	if ( Object.defineProperty ) {
36
+		// On ES5 browsers (non-oldIE), warn if the code tries to get prop;
37
+		// allow property to be overwritten in case some other plugin wants it
38
+		try {
39
+			Object.defineProperty( obj, prop, {
40
+				configurable: true,
41
+				enumerable: true,
42
+				get: function() {
43
+					migrateWarn( msg );
44
+					return value;
45
+				},
46
+				set: function( newValue ) {
47
+					migrateWarn( msg );
48
+					value = newValue;
49
+				}
50
+			});
51
+			return;
52
+		} catch( err ) {
53
+			// IE8 is a dope about Object.defineProperty, can't warn there
54
+		}
55
+	}
56
+
57
+	// Non-ES5 (or broken) browser; just set the property
58
+	jQuery._definePropertyBroken = true;
59
+	obj[ prop ] = value;
60
+}
61
+
62
+if ( document.compatMode === "BackCompat" ) {
63
+	// jQuery has never supported or tested Quirks Mode
64
+	migrateWarn( "jQuery is not compatible with Quirks Mode" );
65
+}
66
+
67
+
68
+var attrFn = {},
69
+	attr = jQuery.attr,
70
+	valueAttrGet = jQuery.attrHooks.value && jQuery.attrHooks.value.get ||
71
+		function() { return null; },
72
+	valueAttrSet = jQuery.attrHooks.value && jQuery.attrHooks.value.set ||
73
+		function() { return undefined; },
74
+	rnoType = /^(?:input|button)$/i,
75
+	rnoAttrNodeType = /^[238]$/,
76
+	rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
77
+	ruseDefault = /^(?:checked|selected)$/i;
78
+
79
+// jQuery.attrFn
80
+migrateWarnProp( jQuery, "attrFn", attrFn, "jQuery.attrFn is deprecated" );
81
+
82
+jQuery.attr = function( elem, name, value, pass ) {
83
+	var lowerName = name.toLowerCase(),
84
+		nType = elem && elem.nodeType;
85
+
86
+	if ( pass ) {
87
+		migrateWarn("jQuery.fn.attr( props, pass ) is deprecated");
88
+		if ( elem && !rnoAttrNodeType.test( nType ) && jQuery.isFunction( jQuery.fn[ name ] ) ) {
89
+			return jQuery( elem )[ name ]( value );
90
+		}
91
+	}
92
+
93
+	// Warn if user tries to set `type` since it breaks on IE 6/7/8
94
+	if ( name === "type" && value !== undefined && rnoType.test( elem.nodeName ) ) {
95
+		migrateWarn("Can't change the 'type' of an input or button in IE 6/7/8");
96
+	}
97
+
98
+	// Restore boolHook for boolean property/attribute synchronization
99
+	if ( !jQuery.attrHooks[ lowerName ] && rboolean.test( lowerName ) ) {
100
+		jQuery.attrHooks[ lowerName ] = {
101
+			get: function( elem, name ) {
102
+				// Align boolean attributes with corresponding properties
103
+				// Fall back to attribute presence where some booleans are not supported
104
+				var attrNode,
105
+					property = jQuery.prop( elem, name );
106
+				return property === true || typeof property !== "boolean" &&
107
+					( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
108
+
109
+					name.toLowerCase() :
110
+					undefined;
111
+			},
112
+			set: function( elem, value, name ) {
113
+				var propName;
114
+				if ( value === false ) {
115
+					// Remove boolean attributes when set to false
116
+					jQuery.removeAttr( elem, name );
117
+				} else {
118
+					// value is true since we know at this point it's type boolean and not false
119
+					// Set boolean attributes to the same name and set the DOM property
120
+					propName = jQuery.propFix[ name ] || name;
121
+					if ( propName in elem ) {
122
+						// Only set the IDL specifically if it already exists on the element
123
+						elem[ propName ] = true;
124
+					}
125
+
126
+					elem.setAttribute( name, name.toLowerCase() );
127
+				}
128
+				return name;
129
+			}
130
+		};
131
+
132
+		// Warn only for attributes that can remain distinct from their properties post-1.9
133
+		if ( ruseDefault.test( lowerName ) ) {
134
+			migrateWarn( "jQuery.fn.attr(" + lowerName + ") may use property instead of attribute" );
135
+		}
136
+	}
137
+
138
+	return attr.call( jQuery, elem, name, value );
139
+};
140
+
141
+// attrHooks: value
142
+jQuery.attrHooks.value = {
143
+	get: function( elem, name ) {
144
+		var nodeName = ( elem.nodeName || "" ).toLowerCase();
145
+		if ( nodeName === "button" ) {
146
+			return valueAttrGet.apply( this, arguments );
147
+		}
148
+		if ( nodeName !== "input" && nodeName !== "option" ) {
149
+			migrateWarn("property-based jQuery.fn.attr('value') is deprecated");
150
+		}
151
+		return name in elem ?
152
+			elem.value :
153
+			null;
154
+	},
155
+	set: function( elem, value ) {
156
+		var nodeName = ( elem.nodeName || "" ).toLowerCase();
157
+		if ( nodeName === "button" ) {
158
+			return valueAttrSet.apply( this, arguments );
159
+		}
160
+		if ( nodeName !== "input" && nodeName !== "option" ) {
161
+			migrateWarn("property-based jQuery.fn.attr('value', val) is deprecated");
162
+		}
163
+		// Does not return so that setAttribute is also used
164
+		elem.value = value;
165
+	}
166
+};
167
+
168
+
169
+var matched, browser,
170
+	oldInit = jQuery.fn.init,
171
+	// Note this does NOT include the # XSS fix from 1.7!
172
+	rquickExpr = /^(?:.*(<[\w\W]+>)[^>]*|#([\w\-]*))$/;
173
+
174
+// $(html) "looks like html" rule change
175
+jQuery.fn.init = function( selector, context, rootjQuery ) {
176
+	var match;
177
+
178
+	if ( selector && typeof selector === "string" && !jQuery.isPlainObject( context ) &&
179
+			(match = rquickExpr.exec( selector )) && match[1] ) {
180
+		// This is an HTML string according to the "old" rules; is it still?
181
+		if ( selector.charAt( 0 ) !== "<" ) {
182
+			migrateWarn("$(html) HTML strings must start with '<' character");
183
+		}
184
+		// Now process using loose rules; let pre-1.8 play too
185
+		if ( context && context.context ) {
186
+			// jQuery object as context; parseHTML expects a DOM object
187
+			context = context.context;
188
+		}
189
+		if ( jQuery.parseHTML ) {
190
+			return oldInit.call( this, jQuery.parseHTML( jQuery.trim(selector), context, true ),
191
+					context, rootjQuery );
192
+		}
193
+	}
194
+	return oldInit.apply( this, arguments );
195
+};
196
+jQuery.fn.init.prototype = jQuery.fn;
197
+
198
+jQuery.uaMatch = function( ua ) {
199
+	ua = ua.toLowerCase();
200
+
201
+	var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
202
+		/(webkit)[ \/]([\w.]+)/.exec( ua ) ||
203
+		/(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
204
+		/(msie) ([\w.]+)/.exec( ua ) ||
205
+		ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
206
+		[];
207
+
208
+	return {
209
+		browser: match[ 1 ] || "",
210
+		version: match[ 2 ] || "0"
211
+	};
212
+};
213
+
214
+matched = jQuery.uaMatch( navigator.userAgent );
215
+browser = {};
216
+
217
+if ( matched.browser ) {
218
+	browser[ matched.browser ] = true;
219
+	browser.version = matched.version;
220
+}
221
+
222
+// Chrome is Webkit, but Webkit is also Safari.
223
+if ( browser.chrome ) {
224
+	browser.webkit = true;
225
+} else if ( browser.webkit ) {
226
+	browser.safari = true;
227
+}
228
+
229
+jQuery.browser = browser;
230
+
231
+// Warn if the code tries to get jQuery.browser
232
+migrateWarnProp( jQuery, "browser", browser, "jQuery.browser is deprecated" );
233
+
234
+jQuery.sub = function() {
235
+	function jQuerySub( selector, context ) {
236
+		return new jQuerySub.fn.init( selector, context );
237
+	}
238
+	jQuery.extend( true, jQuerySub, this );
239
+	jQuerySub.superclass = this;
240
+	jQuerySub.fn = jQuerySub.prototype = this();
241
+	jQuerySub.fn.constructor = jQuerySub;
242
+	jQuerySub.sub = this.sub;
243
+	jQuerySub.fn.init = function init( selector, context ) {
244
+		if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
245
+			context = jQuerySub( context );
246
+		}
247
+
248
+		return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
249
+	};
250
+	jQuerySub.fn.init.prototype = jQuerySub.fn;
251
+	var rootjQuerySub = jQuerySub(document);
252
+	migrateWarn( "jQuery.sub() is deprecated" );
253
+	return jQuerySub;
254
+};
255
+
256
+
257
+var oldFnData = jQuery.fn.data;
258
+
259
+jQuery.fn.data = function( name ) {
260
+	var ret, evt,
261
+		elem = this[0];
262
+
263
+	// Handles 1.7 which has this behavior and 1.8 which doesn't
264
+	if ( elem && name === "events" && arguments.length === 1 ) {
265
+		ret = jQuery.data( elem, name );
266
+		evt = jQuery._data( elem, name );
267
+		if ( ( ret === undefined || ret === evt ) && evt !== undefined ) {
268
+			migrateWarn("Use of jQuery.fn.data('events') is deprecated");
269
+			return evt;
270
+		}
271
+	}
272
+	return oldFnData.apply( this, arguments );
273
+};
274
+
275
+
276
+var rscriptType = /\/(java|ecma)script/i,
277
+	oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack,
278
+	oldFragment = jQuery.buildFragment;
279
+
280
+jQuery.fn.andSelf = function() {
281
+	migrateWarn("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()");
282
+	return oldSelf.apply( this, arguments );
283
+};
284
+
285
+// Since jQuery.clean is used internally on older versions, we only shim if it's missing
286
+if ( !jQuery.clean ) {
287
+	jQuery.clean = function( elems, context, fragment, scripts ) {
288
+		// Set context per 1.8 logic
289
+		context = context || document;
290
+		context = !context.nodeType && context[0] || context;
291
+		context = context.ownerDocument || context;
292
+
293
+		migrateWarn("jQuery.clean() is deprecated");
294
+
295
+		var i, elem, handleScript, jsTags,
296
+			ret = [];
297
+
298
+		jQuery.merge( ret, jQuery.buildFragment( elems, context ).childNodes );
299
+
300
+		// Complex logic lifted directly from jQuery 1.8
301
+		if ( fragment ) {
302
+			// Special handling of each script element
303
+			handleScript = function( elem ) {
304
+				// Check if we consider it executable
305
+				if ( !elem.type || rscriptType.test( elem.type ) ) {
306
+					// Detach the script and store it in the scripts array (if provided) or the fragment
307
+					// Return truthy to indicate that it has been handled
308
+					return scripts ?
309
+						scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) :
310
+						fragment.appendChild( elem );
311
+				}
312
+			};
313
+
314
+			for ( i = 0; (elem = ret[i]) != null; i++ ) {
315
+				// Check if we're done after handling an executable script
316
+				if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) {
317
+					// Append to fragment and handle embedded scripts
318
+					fragment.appendChild( elem );
319
+					if ( typeof elem.getElementsByTagName !== "undefined" ) {
320
+						// handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
321
+						jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript );
322
+
323
+						// Splice the scripts into ret after their former ancestor and advance our index beyond them
324
+						ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
325
+						i += jsTags.length;
326
+					}
327
+				}
328
+			}
329
+		}
330
+
331
+		return ret;
332
+	};
333
+}
334
+
335
+jQuery.buildFragment = function( elems, context, scripts, selection ) {
336
+	var ret,
337
+		warning = "jQuery.buildFragment() is deprecated";
338
+
339
+	// Set context per 1.8 logic
340
+	context = context || document;
341
+	context = !context.nodeType && context[0] || context;
342
+	context = context.ownerDocument || context;
343
+
344
+	try {
345
+		ret = oldFragment.call( jQuery, elems, context, scripts, selection );
346
+
347
+	// jQuery < 1.8 required arrayish context; jQuery 1.9 fails on it
348
+	} catch( x ) {
349
+		ret = oldFragment.call( jQuery, elems, context.nodeType ? [ context ] : context[ 0 ], scripts, selection );
350
+
351
+		// Success from tweaking context means buildFragment was called by the user
352
+		migrateWarn( warning );
353
+	}
354
+
355
+	// jQuery < 1.9 returned an object instead of the fragment itself
356
+	if ( !ret.fragment ) {
357
+		migrateWarnProp( ret, "fragment", ret, warning );
358
+		migrateWarnProp( ret, "cacheable", false, warning );
359
+	}
360
+
361
+	return ret;
362
+};
363
+
364
+var eventAdd = jQuery.event.add,
365
+	eventRemove = jQuery.event.remove,
366
+	eventTrigger = jQuery.event.trigger,
367
+	oldToggle = jQuery.fn.toggle,
368
+	oldLive = jQuery.fn.live,
369
+	oldDie = jQuery.fn.die,
370
+	ajaxEvents = "ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",
371
+	rajaxEvent = new RegExp( "\\b(?:" + ajaxEvents + ")\\b" ),
372
+	rhoverHack = /(?:^|\s)hover(\.\S+|)\b/,
373
+	hoverHack = function( events ) {
374
+		if ( typeof( events ) != "string" || jQuery.event.special.hover ) {
375
+			return events;
376
+		}
377
+		if ( rhoverHack.test( events ) ) {
378
+			migrateWarn("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'");
379
+		}
380
+		return events && events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
381
+	};
382
+
383
+// Event props removed in 1.9, put them back if needed; no practical way to warn them
384
+if ( jQuery.event.props && jQuery.event.props[ 0 ] !== "attrChange" ) {
385
+	jQuery.event.props.unshift( "attrChange", "attrName", "relatedNode", "srcElement" );
386
+}
387
+
388
+// Undocumented jQuery.event.handle was "deprecated" in jQuery 1.7
389
+migrateWarnProp( jQuery.event, "handle", jQuery.event.dispatch, "jQuery.event.handle is undocumented and deprecated" );
390
+
391
+// Support for 'hover' pseudo-event and ajax event warnings
392
+jQuery.event.add = function( elem, types, handler, data, selector ){
393
+	if ( elem !== document && rajaxEvent.test( types ) ) {
394
+		migrateWarn( "AJAX events should be attached to document: " + types );
395
+	}
396
+	eventAdd.call( this, elem, hoverHack( types || "" ), handler, data, selector );
397
+};
398
+jQuery.event.remove = function( elem, types, handler, selector, mappedTypes ){
399
+	eventRemove.call( this, elem, hoverHack( types ) || "", handler, selector, mappedTypes );
400
+};
401
+
402
+jQuery.fn.error = function() {
403
+	var args = Array.prototype.slice.call( arguments, 0);
404
+	migrateWarn("jQuery.fn.error() is deprecated");
405
+	args.splice( 0, 0, "error" );
406
+	if ( arguments.length ) {
407
+		return this.bind.apply( this, args );
408
+	}
409
+	// error event should not bubble to window, although it does pre-1.7
410
+	this.triggerHandler.apply( this, args );
411
+	return this;
412
+};
413
+
414
+jQuery.fn.toggle = function( fn, fn2 ) {
415
+
416
+	// Don't mess with animation or css toggles
417
+	if ( !jQuery.isFunction( fn ) || !jQuery.isFunction( fn2 ) ) {
418
+		return oldToggle.apply( this, arguments );
419
+	}
420
+	migrateWarn("jQuery.fn.toggle(handler, handler...) is deprecated");
421
+
422
+	// Save reference to arguments for access in closure
423
+	var args = arguments,
424
+		guid = fn.guid || jQuery.guid++,
425
+		i = 0,
426
+		toggler = function( event ) {
427
+			// Figure out which function to execute
428
+			var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
429
+			jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
430
+
431
+			// Make sure that clicks stop
432
+			event.preventDefault();
433
+
434
+			// and execute the function
435
+			return args[ lastToggle ].apply( this, arguments ) || false;
436
+		};
437
+
438
+	// link all the functions, so any of them can unbind this click handler
439
+	toggler.guid = guid;
440
+	while ( i < args.length ) {
441
+		args[ i++ ].guid = guid;
442
+	}
443
+
444
+	return this.click( toggler );
445
+};
446
+
447
+jQuery.fn.live = function( types, data, fn ) {
448
+	migrateWarn("jQuery.fn.live() is deprecated");
449
+	if ( oldLive ) {
450
+		return oldLive.apply( this, arguments );
451
+	}
452
+	jQuery( this.context ).on( types, this.selector, data, fn );
453
+	return this;
454
+};
455
+
456
+jQuery.fn.die = function( types, fn ) {
457
+	migrateWarn("jQuery.fn.die() is deprecated");
458
+	if ( oldDie ) {
459
+		return oldDie.apply( this, arguments );
460
+	}
461
+	jQuery( this.context ).off( types, this.selector || "**", fn );
462
+	return this;
463
+};
464
+
465
+// Turn global events into document-triggered events
466
+jQuery.event.trigger = function( event, data, elem, onlyHandlers  ){
467
+	if ( !elem & !rajaxEvent.test( event ) ) {
468
+		migrateWarn( "Global events are undocumented and deprecated" );
469
+	}
470
+	return eventTrigger.call( this,  event, data, elem || document, onlyHandlers  );
471
+};
472
+jQuery.each( ajaxEvents.split("|"),
473
+	function( _, name ) {
474
+		jQuery.event.special[ name ] = {
475
+			setup: function() {
476
+				var elem = this;
477
+
478
+				// The document needs no shimming; must be !== for oldIE
479
+				if ( elem !== document ) {
480
+					jQuery.event.add( document, name + "." + jQuery.guid, function() {
481
+						jQuery.event.trigger( name, null, elem, true );
482
+					});
483
+					jQuery._data( this, name, jQuery.guid++ );
484
+				}
485
+				return false;
486
+			},
487
+			teardown: function() {
488
+				if ( this !== document ) {
489
+					jQuery.event.remove( document, name + "." + jQuery._data( this, name ) );
490
+				}
491
+				return false;
492
+			}
493
+		};
494
+	}
495
+);
496
+
497
+
498
+})( jQuery, window );
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010
3 3
  * http://benalman.com/projects/jquery-bbq-plugin/
4
- * 
4
+ *
5 5
  * Copyright (c) 2010 "Cowboy" Ben Alman
6 6
  * Dual licensed under the MIT and GPL licenses.
7 7
  * http://benalman.com/about/license/
... ...
@@ -10,9 +10,9 @@
10 10
 /*
11 11
  * jQuery hashchange event - v1.2 - 2/11/2010
12 12
  * http://benalman.com/projects/jquery-hashchange-plugin/
13
- * 
13
+ *
14 14
  * Copyright (c) 2010 "Cowboy" Ben Alman
15 15
  * Dual licensed under the MIT and GPL licenses.
16 16
  * http://benalman.com/about/license/
17 17
  */
18
-(function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=f.msie&&(g===b||g<8),e="on"+d in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this);
19 18
\ No newline at end of file
19
+(function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=f.msie&&(g===b||g<8),e="on"+d in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this);