✨ Move picked show to top
This commit is contained in:
parent
6941f880ae
commit
941da9e4eb
1 changed files with 3 additions and 2 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Trakt Show Picker
|
// @name Trakt Show Picker
|
||||||
// @namespace danielrayjones
|
// @namespace danielrayjones
|
||||||
// @version 0.0.1
|
// @version 0.0.2
|
||||||
// @description Pick a show from progress page
|
// @description Pick a show from progress page
|
||||||
// @author Dan Jones
|
// @author Dan Jones
|
||||||
// @match https://trakt.tv/users/*/progress*
|
// @match https://trakt.tv/users/*/progress*
|
||||||
|
|
@ -37,9 +37,10 @@
|
||||||
$shows = filterShows($shows);
|
$shows = filterShows($shows);
|
||||||
|
|
||||||
let picked = Math.floor(Math.random() * $shows.length);
|
let picked = Math.floor(Math.random() * $shows.length);
|
||||||
|
let $picked = $shows.eq(picked);
|
||||||
|
|
||||||
$shows.addClass('sortable-ghost');
|
$shows.addClass('sortable-ghost');
|
||||||
$shows.eq(picked).removeClass('sortable-ghost');
|
$picked.removeClass('sortable-ghost').insertAfter($picked.parent().find('.pagination-top'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue