Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for vlebooks.com #3

Open
helphelpplease opened this issue Aug 30, 2020 · 2 comments
Open

support for vlebooks.com #3

helphelpplease opened this issue Aug 30, 2020 · 2 comments

Comments

@helphelpplease
Copy link

Hi: any chance your considering including vlebooks.com. Dawson ERA migrated to vlebooks.com recently. Thankyou

@helphelpplease
Copy link
Author

helphelpplease commented Sep 8, 2020

I am trying to adapt to VLebooks.
How do I test the constructBookURL? and getPageImageURL?
example https://www.vlebooks.com/Vleweb/Product/Index/1224424
example https://www.vlereader.com/Reader?ean=978xxxx

https://r2.vlereader.com/reader?handler=PageImage&ean=978xxxx&pagenumber=1&imageWidth=1000

{
name: "VLebooks",
chromeURLScope: "://.vlereader.com/",
host: ".vlereader.com",
readerDomain: "vlereader.com/Reader",
pageResourceURLFilter: "
://.vlereader.com/",
constructBookURL: url => ${url.host}${url.pathname},
testPageImageURL: (request, url) =>
request.type === "image" &&
url.host === "*.vlereader.com" &&
url.pathname.includes("PageImage") &&
url.searchParams.has("pagenumber"),
getPageImageURL: url =>
Promise.resolve(
url.pathname.includes("handler") && url.pathname.includes("pagenumber")
? url.toString()
: null
)
},

@janbaykara
Copy link
Owner

Hi @helphelpplease. Are you still interested in adding VLEBooks.com to the extension?

  • constructBookURL is just a way for us to uniquely identify a book. When you're on a reader page for that book, you should see its URL show up in the popup.
  • getPageImageURL is going to want to check whether the URLs that are showing up are, indeed, page images. You can inspect what's coming through by inspecting the logs for the extension (see chrome://extensions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants