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

Metadata in 14-day view notebook #16

Open
ketiltrout opened this issue Dec 18, 2023 · 2 comments
Open

Metadata in 14-day view notebook #16

ketiltrout opened this issue Dec 18, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@ketiltrout
Copy link
Member

To properly implement #15 I think there needs to be a JS block in the rendered 14-day notebook that creates JS globals indicating which days are being displayed. Something like:

<script type="text/javascript">var first_14day_csd 4321; var last_14day_csd 4334;</script>

These global variables could then be used by the daily viewer JS to create the necessary UI elements (whatever they are).

@ketiltrout ketiltrout added the enhancement New feature or request label Dec 18, 2023
@ketiltrout
Copy link
Member Author

ketiltrout commented Dec 18, 2023

Or maybe a list (displayed_csds = [ 4321, 4322, 4323, .... ];) which would handle the case where some of the days are missing.

@ketiltrout
Copy link
Member Author

Hmmm, because they're both from the same origin, I think JS from the iframe should be available, but another option that avoids CORS problems would be metas in the header:

<meta name="displayed_csds" content="[ 4321, 4322, 4323, .... ]" />

which the viewer could read from the DOM and then JSON.parse itself.

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

No branches or pull requests

1 participant