Last active
May 16, 2019 14:50
-
-
Save brunohq/52d73063540ffbf79a50d71601467870 to your computer and use it in GitHub Desktop.
Bookmarklet to trigger a Zapier Webhook from any web age. The title and url of the current webpage go as parameters.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function() | |
{ | |
var iframe = document.createElement('iframe'); | |
iframe.name = 'response'; | |
iframe.style.visibility = 'hidden'; | |
document.body.appendChild(iframe); | |
var form = document.createElement('form'); | |
form.style.visibility = 'hidden'; | |
form.method = 'post'; | |
form.action = '<your_zapier_webhook_url>'; | |
form.target = 'response'; | |
input_url = document.createElement('input'); | |
input_url.name = 'url'; | |
input_url.value = window.location.href; | |
form.appendChild(input_url); | |
input_title = document.createElement('input'); | |
input_title.name = 'title'; | |
input_title.value = document.title; | |
form.appendChild(input_title); | |
document.body.appendChild(form); | |
form.submit();} | |
)(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment