Skip to content

Commit

Permalink
Merge pull request #214 from StoPlay/213-radiogarden-doesnt-work
Browse files Browse the repository at this point in the history
Fix radio.garden
  • Loading branch information
beshur authored Nov 1, 2022
2 parents 18c753e + 84ea8fa commit 82f37c3
Showing 1 changed file with 4 additions and 21 deletions.
25 changes: 4 additions & 21 deletions src/content/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class Provider {

case "radio.garden":
artistName = safeGetElementTextContentByQuery(
".channel-list-item-name-container"
"[class*='channel'] [class*='titleContainer'] [class*='title']:not([class*='subtitle'])"
);
break;

Expand Down Expand Up @@ -506,10 +506,7 @@ class Provider {
break;

case "radio.garden":
selectorQuery = ".icon-toggle.mod-mute .icon-button.mod-sound";
playerPauseButton = document.querySelector(selectorQuery);

status = playerPauseButton ? Status.PLAYING : Status.PAUSED;
status = new ElementExistsStatus("[class*='controlsContainer'] [aria-label='stop']").getStatus();
break;

case "somafm.com":
Expand Down Expand Up @@ -715,14 +712,7 @@ class Provider {
break;

case "radio.garden":
selectorQuery = ".icon-toggle.mod-mute .icon-button.mod-sound";
playerPauseButton = document.querySelector(selectorQuery);

if (!playerPauseButton) {
return;
}

playerPauseButton.click();
new ElementClickControl("[class*='controlsContainer'] [aria-label='stop']").evaluate();
break;

case "somafm.com":
Expand Down Expand Up @@ -934,14 +924,7 @@ class Provider {
break;

case "radio.garden":
selectorQuery = ".icon-toggle.mod-mute .icon-button.mod-muted";
playerPlayButton = document.querySelector(selectorQuery);

if (!playerPlayButton) {
return;
}

playerPlayButton.click();
new ElementClickControl("[class*='controlsContainer'] [aria-label='play']").evaluate();
break;

case "somafm.com":
Expand Down

0 comments on commit 82f37c3

Please sign in to comment.