Skip to content

Instantly share code, notes, and snippets.

@mvark
Created May 10, 2020 10:49
Show Gist options
  • Select an option

  • Save mvark/1d5296c880a57cc3cd4ef9f6ce5a5b2d to your computer and use it in GitHub Desktop.

Select an option

Save mvark/1d5296c880a57cc3cd4ef9f6ce5a5b2d to your computer and use it in GitHub Desktop.
IFTTT_Webhook demo
<html>
<head>
<title>Add</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<script src=https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js></script>
</head>
<body>
Input item details:
<input type="text" id="movie" placeholder="Movie:" size="50"><br><br>
<input type="text" id="description" placeholder="Description:" size="50"><br><br>
<input type="text" id="rating" placeholder="Rating:" size="50"><br><br>
<input type="button" id="add" value="Add"><br><br><br>
<iframe id="ifr" width="640" height="25" frameborder="1" marginheight="0" marginwidth="0">Submitting…</iframe><br>
<script>
$(document).ready(function(){
$("#add").click(function(){
$("#add").css('background-color','red');
var url = "https://maker.ifttt.com/trigger/add/with/key/xyz?value1=" + $("#movie").val() + "&value2=" + $("#description").val() + "&value3="+ $("#rating").val();
$("#ifr").attr('src', url );
$("#push").css('background-color','green');
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment