Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Add Mozilla.UITour call to homepage, for #3411
Browse files Browse the repository at this point in the history
  • Loading branch information
ianb committed Aug 31, 2017
1 parent 6fbe226 commit e3d61a5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server/src/pages/homepage/controller.js
@@ -1,3 +1,4 @@
/* globals Mozilla */
const page = require("./page").page;

let model;
Expand All @@ -14,6 +15,13 @@ function render() {
document.addEventListener("addon-present", () => {
if (location.hash === "#hello") {
document.dispatchEvent(new CustomEvent("request-onboarding"));
} else if (location.hash === "#tour") {
try {
Mozilla.UITour.showHighlight("screenshots");
} catch (e) {
console.warn("Attempted to start #tour on non-Firefox version or unsupported version");
throw e;
}
}
});

Expand Down

0 comments on commit e3d61a5

Please sign in to comment.