anly2 / cirrus-board

A Cloud Management Console UI with focus on multi-item edits. Additional goal is for it to be a hostless single-page web application.
0 stars 0 forks source link

Explore the idea of a domain-leech bookmarklet #10

Open anly2 opened 5 years ago

anly2 commented 5 years ago

Try to implement a bookmarklet that "leeches" of a domain.

The main goal is to provide a host domain for a bookmarklet to keep state. Existing mechanisms of persisting data, like cookies and localStorage, are keyed by the location of a website. A bookmarklet, however, has no url or host of its own, so it inherently leeches from the focused page it is ran against.

anly2 commented 5 years ago

A two-phase bookmarklet should work, but might be inconvenient.

The first invocation redirects to a target host page. The second invocation sees that it is at the target page and then actually does its thing.

The second call can probably happen almost immediatelly. This may mean that double-clicking the bookmark may be good, and offset the inconvenience.

anly2 commented 5 years ago

This may provide a solution for url size issues. (Also addressed by #11) By targeting a source-hosting page (like a github raw file view), the bookmarklet can simply evaluate the content there. BEWARE: targeting a dynamic page (like a branch view) may have considerable implications (security for example)