Skip to content
This repository has been archived by the owner on Sep 25, 2018. It is now read-only.

Commit

Permalink
Merge pull request #624 from mozilla/remove-australis-checks
Browse files Browse the repository at this point in the history
Remove australis checks (Fixes DOA in #622)
  • Loading branch information
monicachew committed Nov 11, 2014
2 parents f37d484 + ce5b0a0 commit ee587c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 33 deletions.
8 changes: 2 additions & 6 deletions data/first-run.html
Expand Up @@ -9,16 +9,12 @@
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];
}
for (var qs in australisSubs) {
document.querySelector(qs).innerHTML = australisSubs[qs];
}
});
</script>
Expand Down
29 changes: 2 additions & 27 deletions lib/ui.js
Expand Up @@ -22,17 +22,7 @@ const {
} = require("./connection");

const xulapp = require("sdk/system/xul-app");
const usingAustralis = xulapp.satisfiesVersion(">=29");
if (usingAustralis) {
const {
ActionButton
} = require("sdk/ui/button/action");
} else {
const {
Widget
} = require("sdk/widget");
}
exports.usingAustralis = usingAustralis;
const { ActionButton } =require("sdk/ui/button/action");

const mainPage = data.url("index.html");
var uiworker = null;
Expand Down Expand Up @@ -261,10 +251,7 @@ function openOrSwitchToOrClose() {
exports.openOrSwitchToOrClose = openOrSwitchToOrClose;

// Set up the status bar button to open the main UI page:
var button;
if (usingAustralis) {
console.debug("Using australis");
button = ActionButton({
var button = ActionButton({
id: "lightbeam_Widget",
label: "Lightbeam",
tooltip: "Show Lightbeam",
Expand All @@ -278,15 +265,3 @@ if (usingAustralis) {
openOrSwitchToOrClose();
}
});
} else {
console.debug("Not using australis");
button = Widget({
id: "lightbeam_Widget",
label: "Lightbeam",
tooltip: "Show Lightbeam",
contentURL: data.url("icons/lightbeam_logo-only_32x32.png"),
onClick: function () {
openOrSwitchToOrClose();
}
});
}

0 comments on commit ee587c2

Please sign in to comment.