Added missing callApi function
This commit is contained in:
parent
be45fed8bb
commit
97f6ded68e
1 changed files with 37 additions and 31 deletions
|
@ -35,7 +35,7 @@
|
|||
|
||||
<body>
|
||||
<header>
|
||||
<h1>Free Telec <small>v0.2</small></h1>
|
||||
<h1>Free Telec <small>v0.2.1</small></h1>
|
||||
</header>
|
||||
``
|
||||
<section>
|
||||
|
@ -164,10 +164,16 @@
|
|||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||
<script src="./conf.js" text="text/JavaScript"></script>
|
||||
<script type="text/JavaScript">
|
||||
let callApi = function(code)
|
||||
{
|
||||
$.get("http://hd1.freebox.fr/pub/remote_control?code="+codeTelec+"&key="+code);
|
||||
};
|
||||
|
||||
$(function() {
|
||||
$('.btn').on('click',function(){
|
||||
callApi($(this).data('key'));
|
||||
});
|
||||
|
||||
$('body').on('keypress', function(e){
|
||||
const codes = {
|
||||
13: 'ok',
|
||||
|
|
Loading…
Reference in a new issue