Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<script>
function myVote(shortcode) {
$(document).on('submit', 'form', function() {
// Set product in local storage
localStorage.setItem(shortcode, "true");
// Refresh page after 3000 milliseconds
setTimeout(function() { location.reload(true); }, 3000);
});
};
</script>
<script>
const allthethings = [];
for(let i=0; i<localStorage.length; i++) {
let key = localStorage.key(i);
allthethings.push(localStorage.key(i));
document.getElementById(localStorage.key(i)).style.display = "none";
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.