jetzt
jetzt copied to clipboard
Make it easier to add bookmarklet
Currently it's a lot of manual work to add the bookmarklet. Ideally I would like to present a button that people can just drag to their bookmark bar, and have it dynamically filed with the code from bookmarklet.js. Could I for example add a page to gh-pages with some javascript or something that does this?
Please feel free :)
Great! I'll try to find some time this week ;)
I'd really like to see a page that lets you select your custom default-WPM and such prior to installation if that's where you're headed with this!
Interesting idea. Having a separate page for adding a bookmarklet would allow such customizations.
well, these settings are read from localstorage, aren't they? so you could store them from one page and the boomarklet would use them, right? Or is localstorage per-domain? then you could add some json into the bookmarklet...
Yeah localStorage is per domain. I think there was a hack with an iframe, but I didn't want to get into that. So that why I thought it was a valid idea.
Yes, then its really the best option to have a page generating a bookmarklet. In fact, with the very same backend you could also generate an embeddable snippet, some page owners could provide jetzt to their visitors.
Finally, after having my harddisk fail, I have time to look into this. I'm wondering, do we want to add all the css and js into the bookmarklet itself or should it load it from somewhere, like it currently does? Having it load files from http://ds300.github.io/jetzt/ has the benefit that it auto updates, but it also disables offline usage. Maybe make it a checkboxed option?
Separate question, I'm I correct in understanding that Jetzt currently defaults to localStorage for it's configBackend?
A quick first step could be to load the latest bookmarklet.js into the href of a link, using something like:
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript">
$(function() {
$.get( "bookmarklet.js", function( data ) {
$("#bookmarklet").attr("href",data);
},"text");
});
</script>
@nslater, could you incorporate this into the first version of the website?
I've expanded on the above trick with a dynamically filled offline bookmarklet: https://github.com/peteruithoven/jetzt/blob/add-bookmarklet/addbookmarklet.html
In the end I would like to do something like setup on the following bookmarklet page: http://readable.tastefulwords.com/ > show setup
Would be awesome if we could reuse the options page for this: https://github.com/ds300/jetzt/pull/85
I vote for a hybrid lovechild of the options page (a la Chrome's default stylin) and the Initializr customization page. That way, we're not stylistically limited by the 'default' Chrome CSS, and we can have a glamorous sexytastic splash page.
note to self, link to the following page for more info on bookmarklets: http://marklets.com/FAQ.aspx
I am about to PR the website tonight, hopefully. This appears to still be in flux. Am I okay to just use the existing code, and we can update it after this is sorted out?