forked from GithubBackups/vichan
Merge pull request #344 from marktaiwan/highlight-reply
main.js highlightReply fix for Gecko
This commit is contained in:
commit
858023002a
@ -253,11 +253,12 @@ function get_cookie(cookie_name) {
|
||||
}
|
||||
}
|
||||
|
||||
function highlightReply(id) {
|
||||
function highlightReply(id, event) {
|
||||
if (typeof window.event != "undefined") {
|
||||
// don't highlight on middle click
|
||||
if (event.which == 2) return true;
|
||||
if (active_page == 'thread' && typeof window.event.preventDefault != "undefined") window.event.preventDefault();
|
||||
var e = event || window.event;
|
||||
if (active_page == 'thread' && typeof e.preventDefault != "undefined") e.preventDefault();
|
||||
}
|
||||
|
||||
var divs = document.getElementsByTagName('div');
|
||||
|
@ -12,7 +12,7 @@
|
||||
{% include 'post/time.html' %}
|
||||
</label>
|
||||
{% include 'post/poster_id.html' %}
|
||||
<a class="post_no" id="post_no_{{ post.id }}" onclick="highlightReply({{ post.id }})" href="{% if isnoko50 %}{{ post.link('', config.file_page50) }}{% else %}{{ post.link }}{% endif %}">No.</a>
|
||||
<a class="post_no" id="post_no_{{ post.id }}" onclick="highlightReply({{ post.id }}, event)" href="{% if isnoko50 %}{{ post.link('', config.file_page50) }}{% else %}{{ post.link }}{% endif %}">No.</a>
|
||||
<a class="post_no" onclick="citeReply({{ post.id }})" href="{% if isnoko50 %}{{ post.link('q', config.file_page50) }}{% else %}{{ post.link('q') }}{% endif %}">{{ post.id }}</a>
|
||||
</p>
|
||||
{% include 'post/fileinfo.html' %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user