Skip to content
This repository was archived by the owner on Oct 2, 2018. It is now read-only.

Commit 54fbfab

Browse files
committed
Stick all headers, handle activity error
1 parent 715326d commit 54fbfab

3 files changed

Lines changed: 21 additions & 13 deletions

File tree

scripts/firetext.js

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,20 +1383,14 @@ function processActions(eventAttribute, target, event) {
13831383
name: "marketplace-app-rating",
13841384
data: {slug: "firetext"}
13851385
});
1386+
activity.onerror = function() {
1387+
visitURL(target.getAttribute(eventAttribute + '-location'));
1388+
};
13861389
return;
13871390
}
13881391
}
13891392

1390-
var browseLocation = target.getAttribute(eventAttribute + '-location');
1391-
1392-
// Fix for empty locations
1393-
if(!browseLocation || browseLocation==''){
1394-
firetext.notify(navigator.mozL10n.get('not-functional-link'));
1395-
return;
1396-
}
1397-
1398-
// Open a new tab
1399-
window.open(browseLocation);
1393+
visitURL(target.getAttribute(eventAttribute + '-location'));
14001394
} else if (calledFunction == 'justify') {
14011395
var justifyDirection = justifySelect.value;
14021396
if (justifyDirection == 'l') {
@@ -1693,6 +1687,17 @@ function setDocumentTitle() {
16931687
}
16941688
}
16951689

1690+
function visitURL(browseLocation) {
1691+
// Fix for empty locations
1692+
if(!browseLocation || browseLocation==''){
1693+
firetext.notify(navigator.mozL10n.get('not-functional-link'));
1694+
return;
1695+
}
1696+
1697+
// Open a new tab
1698+
window.open(browseLocation);
1699+
}
1700+
16961701
function christmas() {
16971702
var testDate = new Date(),
16981703
testMonth = testDate.getMonth()+1,

style/bb/drawer.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ section[data-type="sidebar"] > nav > h2 {
207207
margin: 0;
208208
padding-right: 0.8rem;
209209
color: #6f6f6f;
210+
position: sticky;
211+
top: 0;
212+
z-index: 1;
210213
}
211214

212215
section[data-type="sidebar"] [role="toolbar"] {

style/main.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ label.pack-switch {
192192
font-family: "Open Sans";
193193
font-weight: normal;
194194
font-size: 1.7rem;
195+
position: sticky;
196+
top: 0;
197+
z-index: 1;
195198
}
196199

197200
[data-type="list"] li a,
@@ -214,9 +217,6 @@ label.pack-switch {
214217

215218
.docsList.previews h2 {
216219
padding: 0.5rem calc((100% - 1000px) / 2 + 2rem);
217-
position: sticky;
218-
top: 0;
219-
z-index: 1;
220220
}
221221

222222
.docsList:not(.previews) ul {

0 commit comments

Comments
 (0)