mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-23 11:56:36 +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
|
||||
// -----------------------------------------------------------------------------
|
||||
const wordwrapCheckbox = document.getElementById('wordwrap');
|
||||
const snippetDiv = document.querySelector('.snippet-code');
|
||||
const snippetDiv = document.querySelectorAll('.snippet-code');
|
||||
|
||||
function toggleWordwrap() {
|
||||
if (wordwrapCheckbox.checked) {
|
||||
snippetDiv.classList.add('wordwrap');
|
||||
snippetDiv.forEach(i => i.classList.add('wordwrap'));
|
||||
} else {
|
||||
snippetDiv.classList.remove('wordwrap');
|
||||
snippetDiv.forEach(i => i.classList.remove('wordwrap'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue