mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-16 21:08:34 +01:00
Fix jquery4 deprecations (#610)
This commit is contained in:
parent
d420dd09d1
commit
9700e50974
@ -186,7 +186,7 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
||||
* @param {Function} cb
|
||||
*/
|
||||
bindAttr: function(attr, cb) {
|
||||
if ($.isArray(attr)) {
|
||||
if (Array.isArray(attr)) {
|
||||
for (var i = 0, c = attr.length; i < c; i++) {
|
||||
this.bindAttr(attr[i], cb);
|
||||
}
|
||||
@ -1227,7 +1227,7 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
||||
this.addEventListener("readystatechange", function() {
|
||||
var skipUrl = self.debugbar.openHandler ? self.debugbar.openHandler.get('url') : null;
|
||||
var href = (typeof url === 'string') ? url : url.href;
|
||||
|
||||
|
||||
if (xhr.readyState == 4 && href.indexOf(skipUrl) !== 0) {
|
||||
self.handle(xhr);
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
||||
highlight(codeElement).removeClass('hljs');
|
||||
|
||||
// Show line numbers in a list
|
||||
if ($.isNumeric(firstLineNumber)) {
|
||||
if (!isNaN(parseFloat(firstLineNumber))) {
|
||||
var lineCount = code.split('\n').length;
|
||||
var $lineNumbers = $('<ul />').prependTo(pre);
|
||||
pre.children().addClass(csscls('numbered-code'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user