diff --git a/src/Resources/vscode_debugbar_plugin.blade.php b/src/Resources/vscode_debugbar_plugin.blade.php index bfe1112..7a0d3fe 100644 --- a/src/Resources/vscode_debugbar_plugin.blade.php +++ b/src/Resources/vscode_debugbar_plugin.blade.php @@ -103,6 +103,7 @@ function getLink(str) { result += '://file/'; result += getBasePath(); + str = str.replace(/^[\u00a0\.\ 0-9]*/,''); if (isBlade(str)) { var iRes = str.indexOf('resources'); if (iRes != -1) { @@ -121,11 +122,9 @@ function getLink(str) { } } } else if (isController(str)) { - var iRes = str.indexOf('.php:'); - if (iRes != -1) { - var iLastDash = str.lastIndexOf('-'); - result += str.substring(0, iLastDash); - } + + str = str.replace(/-[0-9]*$/,''); + result += str } return result; @@ -134,7 +133,7 @@ function getLink(str) { var funOnHoverIn = function (e) { e.stopPropagation(); - var str = $(this).html(); + var str = $(this).text(); if (isPhp(str) || isBlade(str) || isController(str)) { // OK } else { @@ -174,6 +173,8 @@ function getLink(str) { $('.phpdebugbar span.phpdebugbar-widgets-name').hover(funOnHoverIn, funOnHoverOut); $('.phpdebugbar dd.phpdebugbar-widgets-value').hover(funOnHoverIn, funOnHoverOut); + $('.phpdebugbar li.phpdebugbar-widgets-table-list-item').hover(funOnHoverIn, funOnHoverOut); + $('.phpdebugbar span.phpdebugbar-widgets-stmt-id').hover(funOnHoverIn, funOnHoverOut); }); // phpdebugbar_plugin_vscode_mIsLoaded = true;