diff --git a/gulp/res/css/style.css b/gulp/res/css/style.css index e088b163..c882a343 100644 --- a/gulp/res/css/style.css +++ b/gulp/res/css/style.css @@ -501,7 +501,7 @@ th { } .fw td, .fw th { - width: 15%; /*Fixes log tables when large actions are taken*/ + width: 8%; /*Fixes log tables when large actions are taken*/ } td, th { diff --git a/gulp/res/img/attachment.png b/gulp/res/img/attachment.png index 53a01b6a..3c0785da 100644 Binary files a/gulp/res/img/attachment.png and b/gulp/res/img/attachment.png differ diff --git a/gulp/res/img/audio.png b/gulp/res/img/audio.png index c13185e4..4774cf29 100644 Binary files a/gulp/res/img/audio.png and b/gulp/res/img/audio.png differ diff --git a/gulp/res/js/hideimages.js b/gulp/res/js/hideimages.js index 558123bb..bc231832 100644 --- a/gulp/res/js/hideimages.js +++ b/gulp/res/js/hideimages.js @@ -4,7 +4,7 @@ let imageSourcesList; const toggleAllHidden = (state) => imageSources.forEach(i => toggleSource(i, state)); const toggleSource = (source, state) => { - const images = document.querySelectorAll(`img.file-thumb[src="${source}"]`); + const images = document.querySelectorAll(`img.file-thumb[src="${source}"], img.catalog-thumb[src="${source}"]`); images.forEach(i => i.classList[state?'add':'remove']('vh')); } @@ -26,8 +26,14 @@ document.querySelectorAll('.hide-image').forEach(el => { const handleHiddenImages = (e) => { //hide any images from this post that should already be hidden const hasHiddenImages = e.detail.json.files.forEach(f => { - if (imageSources.has(f.filename)) { - toggleSource(f.filename, true); + let hideFilename = '/file/'; + if (f.hasThumb) { + hideFilename += `thumb-${f.hash}${f.thumbextension}` + } else { + hideFilename += f.filename; + } + if (imageSources.has(hideFilename)) { + toggleSource(hideFilename, true); } }); //add the hide toggle link and event listener diff --git a/gulp/res/js/hover.js b/gulp/res/js/hover.js index 65eb042f..d636bc84 100644 --- a/gulp/res/js/hover.js +++ b/gulp/res/js/hover.js @@ -59,6 +59,7 @@ window.addEventListener('DOMContentLoaded', (event) => { clone.appendChild(post.cloneNode(true)); document.body.appendChild(clone); setFloatPos(quote, clone, xpos, ypos); + return clone; }; const toggleHighlightPost = async function (e) { @@ -85,13 +86,12 @@ window.addEventListener('DOMContentLoaded', (event) => { lastHover = loading; const hash = this.hash.substring(1); const anchor = document.getElementById(hash); - let hoveredPost; + let hoveredPost, postJson; if (anchor && jsonPath.split('/')[1] === anchor.nextSibling.dataset.board) { hoveredPost = anchor.nextSibling; } else { let hovercache = localStorage.getItem(`hovercache-${jsonPath}`); - let postJson; if (hovercache) { hovercache = JSON.parse(hovercache); if (hovercache.postId == hash) { @@ -135,6 +135,13 @@ window.addEventListener('DOMContentLoaded', (event) => { const wrap = document.createElement('div'); wrap.innerHTML = postHtml; hoveredPost = wrap.firstChild.nextSibling; + } + if (hovering && !isVisible(hoveredPost)) { + hoveredPost = floatPost(this, hoveredPost, e.clientX, e.clientY); + } else { + hovering ? hoveredPost.classList.add('hoverhighlighted') : hoveredPost.classList.remove('hoverhighlighted'); + } + if (postJson) { //need this event so handlers like post hiding still apply to hover introduced posts const newPostEvent = new CustomEvent('addPost', { detail: { @@ -147,11 +154,6 @@ window.addEventListener('DOMContentLoaded', (event) => { window.dispatchEvent(newPostEvent); } toggleDottedUnderlines(hoveredPost, thisId); - if (hovering && !isVisible(hoveredPost)) { - floatPost(this, hoveredPost, e.clientX, e.clientY); - } else { - hovering ? hoveredPost.classList.add('hoverhighlighted') : hoveredPost.classList.remove('hoverhighlighted'); - } } for (let i = 0; i < quotes.length; i++) { diff --git a/package-lock.json b/package-lock.json index d7ddff3a..9fb7e8e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3448,11 +3448,11 @@ }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "ms": {