All Mangas Reader

Discuss the extension, report bugs and request new features.
It is currently Tue Nov 21, 2017 5:09 pm

All times are UTC




Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Oct 05, 2012 12:13 am 
Offline
AMR Hero

Joined: Fri Apr 27, 2012 5:10 pm
Posts: 586
Location: A Town far from you
mexicano21 wrote:
Good to know, I'm not going to restart my browser (I use dev too) until it works again...

Mmm... seems like us have to give a check out to http://developer.chrome.com/extensions/ ... rsion.html and update the mirrors, so we don't use the eval function anymore (we have to use another method for the FoolSlide mirrors, I don't remember another site using it), and the main script to get rid of inline functions in html pages and eval functions in the scripts, also the community site must have to use https since the scripts will only be allowed to load in this way. This was discussed with Polo already, so don't bug him... not yet.

_________________
Know about me here


Top
 Profile  
 
PostPosted: Fri Oct 05, 2012 1:35 am 
Offline
User avatar

Joined: Sun Sep 25, 2011 5:36 am
Posts: 93
I'm pretty sure it's possible to use JSON.parse() in any place we use eval() in mirror scripts today.


Top
 Profile  
 
PostPosted: Fri Oct 05, 2012 2:42 am 
Offline
User avatar

Joined: Sun Sep 25, 2011 5:36 am
Posts: 93
I changed this line:

Code:
eval($(div).html().match(/var pages = .*$/m)[0]);


by that:

Code:
var pages = JSON.parse($(div).html().match(/var pages = .*$/m)[0].replace(/^[^[]*|;$/, ''));


on Redhawkscans' getListImages(), and it's working just fine.


Top
 Profile  
 
PostPosted: Fri Oct 05, 2012 2:52 am 
Offline
AMR Hero

Joined: Fri Apr 27, 2012 5:10 pm
Posts: 586
Location: A Town far from you
Ohh... and I came with a solution that works in all FoolSlides-based sites but RHS -_-.

Code:
  getListImages : function (doc, curUrl) {
    res = []
    plength = pages.length
      for (i = 0; i < plength; i++) {
        res.push(pages[i].url);
      },
  },


Add: Umm... your code don't work with previous (and fully functional) mirrors based on Foolslide. It's that it only works on the actual RHS script?

_________________
Know about me here


Last edited by braiam on Fri Oct 05, 2012 3:11 am, edited 1 time in total.
Adding tests


Top
 Profile  
 
PostPosted: Fri Oct 05, 2012 3:28 am 
Offline
User avatar

Joined: Sun Sep 25, 2011 5:36 am
Posts: 93
Maybe. I only tested on RHS so far. If you found a solution for all other FoolSlide mirrors better yet. Also, I think I finally solved the keydown and page resize bugs on RHS.


Top
 Profile  
 
PostPosted: Fri Oct 05, 2012 5:24 am 
Offline
AMR Hero

Joined: Fri Apr 27, 2012 5:10 pm
Posts: 586
Location: A Town far from you
mexicano21 wrote:
Btw, despite my volition, my notebook just bluescreened on me, so I restarted it all and my browser updated. I have 24.0.1284.2 there now and everything is working fine.

:lol: BSOD and problem resolved, that was good. The JSON thingy don't seems to work on the others scripts. It only works on ajax, or I'm making some mistake in the way?

_________________
Know about me here


Top
 Profile  
 
PostPosted: Sat Oct 06, 2012 4:31 am 
Offline
User avatar

Joined: Sun Sep 25, 2011 5:36 am
Posts: 93
It works on any well formatted JSON string. Sometimes this is tricky, but without eval is the way to go whenever possible. I'm going to make some more tests.


Top
 Profile  
 
PostPosted: Wed Oct 17, 2012 3:09 pm 
Offline
AMR Hero
User avatar

Joined: Tue May 24, 2011 8:30 am
Posts: 825
Cool! Sounds like you've almost got a universal code for any FoolSlide mirror!

_________________
Image


Top
 Profile  
 
PostPosted: Wed Oct 17, 2012 4:36 pm 
Offline
User avatar

Joined: Sun Sep 25, 2011 5:36 am
Posts: 93
Yeah, basically I change the urls and test. All FoolSlide scripts are the same. I only need to make some change when the site changes its layout, but that's still a minor change. The other change is when the site doesn't list all mangas in one page and then I need to use the search function, but that's already covered too, I only need to choose the list or search version of script in the beginning.


Top
 Profile  
 
PostPosted: Wed Nov 14, 2012 9:50 pm 
Offline
AMR Hero

Joined: Fri Apr 27, 2012 5:10 pm
Posts: 586
Location: A Town far from you
@mexicano21, I tried to use JSON.parse without ajax and didn't work at all. Can we get a little reunion so we can find a way to work this out?

_________________
Know about me here


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group