-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
137 lines (121 loc) · 2.91 KB
/
index.html
File metadata and controls
137 lines (121 loc) · 2.91 KB
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
<html><head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<style>
@import url('https://fonts.googleapis.com/css?family=Roboto');
</style>
<style type="text/css">
.hidden{
display: none !important;
}
html,body{
overflow: hidden;
font-family: 'Roboto', sans-serif;
background-color: #E5822D;
color: white;
}
svg{
fill:white;
}
svg:hover{
fill:blue;
}
*>svg{
display: flex;
align-items: center;
}
.btn {
position: relative;
display: block;
margin: 30px auto;
padding: 0;
overflow: hidden;
border-width: 0;
outline: none;
border-radius: 2px;
box-shadow: 0 1px 4px rgba(0, 0, 0, .6);
background-color: #2ecc71;
color: #ecf0f1;
transition: background-color .3s;
}
.btn:disabled{
background-color: gray;
}
.btn:not([disabled]):hover, .btn:not([disabled]):focus {
background-color: #27ae60;
}
.btn > * {
position: relative;
}
.btn span {
display: block;
padding: 12px 24px;
}
.btn:not([disabled]):before {
content: "";
position: absolute;
top: 50%;
left: 50%;
display: block;
width: 0;
padding-top: 0;
border-radius: 100%;
background-color: rgba(236, 240, 241, .3);
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
-o-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.btn:not([disabled]):active:before {
width: 120%;
padding-top: 120%;
transition: width .2s ease-out, padding-top .2s ease-out;
}
/* Styles, not important */
*, *:before, *:after {
box-sizing: border-box;
}
body{
display: flex;
flex-direction: column;
height: 100vh;
justify-content: center;
}
#wrapper{
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
margin: 2vh;
text-align: center;
}
</style>
<title>Tasker Auth</title>
</head>
<body>
<div id="wrapper">Authentication Done!<br>You can close this window.</div>
<script type="text/javascript">
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if (pair[0] == variable) {
return pair[1];
}
}
return null;
}
const error = getQueryVariable("error");
var message = null;
if(error){
message = `Error authenticating: ${error}`;
}else{
message = `Authentication Done!`;
}
message = `${message}<br/>You can close this window.`;
document.querySelector("#wrapper").innerHTML = message;
const toRedirect = `tasker://auth${window.location.search}`;
//document.title = toRedirect;
window.location.href = toRedirect;
</script></body></html>