Skip to content

Commit

Permalink
Add gelato method for forcing page reload
Browse files Browse the repository at this point in the history
  • Loading branch information
mcfarljw committed Sep 23, 2016
1 parent 9b44e8f commit 60a836b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gelato.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ function isWebsite() {
return _.includes(document.location, 'http');
}

function reload(forcedReload) {
document.location.reload(forcedReload);
}

function setCookie(name, value, days) {
let expires = '';

Expand All @@ -74,6 +78,8 @@ Gelato.isLocalhost = isLocalhost;

Gelato.isWebsite = isWebsite;

Gelato.reload = reload;

Gelato.setCookie = setCookie;

Gelato._BUILD = '{!date!}';
Expand Down

0 comments on commit 60a836b

Please sign in to comment.