-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove right margin from expiration dropdown on index * Use flexbox for bin/story display * Move Paste/Save button after expire dropdown, instead of before
- Loading branch information
1 parent
f46b613
commit 73f1273
Showing
7 changed files
with
105 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,58 @@ | ||
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later | ||
|
||
var navlist = document.getElementById("info").getElementsByClassName("text-right")[0]; | ||
|
||
init(); | ||
|
||
function init() { | ||
var editA = document.createElement('a'); | ||
|
||
editA.setAttribute("href", "#"); | ||
editA.addEventListener('click', function(ev) { | ||
edit(ev); | ||
return false; | ||
}); | ||
editA.innerHTML = "edit"; | ||
|
||
var separator = document.createTextNode(" | "); | ||
navlist.insertBefore(editA, navlist.firstChild); | ||
navlist.insertBefore(separator, navlist.children[1]); | ||
|
||
document.getElementById('save').addEventListener('click', paste); | ||
document.getElementById('wordwrap').addEventListener('click', wrap); | ||
} | ||
|
||
function edit(ev) { | ||
ev.preventDefault(); | ||
|
||
navlist.remove(); | ||
document.getElementById("filename").remove(); | ||
document.getElementById("editform").style.display = "block"; | ||
|
||
var normalcontent = document.getElementById("normal-content"); | ||
normalcontent.removeChild(document.getElementById("normal-code")); | ||
|
||
var editordiv = document.getElementById("inplace-editor"); | ||
editordiv.style.display = "block"; | ||
editordiv.addEventListener('keydown', handleTab); | ||
} | ||
|
||
function paste(ev) { | ||
var editordiv = document.getElementById("inplace-editor"); | ||
document.getElementById("newcontent").value = editordiv.value; | ||
document.forms["reply"].submit(); | ||
} | ||
|
||
function wrap(ev) { | ||
if (document.getElementById("wordwrap").checked) { | ||
document.getElementById("codeb").style.wordWrap = "break-word"; | ||
document.getElementById("codeb").style.whiteSpace = "pre-wrap"; | ||
} | ||
|
||
else { | ||
document.getElementById("codeb").style.wordWrap = "normal"; | ||
document.getElementById("codeb").style.whiteSpace = "pre"; | ||
} | ||
} | ||
|
||
// @license-end | ||
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later | ||
|
||
var navlist = document.getElementById("info").getElementsByClassName("info-actions")[0]; | ||
|
||
init(); | ||
|
||
function init() { | ||
var editA = document.createElement('a'); | ||
|
||
editA.setAttribute("href", "#"); | ||
editA.addEventListener('click', function(ev) { | ||
edit(ev); | ||
return false; | ||
}); | ||
editA.innerHTML = "edit"; | ||
|
||
var separator = document.createTextNode(" | "); | ||
navlist.insertBefore(editA, navlist.firstChild); | ||
navlist.insertBefore(separator, navlist.children[1]); | ||
|
||
document.getElementById('save').addEventListener('click', paste); | ||
document.getElementById('wordwrap').addEventListener('click', wrap); | ||
} | ||
|
||
function edit(ev) { | ||
ev.preventDefault(); | ||
|
||
navlist.remove(); | ||
document.getElementById("filename").remove(); | ||
document.getElementById("editform").style.display = "block"; | ||
|
||
var normalcontent = document.getElementById("normal-content"); | ||
normalcontent.removeChild(document.getElementById("normal-code")); | ||
|
||
var editordiv = document.getElementById("inplace-editor"); | ||
editordiv.style.display = "block"; | ||
editordiv.addEventListener('keydown', handleTab); | ||
} | ||
|
||
function paste(ev) { | ||
var editordiv = document.getElementById("inplace-editor"); | ||
document.getElementById("newcontent").value = editordiv.value; | ||
document.forms["reply"].submit(); | ||
} | ||
|
||
function wrap(ev) { | ||
if (document.getElementById("wordwrap").checked) { | ||
document.getElementById("codeb").style.wordWrap = "break-word"; | ||
document.getElementById("codeb").style.whiteSpace = "pre-wrap"; | ||
} | ||
|
||
else { | ||
document.getElementById("codeb").style.wordWrap = "normal"; | ||
document.getElementById("codeb").style.whiteSpace = "pre"; | ||
} | ||
} | ||
|
||
// @license-end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters