Skip to content

Instantly share code, notes, and snippets.

@antonvolkoff
Created May 26, 2015 11:51
Show Gist options
  • Save antonvolkoff/2a5fbce45238a02d4c3d to your computer and use it in GitHub Desktop.
Save antonvolkoff/2a5fbce45238a02d4c3d to your computer and use it in GitHub Desktop.
Page reload
<script type="text/javascript">
var DOMReady = function(a,b,c){b=document,c='addEventListener';b[c]?b[c]('DOMContentLoaded',a):window.attachEvent('onload',a)};
var nextUrl = function () {
return "<%= ibounty_url('approve_push') %>";
};
DOMReady(function () {
var repeat = function() {
setTimeout(function() {
window.location.href = nextUrl();
repeat();
}, 1000);
};
repeat();
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment