-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshepot.html
159 lines (115 loc) · 4.42 KB
/
shepot.html
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/css/materialize.min.css">
<!-- Compiled and minified JavaScript -->
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<div class="container">
<div class="center-align"><h2>Шепот</h2></div>
<div class="card-panel center-align">
<div class="col s12" style="padding-top: 20px;">
<p><b>Уведомления через</b></p>
<div class="switch">
<label>
Окно программы
<input id="units" type="checkbox">
<span class="lever"></span>
Timeline
</label>
</div>
</div>
<div class="col s12" style="padding-top: 20px;">
<p><b>Вибрация</b></p>
<div class="switch">
<label>
Длинная
<input id="vibe" type="checkbox">
<span class="lever"></span>
Короткая
</label>
</div>
</div>
<div class="col s12" style="padding-top: 20px;">
<p><b>"завтра" без указания времени</b></p>
<p class="range-field">
<input type="range" id="tomorow" min="5" max="23" />
</p>
</div>
<div class="col s12" style="padding-top: 20px;">
<p><b>Время для "утром"</b></p>
<p class="range-field">
<input type="range" id="utro" min="5" max="23" />
</p>
</div>
<div class="col s12" style="padding-top: 20px;">
<p><b>Время для "днем"</b></p>
<p class="range-field">
<input type="range" id="obed" min="6" max="23" />
</p>
</div>
<div class="col s12" style="padding-top: 20px;">
<p><b>Время для "вечером"</b></p>
<p class="range-field">
<input type="range" id="vecher" min="6" max="23" />
</p>
</div>
<div class="col s12" style="padding-top: 20px;">
<p><b>Время для "напомнить позже" (минуты)</b></p>
<input id="snooze" type="number" class="validate">
<label for="snooze"></label>
</div>
<div class="center-align" style="padding-top: 20px;"><button onclick="save();" class="btn"><i class="material-icons left">save</i>Сохранить</button></div>
</div>
<div class="col s12 center-align">
<p style="margin-top: 0px;">
</p>
<p>
<iframe frameborder="0" allowtransparency="true" scrolling="no" src="https://money.yandex.ru/quickpay/button-widget?account=4100187212636&quickpay=small&any-card-payment-type=on&button-text=04&button-size=m&button-color=orange&targets=%D0%9D%D0%B0+%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%83+InstAPP&default-sum=50&successURL=" width="223" height="36"></iframe>
</p>
</div>
</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/js/materialize.min.js"></script>
<script>
console.log(window.location.hash.substring(1));
var data=JSON.parse(decodeURIComponent(window.location.hash.substring(1)));
if (data.note_type=='timeline'){
$('#units').prop('checked', true);
};
if (data.vibe_type=='short'){
$('#vibe').prop('checked', true);
};
$('#tomorow').val(data.tomorow);
$('#utro').val(data.utro);
$('#obed').val(data.obed);
$('#vecher').val(data.vecher);
$('#snooze').val(data.snooze);
Materialize.updateTextFields();
function save(){
var pins='main';
if ($('#units').is(":checked")){pins='timeline';}
var vibe='long';
if ($('#vibe').is(":checked")){vibe='short';}
options={};
options.note_type=pins;
options.vibe_type=vibe;
options.tomorow=$('#tomorow').val();
options.utro=$('#utro').val();
options.obed=$('#obed').val();
options.vecher=$('#vecher').val();
options.snooze=$('#snooze').val();
return_to='https://cloudpebble.net/ide/emulator/config?';
return_to='pebblejs://close#'
document.location = return_to + encodeURIComponent(JSON.stringify(options));
};
</script>
</body>
</html>