mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-10-03 09:49:14 +02:00
Added "Raw text" button.
(cherry picked from commit 00cfcafc996c55afd069b665ad3875693e22d36d) Conflicts: css/zerobin.css js/zerobin.js tpl/page.html
This commit is contained in:
parent
09bebae286
commit
fdc87a7fcf
4 changed files with 22 additions and 4 deletions
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue