mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 08:02:54 +11:00
Fixed wordwrap for multiple items in History
This commit is contained in:
parent
6fa4e6d7a6
commit
38e3c0dd79
1 changed files with 3 additions and 3 deletions
|
@ -37,13 +37,13 @@ document.body.onkeydown = function(e) {
|
||||||
// Toggle Wordwrap
|
// Toggle Wordwrap
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
const wordwrapCheckbox = document.getElementById('wordwrap');
|
const wordwrapCheckbox = document.getElementById('wordwrap');
|
||||||
const snippetDiv = document.querySelector('.snippet-code');
|
const snippetDiv = document.querySelectorAll('.snippet-code');
|
||||||
|
|
||||||
function toggleWordwrap() {
|
function toggleWordwrap() {
|
||||||
if (wordwrapCheckbox.checked) {
|
if (wordwrapCheckbox.checked) {
|
||||||
snippetDiv.classList.add('wordwrap');
|
snippetDiv.forEach(i => i.classList.add('wordwrap'));
|
||||||
} else {
|
} else {
|
||||||
snippetDiv.classList.remove('wordwrap');
|
snippetDiv.forEach(i => i.classList.remove('wordwrap'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue