Skip to content

Commit

Permalink
Fix Recently Added page appearing blank (Close #17)
Browse files Browse the repository at this point in the history
The error on the Recently added page changed again. The page is changing
after the recently added page is built which wipes it out and leaves a
blank page. Changed page detection to be based on error-page-wrapper
element because it loads last.
  • Loading branch information
patrickmaher committed Nov 11, 2021
1 parent 8a16919 commit 42e3975
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Enhanced RT.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ ready('.vjs-upnext', function(element) {
}
});

ready('.persistent-player', function(element) {
ready('.error-page-wrapper', function(element) {
if(window.location.pathname.search("/watch/recently-added") >= 0)
{
//console.log("Enhanced RT: Recently Added Page Detected");
Expand All @@ -323,7 +323,7 @@ ready('.persistent-player', function(element) {
element.remove();

// Remove video player error
document.getElementsByClassName("episode-content")[0].remove();
document.getElementsByClassName("persistent-player")[0].remove();

// Only check Auto Play Next Video preference if user is logged in
if(document.cookie.indexOf("rt_access_token=") != -1)
Expand Down

0 comments on commit 42e3975

Please sign in to comment.