Giter Site home page Giter Site logo

Change popup for window about webtoepub HOT 27 CLOSED

dteviot avatar dteviot commented on July 25, 2024 1
Change popup for window

from webtoepub.

Comments (27)

dteviot avatar dteviot commented on July 25, 2024

Possible solutions to investigate.

http://stackoverflow.com/questions/4146930/how-to-keep-google-chrome-extension-popup-open

from webtoepub.

AzSiAz avatar AzSiAz commented on July 25, 2024

Well as say in this stackoverflow thread and since it's a low priority something like this should be easy to implement when you have time :

var popupWindow = window.open(
    chrome.extension.getURL("normal_popup.html"),
    "exampleName",
    "width=400,height=400"
);
window.close();

from webtoepub.

dteviot avatar dteviot commented on July 25, 2024

@AzSiAz
Has been implemented. Should be in store shortly. Version 0.0.0.12
Steps:

  1. Click on "Advanced Options",
  2. Click on "Open as Tab"
  3. Add URL to "Starting URL"
  4. Click "Load and Analyse"

from webtoepub.

AzSiAz avatar AzSiAz commented on July 25, 2024

Ok thanks, i will try this on sonako branch :)

from webtoepub.

toshiya44 avatar toshiya44 commented on July 25, 2024

Page goes blank when progress reaches 100%

Also for some reason the "Load and Analyze" button doesn't show up sometimes, unless the page is refreshed.
(Firefox 49.0a2)
screen shot 2016-07-17

from webtoepub.

dteviot avatar dteviot commented on July 25, 2024

@toshiya44

Page goes blank when progress reaches 100%

D'oh! That said, if page is saved at 100%, then it's not a major issue. Still, will look into it.

Also for some reason the "Load and Analyze" button doesn't show up sometimes, unless the page is refreshed

Hmmm... I have to admit, the code I'm using to detect "running in Tab Mode" is pretty dodgy. I'll have a think if I can do it more cleanly.

from webtoepub.

AzSiAz avatar AzSiAz commented on July 25, 2024

Well on my side with chrome no problem with 5 try, button show up every times I open a new tab.
Thanks now I can switch to another tab when it's downloading images without needing to restart it :D

from webtoepub.

dteviot avatar dteviot commented on July 25, 2024

@AzSiAz, @toshiya44

Also for some reason the "Load and Analyze" button doesn't show up sometimes, unless the page is refreshed

I'm thinking the simplest fix would be:

  • Move the “Load and Analyse” button into the “Advanced Options” area, next to the “Open as Tab” button.
  • Don't hide the button when running in Popup mode.
  • Give an error message if clicked and there's no value for “Starting URL”.

Any comments?

from webtoepub.

AzSiAz avatar AzSiAz commented on July 25, 2024

I think don't hide the button since it will also allow to use a custom url in popup mode but you will also need to prevent the extension to crash on startup if it's not a correct url in popup mode

from webtoepub.

toshiya44 avatar toshiya44 commented on July 25, 2024

@dteviot I forgot to add that it didn't save as well. The page just went blank. That's it.

from webtoepub.

dteviot avatar dteviot commented on July 25, 2024

@AzSiAz

I think don't hide the button since it will also allow to use a custom url in popup mode but you will also need to prevent the extension to crash on startup if it's not a correct url in popup mode

Yes, I said don't hide the button. As regards not crashing the extension, I'll see what I can do. But it's not a priority.

@toshiya44

I forgot to add that it didn't save as well. The page just went blank. That's it.

I saw that last night as well with Firefox 48. Funny thing is, I originally tested on FF 47 and it worked. Will investigate.

from webtoepub.

toshiya44 avatar toshiya44 commented on July 25, 2024

@dteviot I re-checked, and it seems like the issue is with Firefox's e10 mode or "Electrolysis". It is ON by default on Aurorar, Dev and other test versions.
In normal mode (the one used by regular Firefox Release) the only issue is that the "Load and Analyze" button doesn't show up sometimes. Loading and saving works. Sorry about the confusion.

from webtoepub.

dteviot avatar dteviot commented on July 25, 2024

@toshiya44

No problem. Thank you very much for looking into that, it will save me some time. Might I suggest you send a bug report to Mozilla? I suspect the problem is to do with the "download" functionality in the EpubPacker. i.e. this bit here

    save: function (blob, fileName) {
        var clickEvent = new MouseEvent("click", {
            "view": window,
            "bubbles": true,
            "cancelable": false
        });
        var a = document.createElement('a');
        a.href = URL.createObjectURL(blob);
        a.download = fileName;
        a.dispatchEvent(clickEvent);
    }

from webtoepub.

dteviot avatar dteviot commented on July 25, 2024

@AzSiAz

I think don't hide the button since it will also allow to use a custom url in popup mode but you will also need to prevent the extension to crash on startup if it's not a correct url in popup mode

I'm not entirely sure the extension is crashing. I suspect Firefox is closing the extension when the window.alert() I call is closed by user. Not sure why. Am investigating.

from webtoepub.

AzSiAz avatar AzSiAz commented on July 25, 2024

On chrome I don't have the time to read the error message in the alert, since it's closing on it's own

from webtoepub.

dteviot avatar dteviot commented on July 25, 2024

@AzSiAz
I'll try and reproduce the problem.
What URL is in the active tab when it crashes? What are the exact set of steps you do to make it crash?
Also, what version of chrome are you running?

from webtoepub.

AzSiAz avatar AzSiAz commented on July 25, 2024

If I'm in project page ex: https://baka-tsuki.org/project/index.php?title=Masou_Gakuen_HxH or everywhere else which is not a volume or a chapter page alert is closing immediately instead of waiting for a click on ok to close it.
Chrome version : 51.0.2704.106

from webtoepub.

dteviot avatar dteviot commented on July 25, 2024

@AzSiAz

Fixed in latest commit to https://github.com/dteviot/WebToEpub/tree/AdvancedOptions
Failed because ran into two new <img> "formats".

  1. Images contained in a "floatleft" <div>
  2. Images without a hyperlink

Updated image collector to handle both cases.
Note, this is also instance of more fundamental problem of trying to parse page that isn't a story. #37.

from webtoepub.

dteviot avatar dteviot commented on July 25, 2024

Note to self. Have raised bug https://bugzilla.mozilla.org/show_bug.cgi?id=1296882 with mozilla. Will see how they respond.

from webtoepub.

dteviot avatar dteviot commented on July 25, 2024

@dreamer2908  @typhoon71  @toshiya44 @AzSiAz

Thanks to the very nice developers of Firefox, I believe I've fixed the major issues with running in Tab mode, although I'm not 100% confident.
So, I've created a new branch https://github.com/dteviot/WebToEpub/tree/ExperimentalTabMode where WebToEpub now opens in Tab mode by default, but there's an option in the Advanced Settings to go back to popup mode by default.
My initial experience is that it works fine in Chrome, but may be a bit unstable under Firefox.
Specifically, when running in "popup" mode, when I call alert() to indicate a problem (e.g. Unable to find a parser for the selected window) the main WebToEpub window disappears.
Note, I'm not entirely sure if this is new behaviour. I know I've seen it in the past, but I'm not sure if it disappeared for a while and then re-appeared or it's just always been there.
Luckily, the alert() doesn't seem to be a problem in Tab mode.

Anyway, if you can take this branch for a test drive and let me know what issues you have before I merge it into the main branch and release, that would be greatly appreciated.

Incidentally, I've also added support for http://www.readlightnovel.com/. Which for some reason makes me feel I've done something very wrong.

from webtoepub.

typhoon71 avatar typhoon71 commented on July 25, 2024

No issues in Tab mode for now.
I do have to report a bug tough: addon doesn't fetch pics of "http://www.readlightnovel.com/dungeon-defense", it does pack the epub with the text only if you press "ok" on the error windows.
This happens with chrome.

from webtoepub.

dteviot avatar dteviot commented on July 25, 2024

#typhoon71
I'm not sure that's a bug in WebToEpub.
Those are tags with src URLs that don't seem to be valid.
For example, in the prologue, the image on readlightnovel has a url of
https://shalvationtranslations.files.wordpress.com/2016/06/xcqoevp.jpg?w=700
But if you try to open that by supplying it as a URL to the browser, you get nothing.

If you go to the original source for the prologue https://shalvationtranslations.wordpress.com/2016/06/28/dungeon-defence-volume-1-prologue/, you can see that the image URL is https://shalvationtranslations.files.wordpress.com/2016/06/dunde-017.jpg?w=700, which does work.

I'm thinking that when readlightnovel scraped the origin site they left the image tags unchanged and pointing to their locations on the origin site. (I can see their logic: why pay for the bandwidth to send the images when they can steal it.) The origin site has realized this, and done something to try and mess it up.

That said, I'm not sure why I now see the image when I look at the readlightnovel page in a browser.

from webtoepub.

typhoon71 avatar typhoon71 commented on July 25, 2024

To tell yo uthe truth, I reported it because I tested readlightnovel with Dungeon Defense, which is a novel I already knew (I mean, I knew from the TL site, so I could spot easily if there were issues).
The way I see it it's readlightnovel's pareser that's doing a bad job getting the pics link.
Right now I don't see any pic, while when I posted the previous commente I could see them.
On a side note I use readlightnovel just to compile quick epub for checking if a novel is to my tastes, then I go fetch it from the TL website directly (when I'm not already there).
So this issue is not that important to me, but I reported it in case it was something that could matter to others.

from webtoepub.

dteviot avatar dteviot commented on July 25, 2024

@typhoon71

On a side note I use readlightnovel just to compile quick epub for checking if a novel is to my tastes, then I go fetch it from the TL website directly (when I'm not already there).

As I've only just added readlightnovel to WebToEpub, how were you creating those epubs previously?

from webtoepub.

typhoon71 avatar typhoon71 commented on July 25, 2024

Since I can't make a parser I just copy & paste the page on a word processor and edit it, then print it to pdf (not epub).
I use epubs to print novels to nice looking pdfs, which I read on the big screen.
I do keep epubs for archiving since they're convenient, and I could read them from a tablet if I ever buy one. Even better if they're form the TL groups or from some kind soul with skill.
This addon obviously saves me a lot of "work" (thanks).

from webtoepub.

dteviot avatar dteviot commented on July 25, 2024

@typhoon71

This addon obviously saves me a lot of "work" (thanks).

I'm delighted to hear that.

from webtoepub.

dteviot avatar dteviot commented on July 25, 2024

Version 0.0.0.16, defaults to "Tab" mode, and released to Chrome store (and put in Firefox queue.
Going to call this done.

from webtoepub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.