diff --git a/chrome_point_plus/css/point-plus.css b/chrome_point_plus/css/point-plus.css index beca171..cba8a5a 100644 --- a/chrome_point_plus/css/point-plus.css +++ b/chrome_point_plus/css/point-plus.css @@ -10,6 +10,23 @@ div#markItUpText-input { } /* Point+ */ + +/* Post and comments highlights */ +.pp-highlight { + z-index: 1; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: #FFFFBB; +} + +.post .info, .post .post-content { + z-index: 2; + position: relative; +} + /* Options page */ .pp-options { width: 450px; diff --git a/chrome_point_plus/includes/comment.html b/chrome_point_plus/includes/comment.html index 12f09e0..c38ec2f 100644 --- a/chrome_point_plus/includes/comment.html +++ b/chrome_point_plus/includes/comment.html @@ -1,3 +1,4 @@ +
diff --git a/chrome_point_plus/js/point-plus.js b/chrome_point_plus/js/point-plus.js index 4121d87..d0294a0 100644 --- a/chrome_point_plus/js/point-plus.js +++ b/chrome_point_plus/js/point-plus.js @@ -228,7 +228,7 @@ $(document).ready(function() { // If list mode or not addressed to other comment if ((treeSwitch == '?tree=0') || (wsMessage.to_comment_id == null)) { // List mode - $('.content-wrap #comments #post-reply').before($commentTemplate.hide().fadeIn(2000).css('background-color', '#FFFFBB')); + $('.content-wrap #comments #post-reply').before($commentTemplate.hide().fadeIn(2000)); } else { // Tree mode // Search parent comment @@ -240,21 +240,27 @@ $(document).ready(function() { // If child comment already exist if ($parentCommentChildren.length > 0) { console.log('Child comments found. Appending...'); - $parentCommentChildren.append($commentTemplate.hide().fadeIn(2000).css('background-color', '#FFFFBB')); + $parentCommentChildren.append($commentTemplate.hide().fadeIn(2000)); } else { console.log('No child comments found. Creating...'); - $parentComment.after($('
').addClass('comments').append($commentTemplate.hide().fadeIn(2000).css('background-color', '#FFFFBB'))); + $parentComment.after($('
').addClass('comments').append($commentTemplate.hide().fadeIn(2000))); } } else { console.log('Parent comment not found'); // FIXME: Double code - $('.content-wrap #comments #post-reply').before($commentTemplate.hide().fadeIn(2000).css('background-color', '#FFFFBB')); + $('.content-wrap #comments #post-reply').before($commentTemplate.hide().fadeIn(2000)); } } // Adding anchor $commentTemplate.before($anchor); + // Fading out highlight if needed + if (options.option_ws_comments_color_fadeout == true) { + console.log('Fading out the highlight'); + $commentTemplate.children('.pp-highlight').fadeOut(20000); + } + console.groupEnd(); }); diff --git a/chrome_point_plus/options.html b/chrome_point_plus/options.html index 198b098..60a84d7 100644 --- a/chrome_point_plus/options.html +++ b/chrome_point_plus/options.html @@ -69,7 +69,7 @@
- +