Skip to content

export mode: what triggers the json download, and when? #53

Description

@chris-m2009

root README, export mode:

<script src="/liarjs-collect.min.js" data-mode="export"></script>

Export mode: collects and hands the visitor a JSON file, making no request at all

"hands the visitor a JSON file" is the whole description and it skips the part i have to build around. one tag, no code, so:

  • does it fire automatically on load and start a download unprompted? that's a browser asking "do you want to download liarjs-sample.json" to someone who just opened my page, and chrome blocks/annoys on downloads with no user gesture anyway.
  • or does it wait for a gesture — and if so, what do i wire my button to? is there a global (window.liarjs.export() or similar) that the tag installs? nothing in the README names one, and packages/collect/src/config.ts only ever shows data-* attributes.
  • what's the filename, and does it re-run and re-download on every navigation within the site?

if export mode is really meant for a dedicated "download your fingerprint" page rather than a site-wide tag, saying that plus the one line of glue code would make it usable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions