Skip to content

Commit

Permalink
improved babel build, ie error fix, moved options to window object
Browse files Browse the repository at this point in the history
  • Loading branch information
gijo-varghese committed Dec 12, 2019
1 parent 34f3e86 commit cf05dc9
Show file tree
Hide file tree
Showing 5 changed files with 3,085 additions and 294 deletions.
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["es2015", "minify"],
"comments": false
}
6 changes: 4 additions & 2 deletions flying-pages.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function flyingPages(options = {}) {
function flyingPages() {
const toPrefetch = new Set();
const alreadyPrefetched = new Set();

Expand Down Expand Up @@ -148,7 +148,7 @@ function flyingPages(options = {}) {
};

// Combine default options with received options to create the new config and set the config in window for easy access
window.FPConfig = Object.assign(defaultOptions, options);
window.FPConfig = Object.assign(defaultOptions, window.FPConfig);

// Start Queue
startQueue();
Expand All @@ -168,3 +168,5 @@ function flyingPages(options = {}) {
document.addEventListener("mouseout", mouseOutListener, listenerOptions);
document.addEventListener("touchstart", touchStartListener, listenerOptions);
}

flyingPages();
2 changes: 1 addition & 1 deletion flying-pages.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cf05dc9

Please sign in to comment.