anka-213 / webcomic_reader

Webcomic Reader userscript at
https://openuserjs.org/scripts/anka-213/Webcomic_Reader
MIT License
120 stars 27 forks source link

exhentai.org not working #31

Open SirMrMister opened 8 years ago

SirMrMister commented 8 years ago

It seems that, as of less than a week and a half ago, the script no longer activates on exhentai.org.

ticktickMOF commented 8 years ago

i think it's related to exhentai starting to use https

edit: yup add // @include https://exhentai.org/* to the big block of @includes

charmstruck commented 8 years ago

yep, this fixes the issue

DCTest1 commented 8 years ago

Can I also request here to get somehow the the extra content to be shown in minimal view? I read through the Tut pages but since I'm not a programmer I didn't understand what i had to do. Basically i want to see the buttons under the picture. The picture is tagged "i3" and the buttons are "i4" to "i7". I have no idea how to display that.

anka-213 commented 8 years ago

@DCTest1 It's actually relatively simple.

  1. Open settings -> site settings.
  2. Press the edit button on the top
  3. Press "add extra content"
  4. Change type of the new box from "literal string" to "CSS selector" 5a. For example: Write the string "#i3" if it was the id of the tag or ".i3" if it was the class, in the big box. 5b. You can use the Selector Gadget to get the "css selector" (the "#i3"/".i3" string) automatically.
  5. Press save and you are done.

Please feel free to ask again if something is unclear.

anka-213 commented 8 years ago

(I can't access the site currently, I just get a sad panda)

DCTest1 commented 8 years ago

@anka-213 exhentai.org is the same site as g.e-hentai.org, just for logged in users. if the script works for g.e-hentai.org it should work for exhentai.org.

The CSS Selector works but is it possible to have the Script buttons on top again? exhentaicss

also i saw that you could download the images with a downloadmanager if you filter for "wcrimg*". as you can see above, exhentai (just like g.e-hentai) uses scaled down versions of the pictures where you have to click "Download original..." to get the real file. The scaled down image is 596.3 KB and the original is 1.70MB. Is it possible to download the original file or do you always get the scaled down version?

anka-213 commented 8 years ago

@DCTest1 All the script buttons or just Back/Next? It's not possible currently, but I've been thinking of adding the feature myself before.

You can also try writing something like this in the "Custom Action" field:

var selExtras = xpath('//div[@id="wcr_extra"]');
var selButtons = xpath('//div[@id="wcr_botones"]');
selButtons.parentNode.insertBefore(selButtons,selExtras);

I haven't tried the code above yet, but it should move the buttons like you asked for.

anka-213 commented 8 years ago

@DCTest1 Can you post your custom settings for exhentai here so I can include them in the script? You can see them (in text format) in the console when visiting the site.

DCTest1 commented 8 years ago

Using custom settings:

{
    url:    'g.e-hentai.org|exhentai.org',
    img:    [['#i3 a img, iframe + a img, .smi > a img']],
    back:   function(html, pos){
            var num = Number(link[pos].match(/-(\d+)(\?.+)?$/)[1]);
            var as = xpath('//a[img]', html, true);
            for(var i=0; i<as.length; i++)
                if(as[i].href.match(new RegExp('-'+(num-1)+'(\\?|$)')))
                    return as[i].href;
            throw 'fail';
            },
    next:   function(html, pos){
            var num = Number(link[pos].match(/-(\d+)(\?.+)?$/)[1]);
            var as = xpath('//a[img]', html, true);
            for(var i=0; i<as.length; i++)
                if(as[i].href.match(new RegExp('-'+(num+1)+'(\\?|$)')))
                    return as[i].href;
            throw 'fail';
            },
    extra:  [['//div[span]'],'<span style="display:none">',['//a[@onclick[contains(., "nl")]]'],'</span>',[['#i4, #i5, #i6, #i7','']]],
    js: function(dir){
            var selExtras = xpath('//div[@id="wcr_extra"]');
            var selButtons = xpath('//div[@id="wcr_botones"]');
            selButtons.parentNode.insertBefore(selButtons,selExtras);
            },
    scrollx:    'R',
},

Man i had to search how to open the console in firefox -.-' but I just did everything like you told me to. the custom code i have written in the picture. "#i4-#i7" and changed the drop-down menu to list of elements. the custom action i simply copied 1to1 from you. and that's it.

tallos commented 7 years ago

I seem to be having some odd behavior when using the browser back buttons. I have tried it with both browser history enabled and disabled, and on both g.e-hentai and exhentai, it happens seemingly randomly on both, sometimes they behave as expected and sometimes the following happens.

When using the browser back button instead of going to the previous page it reloads the tab to the current URL and adds ?nl=1-410239 to the end. There is some small variation in the numbers, earlier the 2nd one was 410238. If i hit back again it either reloads the page again but with the script functions missing or adds another set to the end of the url.

I do note after hitting back and the url being modified the following is in the console: content: detected DOMContentLoaded 0a3ebaa3-5a5b-4e4c-998a-18cc2aa94e35 This is not present when the back button correctly goes to the previous page url(the gallery when history is disabled)

opsaan commented 1 year ago

I get an authentication error while logging in exhentai.com also we have to use e-hentai.com username password right?