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
@ -178,7 +178,7 @@ button img {
|
||||
top: 2px;
|
||||
}
|
||||
|
||||
#expiration, #burnafterreadingoption, #opendisc {
|
||||
#expiration, #rawtextbutton, #burnafterreadingoption, #opendisc {
|
||||
background-color: #414d5a;
|
||||
padding: 6px 8px;
|
||||
margin: 0 5px 0 0;
|
||||
@ -198,6 +198,10 @@ button img {
|
||||
background: #414d5a;
|
||||
}
|
||||
|
||||
#rawtextbutton img {
|
||||
padding: 1px 0 1px 0;
|
||||
}
|
||||
|
||||
#remainingtime {
|
||||
color: #94a3b4;
|
||||
display: inline;
|
||||
|
BIN
img/icon_raw.png
Normal file
BIN
img/icon_raw.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 204 B |
@ -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.
|
||||
*/
|
||||
|
@ -46,9 +46,10 @@
|
||||
<div id="status">{$STATUS|htmlspecialchars}</div>
|
||||
<div id="errormessage" class="hidden">{$ERROR|htmlspecialchars}</div>
|
||||
<div id="toolbar">
|
||||
<button id="newbutton" onclick="window.location.href=scriptLocation();return false;" class="hidden"><img src="img/icon_new.png#" width="11" height="15" alt="" />New</button>
|
||||
<button id="sendbutton" onclick="send_data();return false;" class="hidden"><img src="img/icon_send.png#" width="18" height="15" alt="" />Send</button>
|
||||
<button id="clonebutton" onclick="clonePaste();return false;" class="hidden"><img src="img/icon_clone.png#" width="15" height="17" alt="" />Clone</button>
|
||||
<button id="newbutton" onclick="window.location.href=scriptLocation();return false;" class="hidden"><img src="img/icon_new.png" width="11" height="15" alt="" />New</button>
|
||||
<button id="sendbutton" onclick="send_data();return false;" class="hidden"><img src="img/icon_send.png" width="18" height="15" alt="" />Send</button>
|
||||
<button id="clonebutton" onclick="clonePaste();return false;" class="hidden"><img src="img/icon_clone.png" width="15" height="17" alt="" />Clone</button>
|
||||
<button id="rawtextbutton" onclick="rawText();return false;" class="hidden"><img src="img/icon_raw.png" width="15" height="15" alt="" />Raw text</button>
|
||||
<div id="expiration" class="hidden">Expires:
|
||||
<select id="pasteExpiration" name="pasteExpiration">
|
||||
{loop="EXPIRE"}
|
||||
|
Loading…
Reference in New Issue
Block a user