Open anly2 opened 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.
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)
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.