1
0
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:
Barry vd. Heuvel 2024-03-01 16:28:34 +01:00 committed by GitHub
parent d420dd09d1
commit 9700e50974
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -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);
}

View File

@ -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'));