Skip to content

Commit 21d9def

Browse files
authored
Update imdb anchor element to reflect imdb dom change (#36)
* Update imdb anchor element to reflect imdb dom change Nothing crazy. Just updated the imdb anchor element * fixed rt as well * Fixed Plex discover * Remove console log used for testing
1 parent 51ceb53 commit 21d9def

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

css/style.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
text-decoration: none;
4747
}
4848

49+
.oa-plex-left-margin{
50+
margin-left: 40px;
51+
}
52+
4953
.oa-text-sm {
5054
font-size: 0.875rem;
5155
line-height: 1.25rem;

js/content-scripts/imdb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
let overseerrContainer, imdbId, tmdbId, mediaType, mediaInfo;
22

3-
containerOptions.anchorElement = `div.sc-25d7db5-5`;
3+
containerOptions.anchorElement = `div.sc-cd562886-5`;
44
containerOptions.textClass = 'oa-text-sm';
55
containerOptions.containerClass = 'oa-mt-2 oa-py-2';
66
containerOptions.badgeBackground = '#313131';

js/content-scripts/plex.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
let overseerrContainer, tmdbId, mediaType, mediaInfo;
22

3-
containerOptions.anchorElement = 'div.PrePlayActionBar-prePlayContainer-od_bro';
4-
containerOptions.containerClass = 'oa-mb-3 oa-py-2';
3+
containerOptions.anchorElement = 'div.PrePlayMetadata-container-ud0cxN';
4+
containerOptions.containerClass = 'oa-mb-3 oa-py-2 oa-plex-left-margin';
55
containerOptions.badgeBackground = '#00000099';
66

77

@@ -10,10 +10,10 @@ function isHashValid(hash) {
1010
}
1111

1212
function arrangeMargins() {
13-
waitForElm('div.PrePlayActionBar-prePlayContainer-od_bro').then((elm) => {
13+
waitForElm('div.PrePlayMetadata-container-ud0cxN').then((elm) => {
1414
$(elm).css({'margin-bottom': '10px'});
1515
});
16-
waitForElm('div.PrePlayAvailabilityList-hub-lEPTuG').then((elm) => {
16+
waitForElm('div.PrePlayMetadata-container-ud0cxN').then((elm) => {
1717
$(elm).css({'margin-top': '20px'});
1818
});
1919
}
@@ -44,8 +44,8 @@ function getMediaKey() {
4444
function processPage() {
4545
if (overseerrContainer) overseerrContainer.remove();
4646

47-
waitForElm('div.PrePlayDetailsContainer-container-jKUfR_').then(() => {
48-
waitForElm('div.ImagePoster-flex-Ry0HC5 > img').then(() => {
47+
waitForElm('div.PrePlayMetadata-container-ud0cxN').then(() => {
48+
waitForElm('div.PrePlayMetadata-container-ud0cxN img').then(() => {
4949
initializeContainer();
5050
insertSpinner();
5151
arrangeMargins();

js/content-scripts/rottentomatoes.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ mediaType = document.location.pathname.startsWith('/m') ? 'movie' : 'tv';
1010

1111
let title = '';
1212
if (mediaType === 'tv') {
13-
containerOptions.anchorElement = 'div.tv-series__top-section';
14-
title = $('h1.mop-ratings-wrap__title').text();
13+
containerOptions.anchorElement = 'section#topSection';
14+
title = $('#scoreboard h1.title').text();
1515
} else {
16-
title = $('h1.scoreboard__title').text();
16+
title = $('#scoreboard h1.title').text();
1717
}
1818

1919
if (title) {

0 commit comments

Comments
 (0)