RussCoder/djvujs

feature_request(remote): permalinks to pages of remote documents

Closed this issue · 10 comments

1. Summary

It would be nice, if would be possible open links to specific pages of remote DjVu documents.

2. Example of expected behavior

User open https://testuser7.narod.ru/School/Babenko.djvu#page=14 → this page open in browser:

DjVu example

3. Argumentation

Currently, for DjVu:

    person who shares a link and/or the person who wants to read have to spend a lot of time.

It would be nice, if process will much easier. First person add to link with DjVu document #page=$number_of_page → second person open this link and immediately reads the necessary page.

3.1. Currently behavior

I can't find browser extensions, which allow to be possible permalinks to DjVu pages. That share link to DjVu page, I need:

  • Convert DjVu to PDF → upload converted PDF to remote hosting.

Or users, who want to see the contents of the link, needs:

  • Download DjVu → manually find specific page.

3.2. Reasons of permalinks to pages

DjVu (as PDF, FB2 and EPUB) is popular books format.

  1. It would be nice, if people will confirm their words with links to sources of information. I try as often as possible confirm my words authoritative sources.
  2. Users may want to share information from specific pages of DjVu books as peoples regularly share links from another types of web pages.

4. Analogies for another formats

4.1. PDF

Firefox by default open remote PDF document in built-in viewer.

If in end of link construction #page=$number_of_page, PDF document open in specific page.

I already show example above — open https://d-m.bksdl.xyz/download/book/5c63fa8550b4253978b2a8a6#page=173 in Firefox:

PDF example

4.2. FB2

FB2 Reader Firefox extension:

Install FB2 Reader → paste link http://static.flibusta.is:443/b.fb2/Kazanceva_Corpus_362_V-internete-kto-to-neprav-.AAFbdw.489418.fb2.zip#zz_59 to URL bar → Firefox open a page:

FB2 example

Thanks.

Добрый день!

Да, это не сложно будет сделать. Только ссылку такую все равно надо будет открывать через контекстное меню, а не на прямую. Хотя конечно, если есть указание страницы, то теоретически можно и сразу открывать по клику...

При открытии через контекстное меню сделаю, чтобы на указанную страницу осуществлялся переход. А про непосредственный клик еще подумаю.

Обновил расширение. Теперь страница учитывается. Делать открытие сразу по клику не стал - задать маску учитывающую хэш в адресе нельзя, а перехватывать все запросы к .djvu и вручную этот хэш проверять я не хочу ради этого. Быть может. позже сделаю настройку, которая позволит все ссылки на .djvu открывать по клику сразу.

(Sorry for English; I wrote in English, because this discussion will understandable for possible other users)

Type: Question ❓ :

I open link https://testuser7.narod.ru/School/Babenko.djvu or https://testuser7.narod.ru/School/Babenko.djvu#page=14 in browser. Currently, what actions I need, that DjVu file from link will opened in DjVu Viewer?

Thanks.

You have to update the extension to the version 0.3.1.0
Then you have to right click on the link to a djvu file and in the context menu click the option "Open with DjVu.js Viewer". If there is a page number in a URL, it will be set in the viewer now too.

@Kristinita Вопрос решен?

Вопрос решён?

Status: Partially Resolved

1. Resolved

page= works as expected. Thanks!


But I think, that FB2 Reader behavior is better, and would be nice, if you make the same for DjVu.js. Argumentation:

2. Users profit

2.1. Additional action

  • FB2 Reader — user open DjVu as usual open any file types
  • DjVu.js — right-click and select menu item Open with Djvu.js Viewer required.

FB2 Reader shouldn't remember additional actions.


But it not heavy problem; real problems arise, if link open not from browser.

2.2. Links place

Users may need to open links to DjVu files not from browser.

  1. Usually, I share links to books, that confirm my opinion, in private messages of messengers and social networks (e.g. VKontakte, WhatsApp). I use Rambox for it; another users can also doesn't use browser.
  2. I edit documents in Sublime Text and open links to books via Clickable URLs package.
  • FB2 Reader — I can share links without any extra additions → user (with installed FB2 Reader), that need view this link, can click to it from his preferred program or paste link in Firefox URL Bar
  • DjVu.js — moz-extension://01c7e4e4-9cba-489c-8872-44f3939bccd2/viewer.html# before links required, that user can simply view link content.

Adding moz-extension://01c7e4e4-9cba-489c-8872-44f3939bccd2/viewer.html# in top of each DjVu link is not simply; copy/paste it takes a time.

2.3. Browsers without extension

If user haven't enabled extension in browser or have another browser:

  • FB2 Reader — default behavior: file download to PC
  • DjVu.js — for moz-extension://01c7e4e4-9cba-489c-8872-44f3939bccd2/viewer.html#https://testuser7.narod.ru/School/Babenko.djvu#page=14 nothing occurs;

Also, link with protocol moz-extension://, not https:// or http:// non-friendly for non-Firefox users.

Using two links for sharing: with moz-extension://01c7e4e4-9cba-489c-8872-44f3939bccd2/viewer.html# and without it also isn't good solution.

3. Your personal profit

3.1. More users

You can get more users of your extension:

  • Steps to reproduce: user open in browser any link to DjVu file, https://testuser7.narod.ru/School/Babenko.djvu, for example. It a usual way for get new files.

  • Current behavior: he downloaded a file and can open it any viewer, even if DjVu.js installed.

  • Expected behavior for you:

    1. DjVu.js will open DjVu files by default, without asking users. Partially, you deny users the ability to choose concurrent apps.
    2. Every user, that install your extension, will automatically use it for remote DjVu's without extra actions. Less action — more chances, that user will regularly use extension.

3.2. Unique feature

Currently, I don't understand, why users must prefer your extension, not powerful programs as IrfanView. I can't say great arguments, why opening files in browser better, that in best DjVu readers.

But if you make behavior like FB2 Reader, you will have unique feature, that can't be implemented in IrfanView, SumatraPDF and another viewers. This will be your distinguishing feature, which can be emphasized when promoting an extension. And maybe your DjVu.js in the future will included in Firefox build as currently Pdf.js.


Based on the arguments above, I think, it would be nice, if someday you realize, that any remote DjVu file will be opened in DjVu.js. See, how it realized for FB2 Reader.

Thanks.

Type: Rectification

DjVu (as PDF, FB2 and EPUB) is popular books format.

Currently, for my projects I use 274 .djvu books. Personally for me, this feature request really important.

Thanks.

@Kristinita

I know that it may be more convenient to open all files in the viewer by default without using the context menu.

However, the current behavior is such by design - the viewer is designed so as to add new features in the browser, but at the same time not to change the default behavior. If it weren't so, you would not be able to download the file, without opening it in the viewer. And if there is an error (and I can't guarantee that the viewer works with all files correctly even now), you will be able neither to view the document, nor download it (due to the error).

Right now, I know how to satisfy your desire of convenience and my purpose not to restrict users by the viewer at the same time. Namely, I will add options to the viewer, and a user will get an ability to configure the behavior of the viewer as he likes.

I don't know exactly when I implement it, but due to your request and some other issues with the viewer, I think I will start working on it within the next week or thereabouts.

@Kristinita

I have added an option to open links on click in the v.0.3.3.0 of the extension.
It's available for Firefox and will be available for Chrome within several days (they increased review time dramatically now).

@RussCoder, Status: Partially fixed ⁉️

1. Description

If I opened in Firefox:

All works as expected; thanks: ✅ .

Else:

I was getting:

Where open

This link doesn't open in DjVu.js 😔 .

2. Argumentation

This feature is the essence of my request. It would be nice, if each user can quickly go to any page of any remote DjVu document; but nowadays it's impossible. See my previous messages from this thread for details.

3. Environment

  • Firefox Portable 70.0.1 (64-bit)

  • DjVu.js viewer 0.3.3.0 (November 5, 2019 version)

  • Default application (I tried another values for DJVU file key → also, no success):

    Default application

Thanks.