Jump to content

Primary: Sky Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Secondary: Sky Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Squares Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Photo

Broken Compatibility with All Mangas Reader (AMR) extension


  • Please log in to reply
46 replies to this topic

#1
HimekoTachibana

HimekoTachibana

    Potato Spud

  • Members
  • 17 posts

So with all the new changes to the website, Batoto is now no longer working, as far as I can tell, with All Mangas Reader. 

 

http://allmangasreader.com/

https://github.com/AllMangasReader-dev/AMR

 

Is there a way to make it compatible again or are my options limited?


Edited by HimekoTachibana, 23 October 2015 - 07:14 PM.


#2
OMGWTFBBQPONIES

OMGWTFBBQPONIES

    Equine non grata

  • Members
  • 3,853 posts
  • LocationSan Escobar

So with all the new changes to the website, Batoto is now no longer working, as far as I can tell, with All Mangas Reader.
(...)
Is there a way to make it compatible again or are my options limited?

Not surprising.

Ask the author if he can update it, Batoto is in no way related to and can't help with 3rd party apps/extensions.

Mod-in-Disguise

FlQCNQa.gif

 
 

You <3

Whoever decided to delete this was an idiot.

| Handwritten kanji recognition || KanjiTomo || Kanji converter || J<->E Dictionary |


#3
HimekoTachibana

HimekoTachibana

    Potato Spud

  • Members
  • 17 posts

Not surprising.

Ask the author if he can update it, Batoto is in no way related to and can't help with 3rd party apps/extensions.

Well... unfortunately seeing as how the official forums are dead and there hasn't been an update on the github for the past 5 months I think it's safe to say I'm screwed in using Batoto. All this change will do is force me to switch to other websites because of how inconvenient it's become now. The lack of preloading and one-page display is extremely aggravating and the RSS updates being broken doesn't help at all. I use AMR for preloading, one-page display, and notifications whenever new chapters are released so my hand is really being forced right now... sigh. I need a drink.


Edited by HimekoTachibana, 23 October 2015 - 07:44 PM.


#4
101010

101010

    Couch Potato

  • Retired Mods
  • 3,043 posts

I understand that this is a moment of great inconvenience for HimekoTachibana-san and many other users, but I would still like to interject for a moment. It came to my attention that the web browser extension in question, ``All Mangas Reader'' (by the by, the plural of 漫画, when transliterated, has no s at the end) uses the harmful software Google Chrome, which is very well known to be a proprietary browser with a universal back door or in other words -- a botnet. It's a malicious piece of software, operated by an even more malicious corporation. Sadly, the open-source variant is just as harmful, and even recently it was caught ``calling home sending unknown data'': https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=792580


The opinions expressed by this user are solely their own and do not express the views of Batoto and its staff.


#5
aviar

aviar

    Fingerling Potato

  • Members
  • 64 posts

I don't program in JS and much less have experience in JQuery, but I'm taking a look at it. For the most part, some of the Batoto mirror functionality still works (searching for manga), and the code for said mirror is freely available at:
 
https://github.com/AllMangasReader-dev/mirrors/blob/master/Batoto.js
 
which means that theres no need to write one from scratch, just update the existing one. Theres also the developer documentation which covers how to add a new mirror (Development tab in AMR extension). The biggest hurdle appears to actually be getting the new mirror to work since the documentation appears to be outdated (makes a reference to a nonexistent JSON object in mgEntry.js?) so using a local mirror isn't directly evident. The only -obvious- option would be to add the mirror to the repository from which the plugin fetches, which would mean contacting the developer to either accept a push to git or add it to the homesites repository. As for the codebase, it doesn't appear all that complex, mostly iterators and jquery selectors.
 
It's important to note that if one pursues the route of editing Batoto.js and trying to use it locally (without having it uploaded to repo or git), then it will be necessary to also checkout the AMRs project source at:
 
https://github.com/AllMangasReader-dev/AMR
 
And run it as a local plugin using Chromes/Chromiums developer mode. Packaging it as a extension and distributing it may also be an option, but that lies beyond my current knowledge.
 
 
October 23, 2015
 
Looking at how it fetches it's mirror lists, it would appear that the software now actually works exclusively with the remote mirrors listed in their website.json. The particular points which make this evident is the call to the JSON file on line 64 of mgEntry.js, verbatim:
 

$.ajax({
  url : amrc_repository + "websites.json",
  success : function (resp) {
    var ws = resp,
             i;
   for (i = 0; i < ws.length; i += 1) {
      console.log("Load JS from repository for " + ws[i].mirrorName);
      loadJSFromRepository(ws[i]);
  }
  waitForFinishRepository(ws, callback);
},

and yet again when the JSON object is used to build a URL pointing to an external JS resource to be retrieved in loadJSFromRepository:
 

function loadJSFromRepository(description) {
  "use strict";
  //New way (CSP with manifest 2) --> store link to js on https to include when needed...
  description.jsCode = amrc_repository + description.jsFile;
  console.log("insert or update " + description.mirrorName + " in database");
  amrcsql.webdb.storeWebsite(description, function () {
    description.loaded = true;
  });
}

 

Seeing as theres no fallback for scanning local directories for such a file, it would appear that ones mission, should they choose to accept it, would be to add a condition for the existence of a local repository of mirrors. After that, they would be able to start with the actual work of upgrading the batoto mirror.

 

It's also interesting to note that should the GET for the website.json file on the home site fail, the fallback on the github site will fail inconditionally due to the fact that the 'amrc_repository = amrc_repository_backup;' on line 124, together with the string concatenation 'amrc_repository + "websites.json?1",' on line 129 will lead to the inexistent content pointed to by the URL 'https://raw.github.com/AllMangasReader-dev/mirrors/master/website.json?1'.

 

One possible solution to resolving the website.json problem is to add an option to ad an open file dialog on the Supported Websites tab, then insert the content therein into the webdb instance by creating a amrcObject to be used in conjuntion with the storeWebsite() call in amrcsql.js. Afterward it would reload the website listing by refreshing the page.\

 

October 24, 2015

 

HTML text is stored in messages.json. Each text is associated with HTML through the u18n attribute in the HTML elements tag. Therefore to add a front-end element one would edit the appropriate HTML file (each navbar entry has an appropriately named HTML file, eg: Options is options.html), using the u18n tag with a unique identifier for any text to be displayed (the HTML is essentially just structure). Afterwards the appropriate text would be placed in messages.json in the _locales folder with the following format:

"u18n_id" : {

    "message": "",

    "description": ""

},

 

where u18n_id is the value used for the u18n attribute in the HTML file.

 

Did a diff (NOTE: URL is only valid for a month) of the manga reader HTML provided by Himena here with the HTML of the same manga page but with the new reader (left-hand side is old page, right-hand side new page). Immediately noticeable is the lack of the 'moderation_bar rounded clear' and associated elements. This (sub)string and the (associated?) select-options structure appears to be part of infrastructure upon which  Batoto.js is based (lines 65, 74, 90, 91, and 194 of Batoto.js). 

 

Not sure what is up with the constant use of objResponse.repalce( /<img/gi, '<noload'). There doesn't appear to exist a noload tag in HTML, and I don't understand what purpose removing/invalidating a img tag could serve.

 

New Batoto reader appears to be based on editing the DOM using JQuery, and some sort of hashing sprinkled in.  So it's not actually that the HTML structure isn't there, it's that its there only at runtime. That means just loading the content at the URL is not enough, one has to execute (parse? interpret? Don't know what word to use) it as well. Another possibility is that the page IS being loaded and executed, but that the content being displayed is simply the 'No content selected' page due to the window.location.hash property. EDIT: Read around a bit and it _appears_ that the AJAX call will not evaluate the Javascript within an element as per this question on StackOverflow.

 

The new Batoto readers readerVerify(n) function is just the Fibonacci sequence. It also redefines the window.alert() function to an empty one, thus suppressing it.

 

Here iss a function that you can use in your web-browsers JavaScript console to get the HTML that is added during run-time (It's just the readers JS code with a different return value so you can actually see it):

Quote

function loadReader() {
    if (window.location.hash.length <= 1) return false;
    var split = window.location.hash.substring(1).split('_');
    var id = '';
    var page = '1';
    var suppress = '';
    if (split.length === 0) {
        return false;
    } else if (split.length >= 2) {
        page = split[1];
        if (split.length === 3) {
            suppress = '&supress_webtoon=' + split[2];
        }
    }
    id = split[0];
 
    jQuery.get("/areader?id=" + id + "&p=" + page + suppress, function (data) {
        console.log(data);
    });
}

 

 

That means that the important thing for retrieving the -complete- HTML from Batoto is to run the page in a context where window.location.hash is set to the appropriate value, in this case, the one that appears in your URL when you load the manga.

 

October 27, 2015

 

I'll update this post as I review the code. If I get anything real done I'll be sure to share.

 

P.S.: Sorry for the really slow progress, I'm not all that great with web technology, and easily distracted v_v


Edited by aviar, 25 October 2015 - 04:56 AM.

I have come to warn you of the things beyond the wall and the men behind the machines.


#6
HimekoTachibana

HimekoTachibana

    Potato Spud

  • Members
  • 17 posts

I'll update this post as I review the code. If I get anything real done I'll be sure to share.

 

Thank you!

 

If you need to see how AMR is supposed to react, it works perfectly with older URLs such as http://vatoto.com/read/_/351749/tomo-chan-wa-onna-no-ko_ch185_by_love-live-scanlations but newer URLs such as bato.to/reader#d5c29d1b10583a62 do not work at all with it.


Edited by HimekoTachibana, 24 October 2015 - 03:19 PM.


#7
HimekoTachibana

HimekoTachibana

    Potato Spud

  • Members
  • 17 posts

I would like to request you guys stay on topic as this is a Support thread, not a Rant or General Discussions thread. Thank you!



#8
Racky

Racky

    Potato Spud

  • Members
  • 27 posts

But as it was said earlier it has nothing to do with Batoto actually. It's a 3rd party app which is no way related to it.



#9
HimekoTachibana

HimekoTachibana

    Potato Spud

  • Members
  • 17 posts

But as it was said earlier it has nothing to do with Batoto actually. It's a 3rd party app which is no way related to it.

Just because a third party app is not developed by the same people who run Batoto does not mean they do not care about the users who utilize said third party apps to browse their website. Why would you want to alienate your userbase? You're not a developer, nor an administrator to this website so why do you care about a support thread on a topic that may not impact you personally, but impacts me and perhaps several other users?

 
Do unto others as you would have them do unto you. Be helpful or respectfully leave this thread. Thank you in advance.

Edited by HimekoTachibana, 25 October 2015 - 02:04 AM.


#10
aviar

aviar

    Fingerling Potato

  • Members
  • 64 posts

Well it appears it may be easier than originally thought to make the AMR work with Batoto again. The changes that Batoto introduced into the static HTML page removed the data AMR depended on, but the final DOM structure of the pages seems to be similar enough. I've been talking with sneezemonkey  and it's sufficiently simple to retrieve the necessary HTML, a proof-of-concept has been written and tested, if something so simple could even be considered as such. I haven't actually programmed anything into AMR yet </3 but it may be possible to use what's already there in it's entirety, all that's necessary is to correct how it retrieves the HTML, though that's just me speculating.

 

Please keep in mind I will just keep editing my first post in this thread with new developments as I go along, this post is just to show that I am still working on this.


Edited by aviar, 25 October 2015 - 05:39 AM.

I have come to warn you of the things beyond the wall and the men behind the machines.


#11
sneezemonkey

sneezemonkey

    Potato

  • Members
  • 122 posts

Herro everybody!!!!

 

I thought I'd might as well drop by. I'd just like to point out that my method is slower than AJax. It however works. You just need to delay the script until the page has loaded everything first. If anyone can figure out how to get Ajax working pls PM me.


Edited by sneezemonkey, 25 October 2015 - 05:29 AM.

Tired of halved double page spreads? Want to read manga like an actual tankoubon? Just want to load all pages in a chapter at once?

Try Manga OnlineViewer Fluid Mode+ Now!!!!


#12
HimekoTachibana

HimekoTachibana

    Potato Spud

  • Members
  • 17 posts

Well it appears it may be easier than originally thought to make the AMR work with Batoto again. The changes that Batoto introduced into the static HTML page removed the data AMR depended on, but the final DOM structure of the pages seems to be similar enough. I've been talking with sneezemonkey  and it's sufficiently simple to retrieve the necessary HTML, a proof-of-concept has been written and tested, if something so simple could even be considered as such. I haven't actually programmed anything into AMR yet </3 but it may be possible to use what's already there in it's entirety, all that's necessary is to correct how it retrieves the HTML, though that's just me speculating.

 

Please keep in mind I will just keep editing my first post in this thread with new developments as I go along, this post is just to show that I am still working on this.

Thanks a lot for all your hard work! If nothing pans out then I won't hold it against you, it's just great to see someone work on (or attempt to) my favorite extension. Sincerely, I appreciate it so much.

 

 

Oh, hey i came here to read what problem you had. Then seen it's nothing serious and  you can actualy use batoto "follows" to have neat colllection of fresh updates. Then *BAM* i see mi4tom (who created account just for this) threatening that he will leave batoto for "some other reader". If you (or him) would read reasons for last changes in batoto you would see it's people like him that are part of the problem.
 

Oh, brilliant idea, because i obviously read japanese, and i wasn't talking about editing, translation etc. TYI i buy manga which is translated in my country, and sometimes i found them worse than fanscanlations. I'm not a "good pirate"(whatever you think it means), i just care for those paying for servers and not using too much ads. Kids this day should remember that sites are not "magically inserted into internet". Somebody pay for servers, and if he will stop doing that it will dissapear (with some other manga aggregators leeching from it). You shouldn't threaten him or spit on him, he's the good guy. So think before you write something.

I honestly don't know why you seem to want to lump me with him. You have been extremely rude and have a preconceived bias that anyone who has a support thread that doesn't fall into your category of "approved topics" doesn't deserve support. I have read why the changes take place and I haven't complained for them to be reverted at all. If you actually paid attention or read the thread in the first place you would have understood that. I never once asked mi4tom to create an account and post on this thread, he did it in his own device because he has the same exact issue as I do.

 

You seriously need to be more respectful instead of constantly talking down everyone otherwise no one will take you seriously. You keep trying to bait us into these long-winded, thread derailing conversations with you and I'm frankly sick of it. I'm done responding to your posts so I reported you, it's up to the mods whether they believe you have broken Rule 3 or Rule 4 or both. Have a good day.


Edited by HimekoTachibana, 25 October 2015 - 12:20 PM.


#13
seyrine

seyrine

    Unemployed Kitty In A Penguin Suit

  • Administrators
  • 1,830 posts
  • LocationLurking nearby...

Please keep all discussions civil. It's ok to give a dissenting opinion as long as you're respectful about it. Likewise, all opinions are valid no matter how contrary they are to your own. Just keep arguments on level heads and everything is fine.

 

As for third-party extensions/apps/etc. Batoto's stance is neutral. We will neither encourage nor hinder their development UNLESS they pose a threat to the site and its members. We reserve the right to throttle or block apps/extensions that actively gives us headaches. That's partly the reason why the changes were made in the first place. Also, all responsibility of maintaining the extension/app remains solely on the author.   


Catch my story; the Neverender Series

Batoto's Rules Repository | Rules, Guidelines and FAQs

Rules and Regulations | How to get help | Frequently Asked Questions

If all else fails, PM me. And use the REPORT button if you see any content that may violate site policy.

Catch me on irc.idlechat.net (#seyrine) and D.F.T.B.A.!


#14
GodricKharg

GodricKharg

    Fingerling Potato

  • Contributor
  • 87 posts
  • LocationNorth of Niagara Falls... Someplace...

Please keep all discussions civil. It's ok to give a dissenting opinion as long as you're respectful about it. Likewise, all opinions are valid no matter how contrary they are to your own. Just keep arguments on level heads and everything is fine.
 
As for third-party extensions/apps/etc. Batoto's stance is neutral. We will neither encourage nor hinder their development UNLESS they have pose a threat to the site and its members. We reserve the right to throttle or block apps/extensions that actively gives us headaches. That's partly the reason why the changes were made in the first place. Also, all responsibility of maintaining the extension/app remains solely on the author.


Quick question, will there be a thread somewhere to indicate which third party extensions, mobile readers HAVE a blocked levelled against them so we know easily if we should hound the developer to either fix it or decide to find a new one to use?
I write fanfiction
https://www.fanfiction.net/~godrickharg
3 SEKIREI stories
1 Nisekoi short oneshot
1 freezing x Sekirei crossover

#15
svines85

svines85

    Sweet Potato

  • Contributor
  • 14,063 posts
  • Locationunderground like a wild potato

I see Manga Viewer, an extension for chrome that enables long-strip format, is back to working on batoto again. I personally only have it for webtoons on sites other than batoto that don't have their own LS reader.....but yeah, it'll do that on whatever/wherever if you're looking for one that's working and being kept current  :)

 

 

https://chrome.google.com/webstore/detail/manga-viewer/bebalkdfejapnfbngpmhchkboajaofen?hl=en-US


Tn7HA0h.png


#16
aviar

aviar

    Fingerling Potato

  • Members
  • 64 posts

I've been wondering, how do people use mobile readers? Are they separate applications from the browser, or simply extensions to the browser?


I have come to warn you of the things beyond the wall and the men behind the machines.


#17
Qaaz

Qaaz

    Potato Sprout

  • Contributor
  • 7 posts
  • LocationGreece

I use both AMR and Manga Viewer, while the non working AMR and new reader of Batoto is a problem I'm ok with it b/c MV also helps me with notifications but if someone can fix that would be great



#18
HimekoTachibana

HimekoTachibana

    Potato Spud

  • Members
  • 17 posts

Just an update to all that are affected, the old URLs are officially RIP. http://i.imgur.com/AYWHaq9.png

 

Grumpy's update: https://vatoto.com/forums/topic/23739-suggestion-to-rewrite-old-urls-to-the-new-reader-urls-to-help-us-update-the-links-we-shared/#entry1652061


Edited by HimekoTachibana, 26 October 2015 - 01:07 AM.


#19
sneezemonkey

sneezemonkey

    Potato

  • Members
  • 122 posts

Okay I thought I'd post an update. After much discussion with Aviar, It appears we might be able to clear the final hurdle(s) <<<< He set himself another hurdle for your benifit if he succeeds. Once Aviar can confirm this (I don't use Chrome),then the update should come Soontm.

 

Also as an added plus with current method (assuming it works), you can make your own mirror.js files and don't need to worry about waiting for updates if you can be bothered.

 

In any case, we know how to change the scripts so that it knowns what to do when visiting Batoto, now it's just a matter getting it to load the file to tell it what to do.


Tired of halved double page spreads? Want to read manga like an actual tankoubon? Just want to load all pages in a chapter at once?

Try Manga OnlineViewer Fluid Mode+ Now!!!!


#20
aviar

aviar

    Fingerling Potato

  • Members
  • 64 posts

Sorry about the lack of news, will try to work more time into this during the week but no promises. Had insomnia yesterday and played around a bit with local loading of mirrors, though there appears to be some security restrictions on accessing local files. Seems that one can only access files in the extensions sandbox, which isn't ideal since the path isn't user-friendly. I have read elsewhere, however, that an extension may load a file from the filesystem if it is done through some sort of user intervention. Anyways, thats about where I am at.


Edited by aviar, 29 October 2015 - 12:09 AM.

I have come to warn you of the things beyond the wall and the men behind the machines.