Support trakts new compressed cache
This commit is contained in:
parent
490d61745e
commit
d1662494c3
2 changed files with 16 additions and 4 deletions
|
|
@ -91,8 +91,13 @@
|
|||
|
||||
function getStuff() {
|
||||
|
||||
watched_shows = JSON.parse(localStorage.watched_shows);
|
||||
watched_movies = JSON.parse(localStorage.watched_movies);
|
||||
if ('compressedCache' in window) {
|
||||
watched_shows = compressedCache.get('watched_shows');
|
||||
watched_movies = compressedCache.get('watched_movies');
|
||||
} else {
|
||||
watched_shows = JSON.parse(localStorage.watched_shows);
|
||||
watched_movies = JSON.parse(localStorage.watched_movies);
|
||||
}
|
||||
|
||||
let $el = $('<a>');
|
||||
$(document.body).append($el);
|
||||
|
|
|
|||
|
|
@ -23,8 +23,15 @@
|
|||
|
||||
let since = parseInt(query.since, 10);
|
||||
|
||||
let watched_shows = JSON.parse(localStorage.watched_shows);;
|
||||
let watched_movies = JSON.parse(localStorage.watched_movies);
|
||||
let watched_shows;
|
||||
let watched_movies;
|
||||
if ('compressedCache' in window) {
|
||||
watched_shows = compressedCache.get('watched_shows');
|
||||
watched_movies = compressedCache.get('watched_movies');
|
||||
} else {
|
||||
watched_shows = JSON.parse(localStorage.watched_shows);
|
||||
watched_movies = JSON.parse(localStorage.watched_movies);
|
||||
}
|
||||
|
||||
$('[itemtype="http://schema.org/TVEpisode"], [itemtype="http://schema.org/Movie"]').each(function () {
|
||||
let type = $(this).attr('itemtype').replace(/^https?:\/\/schema.org\//, '');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue