4 ms·
tl;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!
by warfangle 16y ago
tl;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;})();