Thursday, 12 November 2026

#611 Go ahead, and vote!

 


These days, with social media, you can vote even when there is no election.

Indicate your thumbs up or down. 

When elected, do the job you were elected to do. 

Yea or Nay? Remember to put this into the context of the Trucker Convoy - worst crisis in Ottawa Policing in the history of the City of Ottawa. Did you vote for this guy?

https://unpublished.ca/opinion/police-services-board-why-does-it-exist-why-would-a-councillor-resign-from-the-ops

Agree with me? 
or
Disagree with me?

                    AGREE                 DISAGREE

         


Results

20261114       agree 225 disagree 338




Technical Notes

Agree? or Disagree?

or

A few common issues with a client-side Firebase + HTML/JS setup on Blogger.

Quick diagnosis steps (do these first) 
Open the page in Chrome/Firefox. Press F12 → Console tab. 
Click a vote button and look for errors.

Permission denied → Firebase security rules are blocking the write.

Firebase is not defined / failed to load script → SDK or config problem.

Nothing happens and no error → the click handler or path is wrong.

Also check the Network tab for failed requests to firebaseio.com or firestore.googleapis.com. 
Most common fixes

1. Security rules (the #1 cause) 
In the Firebase console → Realtime Database (or Firestore) → Rules, temporary test rules that allow everything: json { "rules": { ".read": true, ".write": true } } 
(For Firestore it’s the equivalent allow read, write: if true;. 
Tighten this later so people can’t spam or wipe the data.) 
 2. Correct Firebase initialization 
You need both the app and database SDKs, plus a valid firebaseConfig that includes databaseURL. 
 3. Safe increment + live listener Simple set() or update() races and can lose votes. 
Use a transaction (or increment()) and an on('value') listener so the displayed count updates for everyone. 
 
Minimal working example (Realtime Database) Paste this into the post in HTML view (replace the config with yours): html
Agree? or Disagree?

No comments:

Post a Comment