blob: 3490bbba624875292b6cf140e051e8764d8fba06 (
plain) (
blame)
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
|
<!DOCTYPE html>
<html>
<head>
<title>wee-slack</title>
<style type="text/css">
#input-code {
width: 60em;
max-width: 100%;
}
#with-code {
display: none;
}
#without-code {
display: none;
}
</style>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
var locationsSearch = location.search
.replace(/^\?/, '')
.split('&')
.reduce((obj, query) => {
split = query.split('=');
obj[split[0]] = split[1];
return obj}, {}
)
var code = locationsSearch['code'];
if (code) {
document.getElementById('with-code').style.display = 'block';
} else {
document.getElementById('without-code').style.display = 'block';
}
var codeElement = document.getElementById('input-code');
codeElement.value = '/slack register ' + code;
codeElement.focus();
codeElement.select();
document.getElementById('button-copy').addEventListener('click', () => {
codeElement.focus();
codeElement.select();
document.execCommand('copy');
});
});
</script>
</head>
<body>
<div id="with-code">
<h1>OAuth code for wee-slack</h1>
<p>Copy this command and run it in WeeChat:</p>
<input id="input-code" readonly>
<button id="button-copy" type="button">Copy</button>
</div>
<div id="without-code">
<h1>wee-slack</h1>
<p>This page exists for using OAuth in wee-slack. For info about wee-slack see <a href="https://github.com/wee-slack/wee-slack">the github page.</a></p>
<p>If you came here as part of the OAuth flow and are seeing this text, that means that something went wrong. Please report this <a href="https://github.com/wee-slack/wee-slack/issues/new">in the issue tracker</a> and describe how you got here.</p>
</div>
<noscript>
<h1>OAuth code for wee-slack</h1>
<p>Since you have disabled JavaScript, the OAuth code can't be shown here. Instead you will have to extract it from the page url. The code is the text which comes after "code=" in the url, up until the first "&" character or until the end of the url if there are no "&" characters.</p>
<p>Run the command "/slack register <code>" in WeeChat, where you substitute "<code>" with the code you extracted from the url.</p>
</noscript>
</body>
</html>
|