-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
30 lines (25 loc) · 981 Bytes
/
script.js
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
const user = document.getElementById('user');
const file = document.getElementById('file');
const output = document.getElementById('outputs');
function sendData(){
let username = document.getElementById('username').value
let filename = document.getElementById('filename').value
let textfield = document.getElementById('textfield').value
user.innerHTML = username
file.innerHTML = filename
output.innerHTML = textfield
}
function captureDivAsImage() {
var element = document.getElementById('captureme');
let filename = document.getElementById('filename').value
html2canvas(element).then(function(canvas) {
var link = document.createElement('a');
link.href = canvas.toDataURL('image/png');
link.download = filename;
link.click();
});
}
document.getElementById("roll123").addEventListener("click", rickroll);
function rickroll() {
window.open("https://youtu.be/dQw4w9WgXcQ", "");
}