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

is it possible to pass multiple references at once? #13

Open
halukkaramete opened this issue Jul 21, 2019 · 2 comments
Open

is it possible to pass multiple references at once? #13

halukkaramete opened this issue Jul 21, 2019 · 2 comments

Comments

@halukkaramete
Copy link

halukkaramete commented Jul 21, 2019

Selams

To paint an arbitrary sequence of verses, say the search results of a word search, what do we need to do? Following shows 5 verses with one script call:

<div id='verses2'></div>
    <div id='translation'></div>
    <script 
      chapter=93 verse=6 count=5 selector='#verses2' trans='#translation'
      src="http://qzaidi.github.io/quran/js/quran.js">
    </script>

however, what if you want to display, say 36:1 55:3 45:3? Do I need 3 similar snippets? If I need to

SRC'ing the "http://qzaidi.github.io/quran/js/quran.js" more than 1 time does not make sense to me. Could you tell me it is totally OK to do so?

Or, Is there a way to pass something like this ( ids="36:1,55:3,45:3" ) as demonstrated below?

<div id='verses2'></div>
    <div id='translation'></div>
    <script 
      **ids="36:1,55:3,45:3"** selector='#verses2' trans='#translation'
      src="http://qzaidi.github.io/quran/js/quran.js">
    </script>
@qzaidi
Copy link
Owner

qzaidi commented Jul 22, 2019

If you are doing this in a modern browser, including it more than once would not be an issue since the file will only be fetched once (it has correct cache headers). You can see this behavior on this page
https://qzaidi.github.io/2013/10/05/quranjs/

It is also possible to support multiple values in a single call though - I would have a look at this next weekend to see how complex it is.

@halukkaramete
Copy link
Author

halukkaramete commented Jul 22, 2019 via email

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