aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main
diff options
context:
space:
mode:
authorGravatar Flowers Safety2016-07-29 23:52:48 +0600
committerGravatar Flowers Safety2016-07-29 23:52:48 +0600
commite8c5bc19e49dfa5ea11f97582bf932c831367c70 (patch)
tree11a68fad0b41bd82d8724fc7592f57585e23be34 /juick-www/src/main
parent7384f2df2406b70a7bb9c41b53023fd792e88f7c (diff)
learn css selectors, Luke
Diffstat (limited to 'juick-www/src/main')
-rw-r--r--juick-www/src/main/static/scripts.js26
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 fe701208..aa1ed2f9 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();