summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
author8chan <admin@8chan.co>2014-11-21 23:34:03 -0800
committerczaks <marcin@6irc.net>2016-05-05 13:01:24 +0200
commit5267098cb822b489a1634cb2e5b7620b49a4f4ae (patch)
tree2669e4f896d9c11daf3e66d2f67e44ba5271ae03 /js
parentfd2e9df30cfd14b6c03d109c02e48ec966101aa1 (diff)
Make bottom watchlist-toggle work
Diffstat (limited to 'js')
-rw-r--r--js/thread-watcher.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/js/thread-watcher.js b/js/thread-watcher.js
index b66dc657..7f20e028 100644
--- a/js/thread-watcher.js
+++ b/js/thread-watcher.js
@@ -147,15 +147,16 @@ $(document).ready(function(){
}
//Append the watchlist toggle button.
- $('.boardlist').append('<span>[ <a id="watchlist-toggle">watchlist</a> ]</span>');
+ $('.boardlist').append('<span>[ <a class="watchlist-toggle" href="#">watchlist</a> ]</span>');
//Append a watch thread button after every OP.
- $('.op>.intro').append('<a class="watchThread">[Watch Thread]</a>');
+ $('.op>.intro').append('<a class="watchThread" href="#">[Watch Thread]</a>');
//Draw the watchlist, hidden.
watchlist.render();
//Show or hide the watchlist.
- $('#watchlist-toggle').on('click', function(e) {
+ $('.watchlist-toggle').on('click', function(e) {
+ e.preventDefault();
//if ctrl+click, reset the watchlist.
if (e.ctrlKey) {
watchlist.render(true);
@@ -169,7 +170,8 @@ $(document).ready(function(){
//Trigger the watchlist add function.
//The selector is passed as an argument in case the page is not a thread.
- $('.watchThread').on('click', function() {
+ $('.watchThread').on('click', function(e) {
+ e.preventDefault();
watchlist.add(this).render();
});