-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
149 lines (140 loc) · 7.49 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>WhatsAdd</title>
<meta name="description" content="Add a stranger's phone number to your WhatsApp in three step!">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#0fa186">
<meta name="msapplication-TileColor" content="#ffc40d">
<meta name="application-name" content="WhatsAdd">
<meta name="apple-mobile-web-app-title" content="WhatsAdd">
<link rel="manifest" href="manifest.json">
<link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
<link rel="mask-icon" href="favicon/safari-pinned-tab.svg" color="#0fa186">
<link rel="stylesheet" href="colors.css">
<link rel="stylesheet" href="tocas.css">
</head>
<body>
<div class="ts top attached horizontally scrollable large basic link menu">
<div class="ts very narrow container">
<div class="right menu">
<a class="item" href="javascript:ts('#about-dialog').modal('show');">About</a>
<a class="item" href="javascript:ts('#help-dialog').modal('show');">Help</a>
<a class="item" href="https://github.com/JasonHK/WhatsAdd" target="_blank" rel="noopener">GitHub</a>
</div>
</div>
</div>
<div class="ts bottom attached large heading padded slate">
<div class="ts very narrow container">
<span class="header">WhatsAdd</span>
<span class="description">Add a stranger's phone number to your WhatsApp in three step!</span>
</div>
</div>
<div class="ts very narrow container">
<main>
<div class="ts borderless segment">
<form id="whatsadd-form" class="ts form" action="javascript:formSubmit();" method="GET" autocomplete="off">
<div class="fields">
<div class="five wide required field">
<label for="country-code">Country code</label>
<div class="ts labeled input">
<div class="ts basic label">+</div>
<input id="country-code" tabindex="0" type="tel" maxlength="3" pattern="[0-9]+" placeholder="852" required autofocus>
</div>
</div>
<div class="eleven wide required field">
<label for="phone-number">Phone number</label>
<input id="phone-number" tabindex="0" type="tel" maxlength="15" pattern="[0-9]+" placeholder="68977740" required>
</div>
</div>
<div class="fields">
<button id="submit-button" tabindex="0" type="submit" class="ts primary right floated labeled icon button">
<i class="whatsapp icon"></i>Add to WhatsApp
</button>
</div>
</form>
</div>
</main>
<div class="ts center aligned vertically fitted basic segment">
Made with <span class="red"> ❤</span> by <a href="https://github.jasonhk.net/" target="_blank" rel="noopener">Jason Kwok</a>.
Powered by <a href="https://tocas-ui.com/" target="_blank" rel="noopener">Tocas UI</a>.
Source codes are licensed under <a href="https://github.com/JasonHK/WhatsAdd/blob/master/LICENSE" target="_blank" rel="noopener">GPL-3.0</a>.
</div>
</div>
<div class="ts modals dimmer">
<dialog id="about-dialog" class="ts closable mini modal">
<div class="header">
About WhatsAdd
</div>
<div class="content">
<p>
Developed by <a href="https://github.jasonhk.net/" target="_blank" rel="noopener">Jason Kwok</a> in 2018 using <a href="https://code.visualstudio.com/" target="_blank" rel="noopener">Visual Studio Code</a>.
You can become a contributor by visiting the <a href="https://github.com/JasonHK/WhatsAdd" target="_blank" rel="noopener">WhatsAdd Github project page</a>.
</p>
</div>
<div class="actions">
<button class="ts deny button">
Close
</button>
</div>
</dialog>
</div>
<div class="ts modals dimmer">
<dialog id="help-dialog" class="ts closable large modal">
<div class="header">
How to use?
</div>
<div class="content">
<div id="help-tab" class="ts top attached pointing secondary menu">
<a data-tab="android-tab" class="active item">Android</a>
<a data-tab="ios-tab" class="item">iOS</a>
<a data-tab="windows-tab" class="item">Windows</a>
<a data-tab="macos-tab" class="item">maacOS</a>
</div>
<div data-tab="android-tab" class="ts active bottom attached tab segment">
WIP
</div>
<div data-tab="ios-tab" class="ts bottom attached tab segment">
WIP
</div>
<div data-tab="windows-tab" class="ts bottom attached tab segment">
WIP
</div>
<div data-tab="macos-tab" class="ts bottom attached tab segment">
WIP
</div>
<div data-tab="null-tab" class="ts bottom attached tab segment">
</div>
</div>
<div class="actions">
<button class="ts deny button">
Close
</button>
</div>
</dialog>
</div>
<script src="whatsadd.js" type="application/javascript"></script>
<script type="application/javascript">
function formSubmit() {
var whatsaddForm = document.getElementById("whatsadd-form");
var countryCode = whatsaddForm.querySelector("#country-code");
var phoneNumber = whatsaddForm.querySelector("#phone-number");
whatsadd(countryCode.value + phoneNumber.value, true);
countryCode.value = "";
phoneNumber.value = "";
}
</script>
<script src="tocas.js" type="application/javascript"></script>
<script type="application/javascript">
ts("#help-tab .item").tab();
</script>
<script type="application/javascript">
if (navigator.serviceWorker) {
navigator.serviceWorker.register('serviceworker.js', {scope: '/'})
}
</script>
</body>
</html>