In addition to the option of generating a link, the
Two additional commands (
Bookmarklet: Create HTML Link With jQuery and
The jQuery library will be loaded from the Google CDN.
Configuration options can be used to specify which version of jQuery to use, and whether to include the minified version or not - see below for details.
Given this code in your current editor
var div = document.createElement('div');div.setAttribute('foo', 'bar');var text = document.createTextNode("This was added using the 'Bookmarklet' & Atom.io?!");div.appendChild(text);document.body.appendChild(div);
The Bookmarklet > Create HTML Link command will generate the following bookmarklet:
The package's configuration page has the following options. The jQuery options are only used when one of the commands that include the jQuery library is executed.
jQuery Version: The version of jQuery to use, e.g. 1.11.0. Defaults to 1, which will load the latest stable release of jQuery 1.
Use Minified jQuery: Use the minified or unminified version of the jQuery library. Defaults to true, which will include the minified version.
The Bookmarklet package does not define a default keybinding. To add one, use the following snippet in your local
'atom-text-editor:not(.mini)': 'ctrl-alt-b': 'bookmarklet:create-link'
apm install bookmarklet
Open the Atom settings/preferences, then select the Packages entry and search for Bookmarklet using the search field. In the results, click the Install button of the Bookmarklet package.
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.