-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebhook.html
More file actions
37 lines (36 loc) · 1.71 KB
/
webhook.html
File metadata and controls
37 lines (36 loc) · 1.71 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
<head>
<link rel="stylesheet" href="/styles.css">
<meta content="Simple webhook tutorial" property="og:title">
<meta content="Two simple tutorials for setting up webhooks, both with or without a server" property="og:description">
<meta content='https://comhad.github.io/img/upvote_trigger.png' property='og:image'>
<meta name="twitter:card" content="summary_large_image">
</head>
<body>
<script>
// Stolen from stackoverflow
var $_GET = {};
if(document.location.toString().indexOf('?') !== -1) {
var query = document.location
.toString()
// get the query string
.replace(/^.*?\?/, '')
// and remove any existing hash string (thanks, @vrijdenker)
.replace(/#.*$/, '')
.split('&');
for(var i=0, l=query.length; i<l; i++) {
var aux = decodeURIComponent(query[i]).split('=');
$_GET[aux[0]] = aux[1];
}
}
window.onload = function() {
var link = document.getElementById($_GET["page"]);
if (link === null) {
console.log("No id linked to this!");
} else {
link.click();
}
}
</script>
<p style="padding: 10% 0; text-align: center;"><a href="https://gist.github.com/comhad/fb08abc2edc29af80ceb1bf3f433bb08" id="dedicated">Click here if you have a VPS / server exposed to the internet.</a></p>
<p style="padding: 10% 0; text-align: center;"><a href="https://gist.github.com/comhad/bd42b56a0399dbfa645aa83fe3cf4c8a" id="serverless">Click here if you don't</a></p>
</body>