mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-12 19:12:18 +00:00
tweak kudos javascript
This commit is contained in:
parent
7c378779d3
commit
df68d87e0b
2 changed files with 7 additions and 7 deletions
|
@ -2,9 +2,9 @@
|
|||
|
||||
window.onload = function() {
|
||||
// get the button and text elements
|
||||
var kudosButton = document.querySelector('.kudos-button');
|
||||
var kudosText = document.querySelector('.kudos-text');
|
||||
var emojiSpan = kudosButton.querySelector('.emoji');
|
||||
const kudosButton = document.querySelector('.kudos-button');
|
||||
const kudosText = document.querySelector('.kudos-text');
|
||||
const emojiSpan = kudosButton.querySelector('.emoji');
|
||||
|
||||
kudosButton.addEventListener('click', function(event) {
|
||||
// send the event to Cabin
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: "Kudos With Cabin"
|
||||
date: 2024-06-24
|
||||
# lastmod: 2024-06-24
|
||||
lastmod: "2024-06-26T02:13:13Z"
|
||||
description: "Using Cabin's event tracking to add a simple post upvote widget to my Hugo site."
|
||||
featured: false
|
||||
toc: true
|
||||
|
@ -127,9 +127,9 @@ I want the button to do a little bit more than *just* send the event to Cabin so
|
|||
|
||||
window.onload = function() {
|
||||
// get the button and text elements
|
||||
var kudosButton = document.querySelector('.kudos-button');
|
||||
var kudosText = document.querySelector('.kudos-text');
|
||||
var emojiSpan = kudosButton.querySelector('.emoji');
|
||||
const kudosButton = document.querySelector('.kudos-button');
|
||||
const kudosText = document.querySelector('.kudos-text');
|
||||
const emojiSpan = kudosButton.querySelector('.emoji');
|
||||
|
||||
kudosButton.addEventListener('click', function(event) {
|
||||
// send the event to Cabin
|
||||
|
|
Loading…
Reference in a new issue