-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
99 lines (88 loc) · 4.43 KB
/
index.html
File metadata and controls
99 lines (88 loc) · 4.43 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
<head>
<title>Spoilerify</title>
<link rel="shortcut icon" type="image/png" href="./spoiler.ico"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<meta charset="UTF-8">
<meta name="keywords" content="discord, community, gaming, tools">
<meta name="description" content="A way for Discord mobile users to create image and video spoilers.">
<meta name="copyright" content="Spoilerify">
<meta name="robots" content="index,follow">
<meta name="revised" content="Sunday, July 18th, 2010, 5:15 pm">
<meta name="Classification" content="Business">
<meta name="pagename" content="Spoilerify">
<meta name="coverage" content="Worldwide">
<meta name="distribution" content="Global">
<meta name="rating" content="General">
<meta name="revisit-after" content="7 days">
<meta name="subtitle" content="A way for Discord mobile users to create image and video spoilers.">
<meta name="target" content="all">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="x-dns-prefetch-control" content="off">
</head>
<header>
<div class="navbar navbar-dark bg-primary text-center" style="box-shadow: 0 0 15px rgba(0,0,0,0.5);">
<a class="navbar-brand text-white">
Spoilerify
</a>
</div>
</header>
<main class="py-4">
<div class="container">
<div class="row">
<div class="col-12">
<h2 class="card-title">Discord spoilers for mobile.</h2>
<hr>
<div class="row">
<div class="col-12">
<label for="upbutton">Choose a file...</label>
<img id="sex">
<div class="form-group">
<div class="input-group" id="upbutton">
<input type="text" class="form-control" disabled placeholder="No File Selected" id="file">
<div class="input-group-append">
<button type="button" class="browse btn btn-primary">Browse...</button>
</div>
</div>
<input hidden type="file" name="image" id="image" class="file" accept="image/*,video/*,audio/*">
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<button id="submitBtn" class="btn btn-primary">Spoilerify!</button>
</div>
</div>
<hr>
<p style="font-weight: 100;">Made with 💖 by <a style="font-weight: 400;">false#6969</a></p>
</div>
</div>
</div>
</main>
<script>
document.getElementById('upbutton').addEventListener('click', openDialog);
document.getElementById('submitBtn').addEventListener('click', spoilerify);
function spoilerify() {
var fr = new FileReader();
fr.onload = function () {
var a = document.createElement("a"); //Create <a>
a.href = fr.result;
a.download = "SPOILER_" + document.getElementById('image').files[0].name;
a.click();
}
fr.readAsDataURL(document.getElementById('image').files[0]);
}
document.getElementById('image').onchange = function(){
document.getElementById('file').value = document.getElementById('image').files[0].name;
}
function openDialog() {
document.getElementById('image').click();
}
</script>