Jake Vanderwerf
2026-01-04 d38d825e3484d822ea3c1f0fb1df37ecf386b18a
assets/js/concise/FrontendVotes.js
@@ -1,17 +1,17 @@
class FrontendVotes {
   constructor() {
      // Initialize DataStore for queue persistence
      this.store = new window.jvbStore({
         name: 'favourites',
         endpoint: 'favourites',
         useIndexedDB: true,
         TTL: Infinity,
         showLoading: false
      });
      this.store = window.jvbStore.register('votes',
         {
            endpoint: 'votes',
            useIndexedDB: true,
            TTL: 6 * 60 * 1000,
            showLoading: false
         });
   }
   handleVote(button) {
      if (!jvbSettings.currentUser) {
      if (!window.auth.getUser()) {
         window.location.href = jvbSettings.redirect + '&action=register&type=vote';
         return;
      }
@@ -42,7 +42,7 @@
   }
   isFavourited(content, id){
      if(!jvbSettings.currentUser){
      if(!window.auth.getUser()){
         return false;
      }
      let item = this.store.getItem(id);
@@ -50,7 +50,7 @@
   }
}
window.jvbVotes = false;
if (jvbSettings.currentUser !== '') {
if (window.auth.getUser() !== '') {
   window.jvbVotes = new FrontendFavourites();
}