Skip to content
Permalink
Browse files

Fix export to mal feature #16

  • Loading branch information...
Glagan committed Oct 30, 2019
1 parent 110481c commit df8fd62588d9e472a371cfdcf1c23d87aba6274a
Showing with 5 additions and 5 deletions.
  1. +1 −1 build.js
  2. +1 −1 scripts/defaultOptions.js
  3. +1 −1 scripts/myMangaDex.js
  4. +2 −2 scripts/optionsManager.js
@@ -12,7 +12,7 @@ const [,, ...args] = process.argv;
let manifest = {
manifest_version: 2,
name: "MyMangaDex",
version: "2.3.5",
version: "2.3.6",
author: "Glagan",

description: "Automatically update your MyAnimeList manga list when reading on MangaDex.",
@@ -43,5 +43,5 @@ let defaultOptions = {
isLoggedIn: false,
token: "",
version: 2.3,
subVersion: 5
subVersion: 6
};
@@ -1274,7 +1274,7 @@ class MyMangaDex {
this.manga.name = document.querySelector("h6.card-header").textContent.trim();
this.manga.mangaDexId = /.+title\/(\d+)/.exec(this.pageUrl);
// We always try to find the link, in case it was updated
let myAnimeListUrl = document.querySelector("img[src$='/mal.png'");
let myAnimeListUrl = document.querySelector("img[src$='/mal.png']");
if (myAnimeListUrl !== null) {
// Finish getting the mal link
myAnimeListUrl = myAnimeListUrl.nextElementSibling.href;
@@ -621,7 +621,7 @@ class OptionsManager {
};
// Scan the manga page for the mal icon and mal url
let mangaName = content.querySelector("h6.card-header").textContent.trim();
let myAnimeListURL = content.querySelector("img[src='/images/misc/mal.png'");
let myAnimeListURL = content.querySelector("img[src$='/mal.png']");
if (myAnimeListURL !== null) {
myAnimeListURL = myAnimeListURL.nextElementSibling;
manga.myAnimeListId = parseInt(/https:\/\/myanimelist\.net\/manga\/(\d+)/.exec(myAnimeListURL.href)[1]);
@@ -739,7 +739,7 @@ class OptionsManager {
chapters: []
};
// Scan the manga page for the mal icon and mal url
let myAnimeListURL = content.querySelector("img[src='/images/misc/mal.png'");
let myAnimeListURL = content.querySelector("img[src$='/mal.png']");
if (myAnimeListURL !== null) {
myAnimeListURL = myAnimeListURL.nextElementSibling;
current.mal = parseInt(/https:\/\/myanimelist\.net\/manga\/(\d+)/.exec(myAnimeListURL.href)[1]);

0 comments on commit df8fd62

Please sign in to comment.
You can’t perform that action at this time.