thread-watcher.js: insert thread watcher inside it's container

This commit is contained in:
Zankaria 2024-10-01 00:35:45 +02:00
parent b6de128363
commit 0295f3e686

View file

@ -45,7 +45,7 @@ watchlist.render = function(reset) {
} else { } else {
// If the watchlist has not yet been rendered, create it. // If the watchlist has not yet been rendered, create it.
let menuStyle = getComputedStyle($('.boardlist')[0]); let menuStyle = getComputedStyle($('.boardlist')[0]);
$((active_page == 'ukko') ? 'hr:first' : (active_page == 'catalog') ? 'body>span:first' : 'form[name="post"]').before( $('.watchlist-container').append(
$('<div id="watchlist">'+ $('<div id="watchlist">'+
'<div class="watchlist-controls">'+ '<div class="watchlist-controls">'+
'<span><a id="clearList">['+_('Clear List')+']</a></span>&nbsp'+ '<span><a id="clearList">['+_('Clear List')+']</a></span>&nbsp'+
@ -152,8 +152,8 @@ $(document).ready(function() {
} }
// Append the watchlist toggle button. // Append the watchlist toggle button.
$('.boardlist').append('<a class="watchlist-toggle" style="float:right;" href="#">['+_('Watchlist')+']</a>'); $('.boardlist').append('<div class="watchlist-container" style="float:right;"><a class="watchlist-toggle" href="#">['+_('Watchlist')+']</a></div>');
$('.compact-boardlist').append('<a class="watchlist-toggle" style="float:right;" href="#">['+_('Watchlist')+']</a>'); $('.compact-boardlist').append('<div class="watchlist-container" style="float:right;"><a class="watchlist-toggle" href="#">['+_('Watchlist')+']</a></div>');
// Append a watch thread button after every OP post number. // Append a watch thread button after every OP post number.
$('.op>.intro>.post_no:odd').after('<a class="watchThread" href="#">['+_('Watch Thread')+']</a>'); $('.op>.intro>.post_no:odd').after('<a class="watchThread" href="#">['+_('Watch Thread')+']</a>');