Skip to content

Instantly share code, notes, and snippets.

@eviltrout
Created November 18, 2014 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eviltrout/803abe027113d7fb0064 to your computer and use it in GitHub Desktop.
Save eviltrout/803abe027113d7fb0064 to your computer and use it in GitHub Desktop.
var refresher = function() {
if(Discourse.SiteSettings.login_required) {
window.location.pathname = Discourse.getURL('/');
} else {
  window.location.reload();
}
};
bootbox.dialog(I18n.lookup("log_out_redirect"), { label: 'Refresh', callback: refresher}, {onEscape: refresher, backdrop: 'static'})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment