-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
184 lines (184 loc) · 14.8 KB
/
index.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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<!doctype html>
<html lang="en" class="platform-ios">
<head>
<meta charset="utf-8">
<style>
a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,p,pre,q,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;outline:0;font-size:100%;font:inherit;vertical-align:baseline}button,input,textarea{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}body,html{font-weight:400;font-family:PFDinDisplayPro-Regular,sans-serif,sans-serif;-webkit-font-smoothing:antialiased;font-size:17px;line-height:1.4;height:100%;color:#fff}body.platform-ios,html.platform-ios{font-size:16px}body{background-color:#333;padding:0 .75rem .7rem}em{font-style:italic}strong{font-weight:400;font-family:PFDinDisplayPro-Medium,sans-serif,sans-serif;color:#ff4700}.platform-android strong{font-family:sans-serif,sans-serif;font-weight:700;letter-spacing:.025em}a{color:#858585}a:hover{color:inherit}h1,h2,h3,h4{text-transform:uppercase;font-weight:400;font-family:PFDinDisplayPro-Medium,sans-serif,sans-serif;text-transform:uppercase;position:relative;top:.05rem;line-height:.9}.platform-android h1,.platform-android h2,.platform-android h3,.platform-android h4{font-family:sans-serif,sans-serif;font-weight:700;letter-spacing:.025em}h1{font-size:2rem;line-height:2.8rem}h2{font-size:1.8rem;line-height:2.8rem}h3{font-size:1.5rem;line-height:2.8rem}h4{font-size:1.2rem;line-height:1.4rem}h5{font-size:1rem;line-height:1.4rem}h6{font-size:.8rem;line-height:1.4rem}input{font-family:inherit;font-size:inherit;line-height:inherit}label{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;align-items:center;padding:.7rem .75rem}label .input{white-space:nowrap;display:-webkit-box;display:-webkit-flex;display:flex;max-width:50%;margin-left:.75rem}label.invalid .input:after{content:"!";display:inline-block;color:#fff;background:#ff4700;border-radius:.55rem;width:1.1rem;text-align:center;height:1.1rem;font-size:.825rem;vertical-align:middle;line-height:1.1rem;box-shadow:0 .1rem .1rem #2f2f2f;font-weight:400;font-family:PFDinDisplayPro-Medium,sans-serif,sans-serif;-webkit-box-flex:0;-webkit-flex:0 0 1.1rem;flex:0 0 1.1rem;margin-left:.3rem}.platform-android label.invalid .input:after{font-family:sans-serif,sans-serif;font-weight:700;letter-spacing:.025em}.hide{display:none!important}.tap-highlight{-webkit-tap-highlight-color:rgba(255,255,255,.1);border-radius:.25rem}.tap-highlight:active{background-color:rgba(255,255,255,.1)}.component{padding-top:.7rem}.component.disabled{pointer-events:none}.component.disabled>*{opacity:.25}.section{background:#484848;border-radius:.25rem;box-shadow:#2f2f2f 0 .15rem .25rem}.section>.component{padding-bottom:.7rem;padding-right:.75rem;padding-left:.75rem;position:relative;margin-top:1rem}.section>.component:not(.hide)~.component{margin-top:0}.section>.component:first-child:after{display:none}.section>.component:after{content:"";background:#666;display:block;position:absolute;top:0;left:.375rem;right:.375rem;height:1px;pointer-events:none}.section>.component:not(.hide):after{display:none}.section>.component:not(.hide)~.component:not(.hide):after{display:block}.section>.component-heading:first-child{background:#414141;border-radius:.25rem .25rem 0 0}.section>.component-heading:first-child:after,.section>.component-heading:first-child~.component:not(.hide):after{display:none}.section>.component-heading:first-child~.component:not(.hide)~.component:not(.hide):after{display:block}.description{padding:0 .75rem .7rem;font-size:.9rem;line-height:1.4rem;color:#a4a4a4;text-align:left}.inputs{display:block;width:100%;border-collapse:collapse}.button,button{font-weight:400;font-family:PFDinDisplayPro-Medium,sans-serif,sans-serif;font-size:1rem;line-height:1.4rem;text-transform:uppercase;background-color:#767676;border-radius:.25rem;border:none;display:inline-block;color:#fff;min-width:12rem;text-align:center;margin:0 auto .7rem;padding:.6rem;-webkit-tap-highlight-color:#858585}.platform-android .button,.platform-android button{font-family:sans-serif,sans-serif;font-weight:700;letter-spacing:.025em}.button:active,button:active{background-color:#858585}.platform-ios .button,.platform-ios button{padding:.5rem}.button.primary,.button[type=submit],button.primary,button[type=submit]{background-color:#ff4700;-webkit-tap-highlight-color:red}.button.primary:active,.button[type=submit]:active,button.primary:active,button[type=submit]:active{background-color:red}a.button{text-decoration:none;color:#fff}
.section .component-toggle { padding: 0; }
.component-toggle input { display: none; }
.component-toggle .graphic { display: inline-block; position: relative; }
.component-toggle .graphic .slide { display: block; border-radius: 1.05rem; height: 1.05rem; width: 2.2652rem; background: #2f2f2f; -webkit-transition: background-color 150ms linear; transition: background-color 150ms linear; }
.component-toggle .graphic .marker { background: #ececec; width: 1.4rem; height: 1.4rem; border-radius: 1.4rem; position: absolute; left: 0; display: block; top: -0.175rem; -webkit-transition: -webkit-transform 150ms linear; transition: -webkit-transform 150ms linear; transition: transform 150ms linear; transition: transform 150ms linear, -webkit-transform 150ms linear; box-shadow: 0 0.1rem 0.1rem #2f2f2f; }
.component-toggle input:checked + .graphic .slide { background: #993d19; }
.component-toggle input:checked + .graphic .marker { background: #ff4700; -webkit-transform: translateX(0.8652rem); transform: translateX(0.8652rem); }
.section .component-select { padding: 0; }
.component-select label { position: relative; }
.component-select .value { position: relative; padding-right: 1.1rem; display: block; }
.component-select .value:after { content: ""; position: absolute; right: 0; top: 50%; margin-top: -0.1rem; height: 0; width: 0; border-left: 0.425rem solid transparent; border-right: 0.425rem solid transparent; border-top: 0.425rem solid #ff4700; }
.component-select select { opacity: 0; position: absolute; display: block; left: 0; right: 0; top: 0; bottom: 0; background: #000; width: 100%; border: none; margin: 0; padding: 0; }
.component-submit { text-align: center; }
</style>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
</head>
<body>
<form action="javascript:void(save());" id="main-form" class="inputs">
<div class="section">
<div class="component component-heading">
<h4>Wikipedia Settings</h4>
</div>
<div class="component component-toggle">
<label class="tap-highlight">
<span class="label">Confirm query</span>
<span class="input">
<input type="checkbox" id="cq">
<span class="graphic">
<span class="slide"></span>
<span class="marker"></span>
</span>
</span>
</label>
</div>
<div class="component component-select">
<label class="tap-highlight">
<span class="label">Language</span>
<span class="value" id="sv">Loading...</span>
<select id="CC" onchange="$('sv').innerHTML = this.options[this.selectedIndex].innerHTML;">
<option value="ar">العربي</option>
<option value="az">Azərbaycanca</option>
<option value="bg">Български</option>
<option value="nan">Bân-lâm-gú / Hō-ló-oē</option>
<option value="be">Беларуская (Акадэмічная)</option>
<option value="ca">Català</option>
<option value="cs">Čeština</option>
<option value="da">Dansk</option>
<option value="de">Deutsch</option>
<option value="et">Eesti</option>
<option value="el">Ελληνικά</option>
<option value="en">English</option>
<option value="es">Español</option>
<option value="eo">Esperanto</option>
<option value="eu">Euskara</option>
<option value="fa">فارسی</option>
<option value="fr">Français</option>
<option value="gl">Galego</option>
<option value="ko">한국어</option>
<option value="hy">Հայերեն</option>
<option value="hi">हिन्दी</option>
<option value="hr">Hrvatski</option>
<option value="id">Bahasa Indonesia</option>
<option value="it">Italiano</option>
<option value="he">עברית</option>
<option value="ka">ქართული</option>
<option value="la">Latina</option>
<option value="lt">Lietuvių</option>
<option value="hu">Magyar</option>
<option value="ms">Bahasa Melayu</option>
<option value="min">Bahaso Minangkabau</option>
<option value="nl">Nederlands</option>
<option value="ja">日本語</option>
<option value="nb">Norsk (Bokmål)</option>
<option value="nn">Norsk (Nynorsk)</option>
<option value="ce">Нохчийн</option>
<option value="uz">Oʻzbekcha / Ўзбекча</option>
<option value="pl">Polski</option>
<option value="pt">Português</option>
<option value="kk">Қазақша / Qazaqşa / قازاقشا</option>
<option value="ro">Română</option>
<option value="ru">Русский</option>
<option value="en">Simple English</option>
<option value="ceb">Sinugboanong Binisaya</option>
<option value="sk">Slovenčina</option>
<option value="sl">Slovenščina</option>
<option value="sr">Српски / Srpski</option>
<option value="sh">Srpskohrvatski / Српскохрватски</option>
<option value="fi">Suomi</option>
<option value="sv">Svenska</option>
<option value="th">ภาษาไทย</option>
<option value="tr">Türkçe</option>
<option value="uk">Українська</option>
<option value="ur">اردو</option>
<option value="vi">Tiếng Việt</option>
<option value="vo">Volapük</option>
<option value="war">Winaray</option>
<option value="zh">中文</option>
</select>
</label>
</div>
<div class="component component-toggle">
<label class="tap-highlight">
<span class="label">Large font size</span>
<span class="input">
<input type="checkbox" id="LargeFontSize">
<span class="graphic">
<span class="slide"></span>
<span class="marker"></span>
</span>
</span>
</label>
</div>
<div class="component component-toggle">
<label class="tap-highlight">
<span class="label">Metric Units</span>
<span class="input">
<input type="checkbox" id="units">
<span class="graphic">
<span class="slide"></span>
<span class="marker"></span>
</span>
</span>
</label>
</div>
<div class="component component-toggle">
<label class="tap-highlight">
<span class="label">Vibrate on success</span>
<span class="input">
<input type="checkbox" id="vibe">
<span class="graphic">
<span class="slide"></span>
<span class="marker"></span>
</span>
</span>
</label>
</div>
</div>
<div class="component component-submit">
<button type="submit">Save</button>
</div>
</form>
<script>
try {
var settings = JSON.parse(decodeURIComponent(location.hash.substr(1)));
console.log(settings);
} catch (e) {
var settings = {
CC: 'en',
cq: true,
vibe: true,
units: true,
LargeFontSize: false
};
console.warn('using defaults', e);
}
for (var item in settings)
$(item)[item == 'CC' ? 'value' : 'checked'] = settings[item];
$('CC').onchange();
function $(id) {
return document.getElementById(id);
}
function save() {
location = ((function (vars, pair) {
for (var i = 0; i < vars.length; i++)
if ((pair = vars[i].split('='))[0] === 'return_to')
return decodeURIComponent(pair[1]);
return 'pebblejs://close#';
}(location.search.substring(1).split('&'))) + encodeURIComponent(JSON.stringify({
CC: $('CC').value,
cq: $('cq').checked,
vibe: $('vibe').checked,
units: $('units').checked,
LargeFontSize: $('LargeFontSize').checked
})))
}
</script>
</body>
</html>