you can use localStorage to save event 'showed modal'
<script type="text/javascript">
$(document).ready(function() {
$('#button').click(function(e) { // Button which will activate our modal
setInterval(function(){ //5 sec
try {
var diffDate = new Date().getTime() - parseInt(localStorage.getItem('showedModal'),10);
if(diffDate > 604800000){ //check showed
$('#modal').reveal({ // The item which will be opened with reveal
animation: 'fade', // fade, fadeAndPop, none
animationspeed: 600, // how fast animtions are
closeonbackgroundclick: true, // if you click background will modal close?
dismissmodalclass: 'close' // the class of a button or element that will close an open modal
});
}
} catch(e){
}
}, 5000);
return false;
});
$('#content').find('.button.green').click(function(){
try {
localStorage.setItem('showedModal', new Date().getTime()); //set showed
} catch (e) {
}
});
});
</script>