-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
60 lines (54 loc) · 1.92 KB
/
main.js
File metadata and controls
60 lines (54 loc) · 1.92 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
function buyvinyl() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "accuracyv1.wav", true);
xhr.responseType = "blob";
xhr.onload = function() {
var urlCreator = window.URL || window.webkitURL;
var wavUrl = urlCreator.createObjectURL(this.response);
var tag = document.createElement('a');
tag.href = wavUrl;
tag.download = "accuracyv1.wav";
document.body.appendChild(tag);
tag.click();
document.body.removeChild(tag);
}
xhr.send();
alert("Music purchased! Check your downloads folder for the WAV file!")
}
function buybook() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "book.pdf", true);
xhr.responseType = "blob";
xhr.onload = function() {
var urlCreator = window.URL || window.webkitURL;
var pdfUrl = urlCreator.createObjectURL(this.response);
var tag = document.createElement('a');
tag.href = pdfUrl;
tag.download = "book.pdf";
document.body.appendChild(tag);
tag.click();
document.body.removeChild(tag);
}
xhr.send();
alert("Book purchased! Check your downloads folder for the PDF!")
}
function buyalbum() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "ACCURACY IS DEAD.zip", true);
xhr.responseType = "blob";
xhr.onload = function() {
var urlCreator = window.URL || window.webkitURL;
var zipUrl = urlCreator.createObjectURL(this.response);
var tag = document.createElement('a');
tag.href = zipUrl;
tag.download = "ACCURACY IS DEAD.zip";
document.body.appendChild(tag);
tag.click();
document.body.removeChild(tag);
}
xhr.send();
alert("Album purchased! Check your downloads folder for the ZIP file!")
}
function buygraphs() {
alert("We have deduced that you do not have 5 million grains of rice or $9999.99. Maybe you do? We don't care. Have a terrible day.")
}