Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matthodan/bookmarklet-loader
Template bookmarklet that injects a .js and .css into the current page when clicked
https://github.com/matthodan/bookmarklet-loader
Last synced: 16 days ago
JSON representation
Template bookmarklet that injects a .js and .css into the current page when clicked
- Host: GitHub
- URL: https://github.com/matthodan/bookmarklet-loader
- Owner: matthodan
- Created: 2011-12-23T00:43:14.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2012-11-02T17:47:36.000Z (about 12 years ago)
- Last Synced: 2024-08-01T00:41:09.707Z (3 months ago)
- Language: CoffeeScript
- Homepage:
- Size: 98.6 KB
- Stars: 14
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bookmarklet Loader
Bookmarklet Loader is a template [bookmarklet](http://en.wikipedia.org/wiki/Bookmarklet 'Bookmarklet') that injects a .js and .css link into the current page.
[Pinterest](http://pinterest.com/about/goodies/) and [Instapaper](http://www.instapaper.com/extras) use similar implementations to load their bookmarklet code.
## Usage
Update the following in 'bookmarklet-loader.js.coffee' to refer to your app's .js and .css. If
you don't want to include both a .js or .css, you can pass 'null' instead of a url for either.```
loader = new BookmarkletLoader 'yourApp',
'http://example.com/your-app.js',
'http://example.com/your-app.css'
```Bookmarklet Loader is written in CoffeeScript, however bookmarklets must be JavaScript and URL encoded. [CoffeeMarklet](http://johtso.github.com/CoffeeMarklet/) does a great job of converting CoffeeScript to bookmarklet-friendly JavaScript. I recommend you use it to generate your bookmarklet.
## Contact
Contact me if you have a question-- [Matt's Blog](http://www.matthodan.com).