Skip to content

Instantly share code, notes, and snippets.

@hmpmarketing
Last active January 16, 2018 10:16
Show Gist options
  • Select an option

  • Save hmpmarketing/fefada04b9c7ba6905732407ff07016d to your computer and use it in GitHub Desktop.

Select an option

Save hmpmarketing/fefada04b9c7ba6905732407ff07016d to your computer and use it in GitHub Desktop.
actionFilter.filterVisited = function (actions) {
actions.forEach(function (action_id) {
let actioncookiecap_key = 'actioncookiecap-'+action_id;
return cache.has(actioncookiecap_key).then(function(val){
if(val!==false){
let index = actions.indexOf(action_id);
actions.splice(index, 1);
}
})
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment