Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/Resources/vscode_debugbar_plugin.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand All @@ -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 {
Expand Down Expand Up @@ -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;
Expand Down