🐛 pick-show Always add click event when page is reloaded
This commit is contained in:
parent
409d0de43f
commit
6de306fd36
1 changed files with 6 additions and 4 deletions
|
|
@ -21,6 +21,10 @@
|
|||
cheat: pickShow
|
||||
});
|
||||
|
||||
function unghost() {
|
||||
$(this).removeClass('sortable-ghost');
|
||||
}
|
||||
|
||||
function addPickButton() {
|
||||
const $leftNav = $('.subnav-wrapper .container .left');
|
||||
const $found = $leftNav.find('.pick-episode');
|
||||
|
|
@ -28,15 +32,13 @@
|
|||
$leftNav.append('<span class="filter-dropdown toggle-simple-progress pick-episode" title="Pick Episode"><span class="icon trakt-icon-wand"></span></span>')
|
||||
.find('.pick-episode').on('click', pickShow);
|
||||
}
|
||||
|
||||
$('div[data-type="show"]').on('click', unghost);
|
||||
}
|
||||
addPickButton();
|
||||
const observer = new MutationObserver(addPickButton);
|
||||
observer.observe(document.head.parentElement, {childList: true});
|
||||
|
||||
$('div[data-type="show"]').on('click', function () {
|
||||
$(this).removeClass('sortable-ghost');
|
||||
});
|
||||
|
||||
let watched_shows;
|
||||
|
||||
function getWeightedIndex(total) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue