Skip to content
This repository has been archived by the owner on Aug 1, 2019. It is now read-only.

Commit

Permalink
Fixed MangaRock.js userscript
Browse files Browse the repository at this point in the history
Fixed selectors to work with the new MangaRock redesign
  • Loading branch information
c0d3rman authored and DakuTree committed May 6, 2019
1 parent 0ec319c commit ceecf56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/userscripts/sites/MangaRock.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
//this.page_count = $('.list-switcher-2 > li > select[name=category_type]').get(0).length;
this.title = this.segments[2].substr(10);
let chapterID = this.segments[4].substr(12);
this.chapter = chapterID + ':--:' + $('div[data-test="reader-manga-name"] + div select > option:selected').text().replace(/^(.*?):.*?$/, '$1').replace(/Chapter /g, 'c').replace(/Vol\.([0-9]+) /, 'v$1/').trim();
this.chapter = chapterID + ':--:' + $(`a[href="/manga/mrs-serie-${this.title}"] + div select > option[value=mrs-chapter-${chapterID}]`).text().replace(/^(.*?):.*?$/, '$1').replace(/Chapter /g, 'c').replace(/Vol\.([0-9]+) /, 'v$1/').trim();

this.title_url = `${this.https}://mangarock.com/manga/mrs-serie-${this.title}`;
this.chapter_url = `${this.title_url}/chapter/mrs-chapter-${chapterID}`;

let tempList = window.generateChapterList($('div[data-test="reader-manga-name"] + div select:first > option'), 'value');
let tempList = window.generateChapterList($(`a[href="/manga/mrs-serie-${this.title}"] + div select > option`), 'value');
this.chapterList = Object.keys(tempList).reduce(function(result, key) {
result[`${_this.title_url}/chapter/${key}`] = tempList[key];
return result;
Expand Down

0 comments on commit ceecf56

Please sign in to comment.