diff options
Diffstat (limited to 'juick-www/src/main/static')
-rw-r--r-- | juick-www/src/main/static/scripts.js | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js index fe701208e..aa1ed2f9f 100644 --- a/juick-www/src/main/static/scripts.js +++ b/juick-www/src/main/static/scripts.js @@ -701,21 +701,19 @@ ready(function () { attachMessagePhoto(e.target); }); } - document.querySelectorAll('article').forEach(function(article) { - article.querySelectorAll('.u a').forEach(function(l) { - if (l.textContent === 'NSFW') { - var img = article.querySelector('.ir img'); - if (img) { - img.style.opacity = 0.05; - img.addEventListener('mouseover', function(e) { - e.target.style.opacity = 1; - }); - img.addEventListener('mouseout', function(e) { - e.target.style.opacity = 0.05; - }); - } + document.querySelectorAll('article .u a').forEach(function(l) { + if (l.textContent === 'NSFW') { + var img = article.querySelector('.ir img'); + if (img) { + img.style.opacity = 0.05; + img.addEventListener('mouseover', function(e) { + e.target.style.opacity = 1; + }); + img.addEventListener('mouseout', function(e) { + e.target.style.opacity = 0.05; + }); } - }); + } }); unfoldPostForm(); |