Skip to content

Commit

Permalink
fix: now "Open Player" button is added even if c-info-right is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Malanavi committed Jan 6, 2024
1 parent 016b06e commit 25b9bb6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Watch and download on Shikimori",
"version": "3.0.4",
"version": "3.0.5",

"description": "The addon adds the ability to watch and download anime on the Shikimori website.",
"icons": {
Expand Down
2 changes: 1 addition & 1 deletion manifest.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// @icon https://raw.github.com/Malanavi/Watch-and-download-on-Shikimori/main/images/icons/logo128.png
// @author Malanavi
// @homepageURL https://github.com/Malanavi/Watch-and-download-on-Shikimori
// @version 3.0.4
// @version 3.0.5
// @copyright 2023, Malanavi
// @license GPL-3.0-or-later; https://www.gnu.org/licenses/gpl-3.0.txt

Expand Down
7 changes: 4 additions & 3 deletions scripts/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ class Player {

const button = this.#createOpenButton(nameOfAnime, animeId);

const beforeForButton = document.querySelector(".c-info-right .block:last-child");

Helpers.insertAfter(button, beforeForButton);
const cInfoRight = document.querySelector(".c-info-right");
if (cInfoRight) {
cInfoRight.appendChild(button);
}
}
}

Expand Down

0 comments on commit 25b9bb6

Please sign in to comment.