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

Commit

Permalink
remove onload listener. that was stupid.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordon Koo committed Aug 2, 2012
1 parent 04ba9ed commit 993d633
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions js/hopscotch.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
HopscotchI18N,
utils,
undefinedStr = 'undefined',
windowLoaded = false,
waitingToStart = false,
hasJquery = (typeof window.jQuery !== undefinedStr),
hasLocalStorage = (typeof window.localStorage !== undefinedStr),
docStyle = document.body.style,
Expand All @@ -46,14 +44,6 @@
return;
}

// don't start any tours until all assets are done loading.
window.addEventListener('load', function() {
windowLoaded = true;
if (waitingToStart) {
window.hopscotch.startTour();
}
});

/**
* utils
* =====
Expand Down Expand Up @@ -822,10 +812,6 @@
if (!currTour) {
throw "Need to load a tour before you start it!";
}
if (!windowLoaded) {
waitingToStart = true;
return;
}

// Check if we are resuming state.
if (currTour.id === cookieTourId && typeof cookieTourStep !== undefinedStr) {
Expand Down

0 comments on commit 993d633

Please # to comment.