summaryrefslogtreecommitdiff
path: root/js/thread-watcher.js
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2016-05-09 11:18:27 +0200
committerczaks <marcin@6irc.net>2016-05-09 11:18:35 +0200
commit4479fc7681d55afeeed90f9ddc4d892741bd6e53 (patch)
tree56f876c27d830ff6b6423a5c3005c0523a714f37 /js/thread-watcher.js
parent1cff10fd953373abb546dd93f53acaee2eec19cd (diff)
thread-watcher and favorites in catalog and ukko
Diffstat (limited to 'js/thread-watcher.js')
-rw-r--r--js/thread-watcher.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/js/thread-watcher.js b/js/thread-watcher.js
index c31a6e74..0796193b 100644
--- a/js/thread-watcher.js
+++ b/js/thread-watcher.js
@@ -41,7 +41,7 @@ watchlist.render = function(reset) {
} else {
//If the watchlist has not yet been rendered, create it.
var menuStyle = getComputedStyle($('.boardlist')[0]);
- $('form[name="post"]').before(
+ $((active_page == 'ukko') ? 'hr:first' : (active_page == 'catalog') ? 'body>span:first' : 'form[name="post"]').before(
$('<div id="watchlist">'+
'<div class="watchlist-controls">'+
'<span><a id="clearList">['+_('Clear List')+']</a></span>&nbsp'+
@@ -60,6 +60,8 @@ watchlist.render = function(reset) {
watchlist.add = function(sel) {
var threadName, threadInfo;
+ var board_name = $(sel).parents('.thread').data('board');
+
if (active_page === 'thread') {
if ($('.subject').length){
//If a subject is given, use the first 20 characters as the thread name.
@@ -70,7 +72,7 @@ watchlist.add = function(sel) {
//board name, thread name as defined above, current amount of posts, thread url
threadInfo = [board_name, threadName, $('.post').length, location.href];
- } else if (active_page === 'index') {
+ } else if (active_page === 'index' || active_page === 'ukko') {
var postCount;
//Figure out the post count.
@@ -142,7 +144,7 @@ watchlist.exists = function(sel) {
};
$(document).ready(function(){
- if (!(active_page == 'thread' || active_page == 'index')) {
+ if (!(active_page == 'thread' || active_page == 'index' || active_page == 'catalog' || active_page == 'ukko')) {
return;
}