mirror of
https://github.com/privacyguides/privacyguides.org.git
synced 2025-08-18 19:18:25 -04:00
Enable feedback widget (#1146)
This commit is contained in:
parent
c1a4eec75e
commit
e4654a71eb
5 changed files with 30 additions and 0 deletions
13
docs/javascripts/feedback.js
Normal file
13
docs/javascripts/feedback.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
var feedback = document.forms.feedback
|
||||
feedback.removeAttribute("hidden");
|
||||
feedback.addEventListener("submit", function(ev) {
|
||||
ev.preventDefault()
|
||||
|
||||
/* Retrieve page and feedback value */
|
||||
var page = document.location.pathname
|
||||
var data = ev.submitter.getAttribute("data-md-value")
|
||||
|
||||
/* Send feedback value */
|
||||
console.log(page, data)
|
||||
plausible(data)
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue