Skip to content

Commit d849824

Browse files
committed
Fixed saving trace and profiler keys.
1 parent e7d49c7 commit d849824

File tree

4 files changed

+31
-25
lines changed

4 files changed

+31
-25
lines changed

source/background.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,22 @@ chrome.commands.onCommand.addListener(function(command)
6262
var profileTrigger = ideKey;
6363

6464
// Check if localStorage is available and get the settings out of it
65-
if (localStorage && localStorage["xdebugIdeKey"])
65+
if (localStorage)
6666
{
67-
ideKey = localStorage["xdebugIdeKey"];
68-
}
67+
if (localStorage["xdebugIdeKey"])
68+
{
69+
ideKey = localStorage["xdebugIdeKey"];
70+
}
6971

70-
if (localStorage && localStorage["xdebugTraceTrigger"])
71-
{
72-
traceTrigger = localStorage["xdebugTraceTrigger"];
73-
}
72+
if (localStorage["xdebugTraceTrigger"])
73+
{
74+
traceTrigger = localStorage["xdebugTraceTrigger"];
75+
}
7476

75-
if (localStorage && localStorage["xdebugProfileTrigger"])
76-
{
77-
profileTrigger = localStorage["xdebugProfileTrigger"];
77+
if (localStorage["xdebugProfileTrigger"])
78+
{
79+
profileTrigger = localStorage["xdebugProfileTrigger"];
80+
}
7881
}
7982

8083
// Fetch the active tab

source/content.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ var xdebug = (function() {
4545
{
4646
var newStatus,
4747
idekey = "XDEBUG_ECLIPSE",
48-
traceTrigger = null,
49-
profileTrigger = null;
48+
traceTrigger = idekey,
49+
profileTrigger = idekey;
5050

5151
// Use the IDE key from the request, if any is given
5252
if (request.idekey)

source/options.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,23 @@ <h3>IDE key</h3>
4040
<option value="null">Other</option>
4141
</select>
4242
<span id="customkey"><input type="text" id="idekey" /> </span>
43-
<button class="button" class="save-button">Save</button>
43+
<button class="save-button" class="save-button">Save</button>
4444
</p>
4545

4646
<h3>Trace Trigger Value</h3>
4747
<p class="note">If your xdebug is configured with a unique trace trigger key,
4848
set that value here. This value is blank by default.</p>
4949
<p>
5050
<input type="text" id="tracetrigger" value="">
51-
<button class="button" class="save-button">Save</button>
51+
<button class="save-button" class="save-button">Save</button>
5252
</p>
5353

5454
<h3>Profile Trigger Value</h3>
5555
<p class="note">If your xdebug is configured with a unique profile trigger key,
5656
set that value here. This value is blank by default.</p>
5757
<p>
5858
<input type="text" id="profiletrigger" value="">
59-
<button class="button" class="save-button">Save</button>
59+
<button class="save-button" class="save-button">Save</button>
6060
</p>
6161
</div>
6262

source/popup.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,22 @@ $(function() {
44
var profileTrigger = ideKey;
55

66
// Check if localStorage is available and get the ideKey out of it if any
7-
if (localStorage && localStorage["xdebugIdeKey"])
7+
if (localStorage)
88
{
9-
ideKey = localStorage["xdebugIdeKey"];
10-
}
9+
if (localStorage["xdebugIdeKey"])
10+
{
11+
ideKey = localStorage["xdebugIdeKey"];
12+
}
1113

12-
if (localStorage && localStorage["xdebugTraceTrigger"])
13-
{
14-
traceTrigger = localStorage["xdebugTraceTrigger"];
15-
}
14+
if (localStorage["xdebugTraceTrigger"])
15+
{
16+
traceTrigger = localStorage["xdebugTraceTrigger"];
17+
}
1618

17-
if (localStorage && localStorage["xdebugProfileTrigger"])
18-
{
19-
profileTrigger = localStorage["xdebugProfileTrigger"];
19+
if (localStorage["xdebugProfileTrigger"])
20+
{
21+
profileTrigger = localStorage["xdebugProfileTrigger"];
22+
}
2023
}
2124

2225
// Request the current state from the active tab

0 commit comments

Comments
 (0)