I am working on a bookmarklet and thought I would challenge: how to insert as few javascript files as possible from a link as few characters as possible.
Here is the shortest thing I could come up with:
javascript:(function(d){d.body.appendChild(d.createElement('script')).src='URL'})(document)
These are 88 characters without a URL.
Is it possible that a stack overflow javascript guru is better? I will accept a working answer with the least number of characters, so put on your thought caps!
(One thing: the bookmarklet should work in all major browsers. This is a smart solution, but it does not work in all major browsers because it returns a value.)
source
share