aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-07-30 13:02:04 +0300
committerGravatar Vitaly Takmazov2016-07-30 13:02:04 +0300
commitf46e220373cc87959d6cee903927ffea289d0575 (patch)
tree828a0c9a66d7d77425d2f5eb78f2b38c6d1be169 /juick-www/src/main
parente8c5bc19e49dfa5ea11f97582bf932c831367c70 (diff)
WTF is article was?
This reverts commit e8c5bc19e49dfa5ea11f97582bf932c831367c70.
Diffstat (limited to 'juick-www/src/main')
-rw-r--r--juick-www/src/main/static/scripts.js26
1 files changed, 14 insertions, 12 deletions
diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js
index aa1ed2f9..fe701208 100644
--- a/juick-www/src/main/static/scripts.js
+++ b/juick-www/src/main/static/scripts.js
@@ -701,19 +701,21 @@ ready(function () {
attachMessagePhoto(e.target);
});
}
- 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;
- });
+ 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;
+ });
+ }
}
- }
+ });
});
unfoldPostForm();