Skip to content

Commit

Permalink
Compiled
Browse files Browse the repository at this point in the history
  • Loading branch information
adamschwartz committed Jul 30, 2015
1 parent 927a263 commit 6d9c611
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions dist/eager/installHelper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(function() {
var ShepherdInstallHelper, addEventListener, ready;
var ShepherdInstallHelper, addEventListener, firstStepSelector, ready;

addEventListener = function(el, eventName, handler) {
if (el.addEventListener) {
Expand All @@ -25,6 +25,8 @@
}
};

firstStepSelector = void 0;

ShepherdInstallHelper = {
init: function(options) {
var i, j, k, len, len1, ref, ref1, step, stepOptions, steps, textLines, tour;
Expand Down Expand Up @@ -52,11 +54,14 @@
}
for (i = k = 0, len1 = steps.length; k < len1; i = ++k) {
step = steps[i];
if (i === 0) {
firstStepSelector = step.attachToSelector;
}
stepOptions = {
title: step.title,
text: step.text,
showCancelLink: step.showCancelLink,
attachTo: (step.attachToSelector || 'body') + ' ' + step.attachToDirection
attachTo: step.attachToSelector + ' ' + step.attachToDirection
};
stepOptions.buttons = [];
if (i > 0) {
Expand Down Expand Up @@ -90,7 +95,7 @@
if (options.trigger === 'first-page-visit') {
if (((ref2 = window.Eager) != null ? (ref3 = ref2.installs) != null ? (ref4 = ref3.preview) != null ? ref4.appId : void 0 : void 0 : void 0) === 'AalP5veMma6s') {
tour.start();
} else if (((ref5 = window.localStorage) != null ? ref5.eagerShepherdHasRun : void 0) !== 'true') {
} else if (document.querySelector(firstStepSelector) && ((ref5 = window.localStorage) != null ? ref5.eagerShepherdHasRun : void 0) !== 'true') {
if (typeof localStorage !== "undefined" && localStorage !== null) {
localStorage.eagerShepherdHasRun = 'true';
}
Expand Down

0 comments on commit 6d9c611

Please sign in to comment.