![]() |
Type in a command, or "ls dictionary" to search all commands for "dictionary", etc.
|
bookmarklet2addscript (read 'bookmarklet to add script')
Generates a bookmarklet that will load a specific javascript file when clicked. Useful when you want to test javascript libraries on other's webpage.
Syntax:
bookmarklet2addscript [name] -path [path]
Example:
bookmarklet2addscript Latest jQuery -path http://jquery.com/src/jquery-latest.pack.js
<< generates a bookmarklet that let you load the latest jQuery javascript library.
bookmarklet2addscript jQuery 1.1 -path http://jquery.com/src/jquery-1.1.js
<< This time, jQuery version 1.1.
After you drag the bookmarklet to your browser toolbar,
visit Google and enter the following code in the browser addressbar.
javascript:(function(){$('a').css('background','yellow');})()
Or, if your browser has a javascript console, enter the following in the console.
$('a').css('background','yellow');
Then all links will get yellow background.
Based on the code I found from:
http://www.learningjquery.com/2006/12/jquerify-bookmarklet
Tested on Firefox 2, Opera 9, IE 7 on Windows XP.