-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
32 lines (28 loc) · 823 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
31
32
function switchItBack()
{
$("#e").css('visibility', 'hidden');
}
function copyMe()
{
var snackbarContainer = document.querySelector('#demo-toast-example');
var showToastButton = document.querySelector('#demo-show-toast'); //copy pasta code from getmdl.io
var data = {message: 'Successfully copied ipsum to clipboard'};
snackbarContainer.MaterialSnackbar.showSnackbar(data);
}
$( document ).ready(function(){
new ClipboardJS("#c");
$("#sB").click(function() {
n = $("#nP").val();
$.post( "ipsum.php", {"n":n},function( data ) {
if(data.request) {
$("#eI").empty().append(data.ipsum);
$(".returnContent").css('visibility','visible');
$("#e").css('visibility', 'hidden');
}
else {
$("#e").css('visibility', 'visible');
setTimeout(switchItBack,500);
}
});
});
});