From 8d8563a20d6907cd106176704a404e3d2ff10763 Mon Sep 17 00:00:00 2001 From: 8chan Date: Thu, 12 Jun 2014 15:36:01 +0000 Subject: [PATCH] Fix scroll to issues with post-hover.js, clean up highlightReply Conflicts: templates/post_reply.html templates/post_thread.html --- js/post-hover.js | 1 + stylesheets/style.css | 2 +- templates/main.js | 4 +++- templates/post_reply.html | 13 +++++-------- templates/post_thread.html | 11 +++++------ 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/js/post-hover.js b/js/post-hover.js index 4a86cba0..2808b8e7 100644 --- a/js/post-hover.js +++ b/js/post-hover.js @@ -66,6 +66,7 @@ onready(function(){ var $newPost = $post.clone(); $newPost.find('>.reply, >br').remove(); $newPost.find('span.mentioned').remove(); + $newPost.find('a.post_anchor').remove(); $newPost .attr('id', 'post-hover-' + id) diff --git a/stylesheets/style.css b/stylesheets/style.css index b167dbb0..e7114bc6 100644 --- a/stylesheets/style.css +++ b/stylesheets/style.css @@ -25,7 +25,7 @@ a.post_no { p.intro a.post_no { color: inherit; } -p.intro a.post_no, p.intro a.email { +p.intro a.post_no, p.intro a.email, p.intro a.post_anchor { margin: 0; } p.intro a.email span.name { diff --git a/templates/main.js b/templates/main.js index 7796565c..294a752d 100644 --- a/templates/main.js +++ b/templates/main.js @@ -155,7 +155,7 @@ function highlightReply(id) { if (post) post.className += ' highlighted'; } - return false; + return true; } function generatePassword() { @@ -187,6 +187,8 @@ function dopost(form) { function citeReply(id, with_link) { var textarea = document.getElementById('body'); + + if (!textarea) return false; if (document.selection) { // IE diff --git a/templates/post_reply.html b/templates/post_reply.html index 90ac5065..c2254844 100644 --- a/templates/post_reply.html +++ b/templates/post_reply.html @@ -1,8 +1,8 @@ {% filter remove_whitespace %} {# tabs and new lines will be ignored #}
- -

+

+ {% if not index %}{% endif %} - {% include 'post/poster_id.html' %} - - No. - - {{ post.id }} - + {% include 'post/poster_id.html' %}  + No. + {{ post.id }}

{% if post.embed %} {{ post.embed }} diff --git a/templates/post_thread.html b/templates/post_thread.html index f74427e4..61d09636 100644 --- a/templates/post_thread.html +++ b/templates/post_thread.html @@ -2,6 +2,7 @@ {# tabs and new lines will be ignored #}
+{% if not index %}{% endif %} {% if post.embed %} {{ post.embed }} @@ -33,7 +34,7 @@

{% include "post/image.html" %} {% endif %} -

+

- {% include 'post/poster_id.html' %} - No. - - {{ post.id }} - + {% include 'post/poster_id.html' %}  + No. + {{ post.id }} {% if post.sticky %} {% if config.font_awesome %}