/quickload/text.html |
@@ -127,13 +127,18 @@ |
focus: false |
}); |
|
// Enable the Clipboard button. |
new Clipboard('#copy-url'); |
|
// Get the fingerprint. |
new Fingerprint2().get((result, components) => { |
// Set the nick as a cookie. |
const fingerprint = result; |
var nick = Cookies.get('nick'); |
if(!nick || nick.length !== 32) |
if(!nick || nick.length !== 32) { |
Cookies.set('nick', result, { path: '' }); |
nick = result; |
} |
else |
result = nick; |
|
@@ -179,9 +184,6 @@ |
$('#trumbowyg').show(); |
}); |
|
// Enable the Clipboard button. |
new Clipboard('#copy-url'); |
|
$('#save').click(() => { |
$('#editor').trumbowyg('disable'); |
|
@@ -217,11 +219,6 @@ |
Cookies.set('nick', nick, { path: '' }); |
result = nick; |
|
if(fingerprint == nick) |
$('#home-icon').addClass("text-success").removeClass("text-danger"); |
else |
$('#home-icon').addClass("text-danger").removeClass("text-success"); |
|
// Retrieve the contents of the shared file. |
$.post('share-text.php', |
{ |
@@ -235,9 +232,9 @@ |
$('#trumbowyg').show(); |
|
if(fingerprint == nick) |
$('#home-icon').addClass("text-success"); |
$('#home-icon').addClass("text-success").removeClass("text-danger"); |
else |
$('#home-icon').addClass("text-danger"); |
$('#home-icon').addClass("text-danger").removeClass("text-success"); |
|
}).fail(() => { |
$('#trumbowyg').trumbowyg('enable'); |
@@ -255,11 +252,6 @@ |
Cookies.set('nick', nick, { path: '' }); |
result = nick; |
|
if(fingerprint == nick) |
$('#home-icon').addClass("text-success"); |
else |
$('#home-icon').addClass("text-danger"); |
|
// Retrieve the contents of the shared file. |
$.post('share-text.php', |
{ |
@@ -291,11 +283,6 @@ |
Cookies.set('nick', nick, { path: '' }); |
result = nick; |
|
if(fingerprint == nick) |
$('#home-icon').addClass("text-success").removeClass("text-danger"); |
else |
$('#home-icon').addClass("text-danger").removeClass("text-success"); |
|
// Retrieve the contents of the shared file. |
$.post('share-text.php', |
{ |
@@ -307,6 +294,11 @@ |
.trumbowyg('html', data); |
$('#trumbowyg').trumbowyg('enable'); |
$('#trumbowyg').show(); |
|
if(fingerprint == nick) |
$('#home-icon').addClass("text-success").removeClass("text-danger"); |
else |
$('#home-icon').addClass("text-danger").removeClass("text-success"); |
}).fail(() => { |
$('#trumbowyg').trumbowyg('enable'); |
$('#trumbowyg').show(); |
@@ -320,11 +312,6 @@ |
result = fingerprint; |
nick = fingerprint; |
|
if(fingerprint == nick) |
$('#home-icon').addClass("text-success").removeClass("text-danger"); |
else |
$('#home-icon').addClass("text-danger").removeClass("text-success"); |
|
// Retrieve the contents of the shared file. |
$.post('share-text.php', |
{ |
@@ -336,6 +323,11 @@ |
.trumbowyg('html', data); |
$('#trumbowyg').trumbowyg('enable'); |
$('#trumbowyg').show(); |
|
if(fingerprint == nick) |
$('#home-icon').addClass("text-success").removeClass("text-danger"); |
else |
$('#home-icon').addClass("text-danger").removeClass("text-success"); |
}).fail(() => { |
$('#trumbowyg').trumbowyg('enable'); |
$('#trumbowyg').show(); |
@@ -342,7 +334,6 @@ |
}); |
}); |
}); |
|
}); |
</script> |
</body> |