Skip to content

Commit c1589ca

Browse files
committed
fix popup panel layout as per feedback: gorhill@39aeaa1#commitcomment-22310294
1 parent d50e767 commit c1589ca

4 files changed

Lines changed: 32 additions & 27 deletions

File tree

src/css/popup.css

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,9 @@ h2 {
2929
cursor: pointer;
3030
font-size: 100%;
3131
font-weight: normal;
32-
margin: 1em 0 0.8em 0;
3332
padding: 0.2em;
3433
text-align: center;
3534
}
36-
h2:first-of-type {
37-
margin-top: 0;
38-
}
3935
a {
4036
color: inherit;
4137
text-decoration: none;
@@ -150,6 +146,27 @@ p {
150146
body.off #switch .fa {
151147
color: #ccc;
152148
}
149+
#basicTools {
150+
margin: 0.8em 0 0.4em 0;
151+
}
152+
.tool:first-child {
153+
margin-left: 0;
154+
}
155+
.tool {
156+
color: #aaa;
157+
cursor: pointer;
158+
visibility: hidden;
159+
margin-left: 0.8em;
160+
min-width: 1em;
161+
padding: 0 0.2em;
162+
unicode-bidi: embed;
163+
}
164+
.tool.enabled {
165+
visibility: visible;
166+
}
167+
.tool.enabled:hover {
168+
color: #444;
169+
}
153170
#page-blocked {
154171
font-size: 1.25em;
155172
}
@@ -163,19 +180,6 @@ body.off #switch .fa {
163180
margin: 0;
164181
text-align: center;
165182
}
166-
.tool {
167-
color: #aaa;
168-
cursor: pointer;
169-
display: none;
170-
min-width: 1em;
171-
unicode-bidi: embed;
172-
}
173-
.tool.enabled {
174-
display: inline-block;
175-
}
176-
.tool:hover {
177-
color: #444;
178-
}
179183
#extraTools {
180184
background-color: #eee;
181185
border: 0;

src/js/popup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ var renderPopup = function() {
434434
// https://github.com/gorhill/uBlock/issues/507
435435
// Convenience: open the logger with current tab automatically selected
436436
if ( popupData.tabId ) {
437-
uDom.nodeFromSelector('.statName > a[href^="logger-ui.html"]').setAttribute(
437+
uDom.nodeFromSelector('#basicTools > a[href^="logger-ui.html"]').setAttribute(
438438
'href',
439439
'logger-ui.html#tab_' + popupData.tabId
440440
);

src/js/traffic.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,10 @@ var onBeforeBehindTheSceneRequest = function(details) {
375375

376376
context.dispose();
377377

378-
// Not blocked
379-
if ( result !== 1 ) { return; }
380-
381-
// Blocked
382-
return { 'cancel': true };
378+
// Blocked?
379+
if ( result === 1 ) {
380+
return { 'cancel': true };
381+
}
383382
};
384383

385384
/******************************************************************************/

src/popup.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@
1414
<div id="panes">
1515
<div class="tooltipContainer">
1616
<p id="switch" data-i18n-tip="popupPowerSwitchInfo" data-tip-position="under"><span class="fa">&#xf011;</span></p>
17+
<p id="basicTools">
18+
<span id="gotoZap" class="fa tool" data-i18n-tip="popupTipZapper" data-tip-position="under">&#xf0e7;</span>
19+
<span id="gotoPick" class="fa tool" data-i18n-tip="popupTipPicker" data-tip-position="under">&#xf1fb;</span>
20+
<a href="logger-ui.html" class="fa tool enabled" data-i18n-tip="popupTipLog" data-tip-position="under">&#xf022;</a>
21+
</p>
1722
<h2 id="dfToggler" data-i18n="popupBlockedRequestPrompt">&nbsp;</h2>
1823
<p class="statName">
19-
<span data-i18n="popupBlockedOnThisPagePrompt">&nbsp;</span>&ensp;<!--
20-
--><span id="gotoZap" class="fa tool" data-i18n-tip="popupTipZapper">&#xf0e7;</span>&ensp;<!--
21-
--><span id="gotoPick" class="fa tool" data-i18n-tip="popupTipPicker">&#xf1fb;</span>&ensp;<!--
22-
--><a href="logger-ui.html" class="fa tool enabled" data-i18n-tip="popupTipLog">&#xf022;</a>
24+
<span data-i18n="popupBlockedOnThisPagePrompt">&nbsp;</span>
2325
</p>
2426
<p class="statValue" id="page-blocked">?</p>
2527
<div id="refresh" class="fa">&#xf021;</div>

0 commit comments

Comments
 (0)