-
Notifications
You must be signed in to change notification settings - Fork 1
/
indexHtml.h
95 lines (93 loc) · 12.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
85
86
87
88
89
90
91
92
93
94
95
// 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( <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> )XX" "\n"
R"XX( <title>Remote</title> )XX" "\n"
R"XX( <style> )XX" "\n"
R"XX( table { )XX" "\n"
R"XX( width: 100%; )XX" "\n"
R"XX( height: 100%; )XX" "\n"
R"XX( table-layout: fixed; )XX" "\n"
R"XX( } )XX" "\n"
R"XX( td { )XX" "\n"
R"XX( background: #eee; )XX" "\n"
R"XX( font-family: sans-serif; )XX" "\n"
R"XX( text-align: center; )XX" "\n"
R"XX( vertical-align: middle; )XX" "\n"
R"XX( height: 16%; )XX" "\n"
R"XX( overflow: hidden; )XX" "\n"
R"XX( user-select: none; )XX" "\n"
R"XX( } )XX" "\n"
R"XX( td:active { )XX" "\n"
R"XX( background: #bbb; )XX" "\n"
R"XX( } )XX" "\n"
R"XX( .ln { )XX" "\n"
R"XX( font-size: 10vh; )XX" "\n"
R"XX( } )XX" "\n"
R"XX( .ln2 { )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( ["powr","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 = "<table>"; )XX" "\n"
R"XX( tmp += "<col width=\"33%\" />"; )XX" "\n"
R"XX( tmp += "<col width=\"33%\" />"; )XX" "\n"
R"XX( tmp += "<col width=\"33%\" />"; )XX" "\n"
R"XX( var nlb = "<tr>"; )XX" "\n"
R"XX( var nle = "</tr>"; )XX" "\n"
R"XX( var lnb1 = "<td class='ln' onclick='remote( "; )XX" "\n"
R"XX( var lnb2 = "<td class='ln2' onclick='remote( "; )XX" "\n"
R"XX( var lnm = " )'>"; )XX" "\n"
R"XX( var lne = "</td>"; )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( tmp += "</table>" )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"
;