Skip to content

Instantly share code, notes, and snippets.

@joelbyler
Created January 18, 2016 01:39
Show Gist options
  • Save joelbyler/810fd77cb267e689918d to your computer and use it in GitHub Desktop.
Save joelbyler/810fd77cb267e689918d to your computer and use it in GitHub Desktop.
<html>
<head>
<title>Dad's Status</title>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha256-KXn5puMvxCw+dAYznun+drMdG1IFl3agK0p/pqT9KAo= sha512-2e8qq0ETcfWRI4HJBzQiA3UoyFk6tbNyG+qSaIBZLyW9Xf3sWZHN/lxe9fTh1U45DpPf07yj94KsUHHWe4Yk1A==" crossorigin="anonymous"></script>
</head>
<body>
<br/>
<div class="container">
<input type="button" class="btn btn-success" onclick="i_am_free();" value="I am free"/>
<input type="button" class="btn btn-danger" onclick="do_not_disturb();" value="I am busy"/>
</div>
<script>
var key = "get your own key";
function do_not_disturb(){
$.get("https://maker.ifttt.com/trigger/do_not_disturb/with/key/" + key, function() {
alert( "success" );
});
}
function i_am_free(){
$.get("https://maker.ifttt.com/trigger/i_am_free/with/key/" + key, function() {
alert( "success" );
});
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment