5 ms·
Make Your Own Bookmarklets With jQuery
- niyazpk 16y agoI use this JQuery Bookmarklet Creator all the time: http://benalman.com/code/test/jquery-run-code-bookmarklet/ http://benalman.com/code/test/jquery-run-code-bookmarklet/
- warfangle 16y agotl;dr: 1) You can use javascript: in the url bar! holy crap! 2) You can insert arbitrary scripts into the DOM, and trigger a function to run when they load! 3) Using jQuery, you can build UI stuff with this! Any JavaScript developer worth half their salt knows this stuff. Wondering how it has so many upvotes. It's hardly novel or all that interesting...
- _mattb 16y agoIt's well-presented and not everyone here is a salty javascript developer.
- duck 16y agoExactly, and bookmarklets can be useful for anyone... not just developers. I've helped a couple people create them for their sites before (like to post a new item, similar to HN) and I think if they had tried it with jQuery they would of been able to do it themselves.
- _mattb 16y agoI learned a lot from the post.. Here's my little bookmarklet for this particular page: javascript:(function(){document.body.appendChild(document.createElement('script')).src='http://weakorbit.com/js/hn3.js;})() http://weakorbit.com/js/hn3.js;})();
- JangoSteve 16y agoCompletely off-topic, but using "tilt-shift" photography on a code snippet is a little unsettling to me. I'm not sure why.
- riobard 16y agoAnybody knows the font and color scheme in that image? Looks really pretty!
- Groxx 16y agoVery strange pictures for an article like this, definitely. But I'm not sure I'd call that tilt-shift. It looks like they just held the camera too close to the top. Not that there's much difference, of course. But I almost universally see tilt-shift photographs having a top and bottom blur; having only one doesn't imply shrinkage as strongly.