Added "Raw text" button.
(cherry picked from commit 00cfcafc996c55afd069b665ad3875693e22d36d) Conflicts: css/zerobin.css js/zerobin.js tpl/page.html
This commit is contained in:
committed by
El RIDO
parent
09bebae286
commit
fdc87a7fcf
@@ -381,6 +381,7 @@ function selectText(element) {
|
||||
function stateNewPaste() {
|
||||
$('button#sendbutton').removeClass('hidden');
|
||||
$('button#clonebutton').addClass('hidden');
|
||||
$('button#rawtextbutton').addClass('hidden');
|
||||
$('div#expiration').removeClass('hidden');
|
||||
$('div#remainingtime').addClass('hidden');
|
||||
$('div#burnafterreadingoption').removeClass('hidden');
|
||||
@@ -408,6 +409,7 @@ function stateExistingPaste() {
|
||||
else {
|
||||
$('button#clonebutton').removeClass('hidden');
|
||||
}
|
||||
$('button#rawtextbutton').show();
|
||||
|
||||
$('div#expiration').addClass('hidden');
|
||||
$('div#burnafterreadingoption').addClass('hidden');
|
||||
@@ -419,6 +421,17 @@ function stateExistingPaste() {
|
||||
$('div#prettymessage').removeClass('hidden');
|
||||
}
|
||||
|
||||
/** Return raw text
|
||||
*/
|
||||
function rawText()
|
||||
{
|
||||
history.replaceState(document.title, document.title, 'document.txt');
|
||||
var paste = $('div#cleartext').text();
|
||||
var newDoc = document.open('text/plain', 'replace');
|
||||
newDoc.write(paste);
|
||||
newDoc.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clone the current paste.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user