Do australis check and substitutions in js on first run page

This commit is contained in:
Garrett Robinson 2014-03-20 15:09:48 -07:00
Родитель 982d12e0e3
Коммит 77106a7b4c
3 изменённых файлов: 19 добавлений и 45 удалений

Просмотреть файл

@ -1,39 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Welcome to Lightbeam!</title>
<link rel="stylesheet" href="OpenSans.css" />
<link rel="stylesheet" href="first-run.css" />
</head>
<body>
<div id="header">
<img src="icons/lightbeam_logo-wordmark_300x150.png" class="center" id="lightbeam-logo" />
<h1 class="center">Thanks for downloading Lightbeam!</h1>
</div>
<ol id="steps">
<li>
<strong>Open the Lightbeam tab</strong> by clicking the <img src="icons/lightbeam_logo-only_32x32.png" style="width:24px;"/> logo in the toolbar.
</li>
<li>
<p>Lightbeam starts recording connections as soon as it's installed. If you open it now, you'll see a blank screen because nothing's been recorded yet.</p>
<p><strong>To start visualizing your online interactions</strong>, open a new tab, navigate to a site, and then check back to the Lightbeam tab to see how your connections graph appears.</p>
</li>
<li>
<p><strong>Consider contributing data to Mozilla!</strong> We'll use it to study the tracking landscape and develop new privacy-protecting technologies for the web.</p>
<p>You can opt in to sharing your data by flipping the "Contribute Data" toggle in the top right corner of the Lightbeam tab to "On".</p>
</li>
<li>
<ul id="contact">
<li>Learn more about Mozilla's Lightbeam for Firefox on our <a href="https://mozilla.org/lightbeam">project page</a></li>
<li>Question? Idea? Email the mailing list: <a href="mailto:lightbeam@mozilla.org" target="_blank">lightbeam@mozilla.org</a></li>
<li>Found a bug? <a href="https://github.com/mozilla/lightbeam/issues/new" target="_blank">Report an issue</a> on Github</li>
<li>Don't forget to <a href="https://addons.mozilla.org/en-US/firefox/addon/lightbeam/reviews/add" target="_blank">leave a review</a> on our Mozilla Addons page!</li>
</ul>
</li>
</ol>
</body>
</html>

Просмотреть файл

@ -5,6 +5,23 @@
<title>Welcome to Lightbeam!</title>
<link rel="stylesheet" href="OpenSans.css" />
<link rel="stylesheet" href="first-run.css" />
<script>
document.addEventListener("DOMContentLoaded", function() {
const firefoxVersionRe = /Firefox\/(([0-9]+)\.([0-9]+))/;
const firefoxMajorVersion = Number(firefoxVersionRe.exec(window.navigator.userAgent)[2]);
const usingAustralis = firefoxMajorVersion >= 29 ? true : false;
const australisSubs = {
".platform-dependent, #icon-placement": '<img src="icons/lightbeam_logo-only_32x32.png" style="width:20px;"/> logo in the Toolbar.'
}
if (usingAustralis) {
for (var qs in australisSubs) {
document.querySelector(qs).innerHTML = australisSubs[qs];
}
}
});
</script>
</head>
<body>
@ -15,7 +32,7 @@
<ol id="steps">
<li>
<strong>Open the Lightbeam tab</strong> by clicking the <img src="icons/lightbeam_logo-only_16x16.png" /> logo in the Add-on bar.
<strong>Open the Lightbeam tab</strong> by clicking the <span class="platform-dependent" id="icon-placement"><img src="icons/lightbeam_logo-only_16x16.png" /> logo in the Add-on bar.</span>
</li>
<li>
<p>Lightbeam starts recording connections as soon as it's installed. If you open it now, you'll see a blank screen because nothing's been recorded yet.</p>

Просмотреть файл

@ -49,11 +49,7 @@ exports.main = function (options, callbacks) {
let loadURL = null;
switch (options.loadReason) {
case "install":
if (ui.usingAustralis) {
loadURL = "first-run-australis.html";
} else {
loadURL = "first-run.html";
}
loadURL = "first-run.html";
break;
/*
case "upgrade":