forked from drayde/IR_Wifi_Bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindexHtml.h
85 lines (82 loc) · 11.2 KB
/
indexHtml.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// hard coded buttons for LG TV
// adapt for your device
const char* indexHtml =
R"XX( <html> )XX" "\n"
R"XX( <head> )XX" "\n"
R"XX( <meta charset="UTF-8"/> )XX" "\n"
R"XX( <title>Remote</title> )XX" "\n"
R"XX( <style> )XX" "\n"
R"XX( .nl { )XX" "\n"
R"XX( clear: both; )XX" "\n"
R"XX( } )XX" "\n"
R"XX( .ln { )XX" "\n"
R"XX( width: 33.33%; )XX" "\n"
R"XX( height: 16.6%; )XX" "\n"
R"XX( position: relative; )XX" "\n"
R"XX( float: left; )XX" "\n"
R"XX( font-size: 10vh; )XX" "\n"
R"XX( } )XX" "\n"
R"XX( .ln2 { )XX" "\n"
R"XX( width: 33.33%; )XX" "\n"
R"XX( height: 16.6%; )XX" "\n"
R"XX( position: relative; )XX" "\n"
R"XX( float: left; )XX" "\n"
R"XX( font-size: 7vh; )XX" "\n"
R"XX( } )XX" "\n"
R"XX( </style> )XX" "\n"
R"XX( </head> )XX" "\n"
R"XX( <body> )XX" "\n"
R"XX( <script type="text/javascript"> )XX" "\n"
R"XX( this.carrier = "38000"; )XX" "\n"
R"XX( this.rmtbl = [ )XX" "\n"
R"XX( ["power","9022+4498+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+572+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+1690+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+39702+9022+2262+572+1"], )XX" "\n"
R"XX( ["ch+","9022+4498+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+572+572+572+572+572+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+39702+9022+2262+572+1"], )XX" "\n"
R"XX( ["vol+","9022+4498+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+572+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+39702+9022+2262+572+1"], )XX" "\n"
R"XX( ["mute","9022+4498+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+39702+9022+2262+572+1"], )XX" "\n"
R"XX( ["ch-","9022+4498+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+572+572+572+572+572+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+39702+9022+2262+572+1"], )XX" "\n"
R"XX( ["vol-","9022+4498+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+572+572+572+572+572+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+39702+9022+2262+572+1"], )XX" "\n"
R"XX( ["1","9022+4498+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+572+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+1690+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+39702+9022+2262+572+1"], )XX" "\n"
R"XX( ["2","9022+4498+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+572+572+1690+572+572+572+572+572+1690+572+572+572+572+572+572+572+1690+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+39702+9022+2262+572+1"], )XX" "\n"
R"XX( ["3","9022+4498+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+39702+9022+2262+572+1"], )XX" "\n"
R"XX( ["4","9022+4498+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+572+572+572+572+1690+572+572+572+1690+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+572+572+1690+572+1690+572+1690+572+39702+9022+2262+572+1"], )XX" "\n"
R"XX( ["5","9022+4498+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+572+572+1690+572+572+572+1690+572+572+572+572+572+572+572+572+572+1690+572+572+572+1690+572+572+572+1690+572+1690+572+1690+572+39702+9022+2262+572+1"], )XX" "\n"
R"XX( ["6","9022+4498+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+572+572+1690+572+1690+572+572+572+1690+572+572+572+572+572+572+572+1690+572+572+572+572+572+1690+572+572+572+1690+572+1690+572+1690+572+39702+9022+2262+572+1"], )XX" "\n"
R"XX( ["7","9022+4498+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+572+572+1690+572+572+572+1690+572+1690+572+1690+572+39702+9022+2262+572+1"], )XX" "\n"
R"XX( ["8","9022+4498+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+572+572+572+572+572+572+1690+572+1690+572+572+572+572+572+572+572+1690+572+1690+572+1690+572+572+572+572+572+1690+572+1690+572+1690+572+39702+9022+2262+572+1"], )XX" "\n"
R"XX( ["9","9022+4498+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+572+572+572+572+1690+572+1690+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+572+572+1690+572+1690+572+1690+572+39702+9022+2262+572+1"], )XX" "\n"
R"XX( ["input","9022+4498+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+1690+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+572+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+39702+9022+2262+572+1"], )XX" "\n"
R"XX( ["0","9022+4498+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+572+572+572+572+572+572+572+572+1690+572+572+572+572+572+572+572+1690+572+1690+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+39702+9022+2262+572+1"], )XX" "\n"
R"XX( ["info","9022+4498+572+572+572+572+572+1690+572+572+572+572+572+572+572+572+572+572+572+1690+572+1690+572+572+572+1690+572+1690+572+1690+572+1690+572+1690+572+572+572+1690+572+572+572+1690+572+572+572+1690+572+572+572+1690+572+1690+572+572+572+1690+572+572+572+1690+572+572+572+1690+572+572+572+39702+9022+2262+572+1"] )XX" "\n"
R"XX( ]; )XX" "\n"
R"XX( this.remote = function(t) { )XX" "\n"
R"XX( var url = "/?carrier="+this.carrier+"&code="+this.rmtbl[t][1]; )XX" "\n"
R"XX( url += "&time="+new Date().getTime(); )XX" "\n"
R"XX( window.fetch(url); )XX" "\n"
R"XX( }; )XX" "\n"
R"XX( this.create = function() { )XX" "\n"
R"XX( var tmp = ""; )XX" "\n"
R"XX( var nlb = "<div class='nl'>"; )XX" "\n"
R"XX( var nle = "</div>"; )XX" "\n"
R"XX( var lnb1 = "<button class='ln' onclick='remote( "; )XX" "\n"
R"XX( var lnb2 = "<button class='ln2' onclick='remote( "; )XX" "\n"
R"XX( var lnm = " )'>"; )XX" "\n"
R"XX( var lne = "</button>"; )XX" "\n"
R"XX( for (var i = 0; i < this.rmtbl.length/3; i ++) { )XX" "\n"
R"XX( tmp += nlb; )XX" "\n"
R"XX( for (var j = 0; j < 3 && i*3+j < this.rmtbl.length; j ++) { )XX" "\n"
R"XX( var text = this.rmtbl[i*3+j][0]; )XX" "\n"
R"XX( tmp += text.length > 2 ? lnb2 : lnb1; )XX" "\n"
R"XX( tmp += i*3+j; )XX" "\n"
R"XX( tmp += lnm; )XX" "\n"
R"XX( tmp += text; )XX" "\n"
R"XX( tmp += lne; )XX" "\n"
R"XX( } )XX" "\n"
R"XX( tmp += nle; )XX" "\n"
R"XX( } )XX" "\n"
R"XX( return tmp; )XX" "\n"
R"XX( }; )XX" "\n"
R"XX( document.write(this.create()); )XX" "\n"
R"XX( </script> )XX" "\n"
R"XX( </body> )XX" "\n"
R"XX( </html> )XX" "\n"
;