Google site search for http://dmcritchie.mvps.org/firefox/ |
Some suggestions for creating and maintaining keyword shortcuts (bookmark nicknames) for use in Firefox, and particularly for use with bookmarklets.Keyword shortcuts are one of the very powerful tools in Firefox and are the easiest to create and maintain. Would suggest putting your keyword shortcuts in their own folder so that they will all be together rather than scattered throughout the bookmarks file. The foldername I use is identified by a single letter, K, so it doesn't take much space on the Personal Toolbar Folder.
Keyword shortcuts are also called "custom keywords" as in Mozilla, and also called "smart keywords" and "smart shortcuts" which are used interchangeably and incorrectly for other Firefox features such as tags in Firefox 3 places, and are also incorrectly (limiting usage) called "search" keywords. And if that isn't enough confusion the places shortcuts have been called "smart folders" and "smart bookmarks". In Opera a "keyword shortcut" is called "nickname" (for a bookmark) which keeps their naming and usage apart from keyword usage in HTML itself, and would have no naming/usage conflict if tags as in Firefox 3 were implemented in Opera as tags or as what they probably would have called them keywords.
Location: http://dmcritchie.mvps.org/firefox/kws.htm Home page: http://dmcritchie.mvps.org/firefox/firefox.htm (Install my k.html keyword bookmarks, and references, and install the "Add Bookmark Here ²" extension with my options] so you have keyword in bookmark dialog.
Create keyword shortcuts for your favorite search engines, and for any bookmark.
Add Bookmark, Ctrl+D, extended by OpenBook with Options.
Can be done in userChrome or my preference with a style (userstyles.org)
see Keyword addition for Add/Change Bookmark.
Description filled in from META data.
Keyword filled in manually [heavily annotated picture]
Drop-down on left latest bookmark folders added to
Drop-down on right ability to select any bookmark folder.
Dialog box widened due to userChrome.css change.
Also see Bookmarks Extensions (on bookmarks page),
and Bookmark properties (also on bookmarks page).You can create a keyword shortcut from a simple site Search form (or any single line form) by right clicking within the form and choosing "Add a Keyword for this Search" (built-in) which will bring up a form similar to this [picture] The actual location code (url) generated will include fields that you would not normally be aware of within the search form.
With the "Add Bookmark Here ²" extension, you can include a keyword when you create a normal bookmark as in the dialog at the right. The extension has several features including bookmarking the active tab url from a bookmark folder's context (right-click) menu. The "OpenBook" extension was an older less featured extension.
You can create a keyword without an extension using a style "Keyword addition for Add/Change Bookmark (Fx3) | userstyles.org (9029), but the extension is better.
Without any of the methods above you will not see the keyword or description field when you create the bookmark, but you can still enter the additional information through the Bookmark Properties to add/change a keyword.
I have keyword shortcuts set up for such things as a web search, search a few selected sites, dictionary, wiki, stock quotes -- things that can use the substitutions for the %s (with substitution) or %S (substitution without re-substitution), usually placed at the end. Using the small %s will result in additional substitutions of # replaced by %23, % by %25, and / by %2F. No additional substitution will occur with capital %S (see Bug: 270703)
Difference between (small s) %s and (Capital S) %S (#fragmentid)
- (small s): %s will have additional substitution replacements: # by %23, % by %25, and / by %2F, @ by %40.
- (Capital S): %S will not have substitutions and allow use of C++ in a Google search, allow use of @ in an email substitution, allow use of a fragment-id in a url substitution index.html#example2, and use of a directory as in code/example2.txt.
Where do keyword shortcuts exist: They are regular bookmarks that have been given a keyword name (see picture at right).
How are keyword shortcuts created: The easiest way is to create a bookmark with the bookmark star (Firefox version 3), or the previous methods with "Ctrl+D", or drag the favicon symbol to the left of the location bar to a bookmarks folder in the "Bookmarks Toolbar" (personal bookmarks), the "Bookmarks Menu" or to "Unsorted bookmarks".
Assigning a keyword shortcut to a bookmark: Bring up the Bookmark Manager ("Ctrl+Shift+B") or the Bookmarks Sidebar ("Ctrl+B"), Right click on the bookmarklet to bring up properties and assign a shortcut to it. Suggest including a colon as shown on mine to reduce errors. See Bookmark Properties picture
Colon within or at end of a keyword is a very good solution that distinguishes from location bar searching and from use of tags. Opera users may have a problem as colon is not allowed in a nickname. The beauty of Firefox keywords is that there are no restrictions on use of any character and is based on how used. Tags was an unwelcome Fx3 feature because it hid usage of pre-existing usage of keyword shortcuts, and has made bookmarking dialogs very unwieldy and confusing to new users and previous Firefox users alike. While shared tags in sites like delicious.com (if yahoo does not continue with this, see 10 Alternatives To Delicious.com Bookmarking) have proven useful because of the wide range of users it has been a thorn for Firefox users, and made bookmarks with tags less efficient even though it is in a database.
Besides the shortcut is anything else special: Use of %s (percent-sign lowercase s) will be substituted when invoked by whatever you specify whether it be a filename, words for a search, whatever you include will be included in the invoked url.
Difference between %s and capitalized %S for substitutions.
Originally %s (lowercase) was the only substitution available in keyword shortcuts, but since substitutions occurred it made inclusions of commercial pound sign (#) as used in fragment=id, slash (/) as used in including a directory, and at sign (@) as used in email impractical as they were substituted respectively by %23 for #, %47 for /, and %40 for @. [references: bug 270703 (2004-11-18),bug 272359(2004-11-29), 123006 (2003-03-04)]The %s (lowercase s) was what was intended by developers, but I'm hard pressed to find many examples where an htmlified version should be used, unless Javascript is involved.
The %S (uppercase S) without additional substitutions appears to be what I need most, if not, all of the time.Usage: I would be hard pressed to find anything where that (lowercase s) should even ever be used as much of my usage may involve substitutions like
ffp: . (directory or default index)
ffp: kws.htm
ffp: firefox.htm
ffp: firefox.htm#ext (use of fragment id)
ffp: code/ (to show the code directory)
g: link:dmcritchie.mvps.org/firefox/kws.htm
gg: dmcritchie.mvps.org/firefox/kws.htmNull Argument If we assign google: to http://www.google.com/%s (lowercase s), some examples
google: followed by no spaces generates http://www.google.com/%s
google: followed by one space generates http://www.google.com/%s same as before since there is still no operand
google: followed by two spaces generates http://www.google.com/ since the operand is considered empty
google: followed by a period generates http://www.google.com/ which is the directory appears same a null
google: followed by "maps" generates http://www.google.com/maps
images, video, news, maps, gmail, etc.; some will be like http://images.google.comQuick Demonstration (#quickdemo)
Using the keyword shortcut "w:") bookmarked to http://en.wikipedia.org/wiki/%s for a quick demonstration of how keyword shortcuts work: (It takes two spaces to enter with a null argument)
- w: what is Wikipedia (notice there is a redirection comment)
- w: who is John
- w: goo
- w: (followed by single space, same as no space meaning no arguments, you will see %s, or %25, in url and in document)
- w: (followed by two spaces, the second replaces the %s)
Character Arguments (#chr): It is possible to search on "C++" which Google would normally just treat as the letter "C". Here is a shortcut (source: Hao2lian), I created this with a shortcut of ("g:chr").
javascript:document.location = "http://www.google.com/search?q=" + encodeURIComponent('%s');Example:
g:chr pl/i c++ "John W Kennedy"Folder for shortcuts: Suggest putting your keyword shortcuts in their own folder. Anything after the keyword in the location bar will replace %s in the shortcut bookmark. My folder is named K within my Bookmarks Toolbar. The folder doesn't have to be readily accessible for use but you want to have fairly quick access to add items to it, and to help you “remember” the shortcuts you created. I choose to put a colon at the end of the word. The following may be customized for my own use but give you an idea of what you can use.
Example: Enter http://dictionary.reference.com/search?q=%s on the location bar, bookmark the resulting url by dragging the favicon picture on the left of the url within the location bar to within your toolbars or preferably to within the K folder on your personal bookmarks bar (if you created one), right click on properties to give it a keyword of "dict:" (with the colon) and a title of "dict: Dictionary Search". Then you can type "dict: spelling" on the location bar and get a definition for "spelling".
New Tab:
You should have Tools, Options, Tabs set so that new windows opens in a New Tab
Use Alt+Enter keyboard shortcut to open url on location bar in a new tab, also works for keyword shortcuts
In a Google search link add &newwindow=1
In a JavaScript link include new-window as the link for NT: User keyword shortcuts:
chrome: userChrome, userContent, launchy
[-- file:///C:/Documents%20and%20Settings/Administrator/Application%20Data/Mozilla/Firefox/Profiles/default.NOP/chrome --]
use about:cache to help you set up this shortcut keyword (keyword use has a space after colon)
config: about:config [-- about:config --] documentation can be found at About:config entries - MozillaZine Knowledge Base
g: Google [-- http://www.google.com/search?q=%s --]
gg: Google Groups Advanced Search (*excel*)
[-- http://groups.google.com/groups?as_ugroup=*excel*&num=100&as_q=%s --]
ggff: Google Groups Advanced Search (*firefox*)
[-- http://groups.google.com/groups?as_ugroup=mozilla.support.firefox&num=100&as_q=%s --]
gga: Google Groups Advanced Search Panel (*excel*)
[-- http://groups.google.com/advanced_group_search?q=group:*Excel*&num=100 --]
l: Librarians' Index to the Internet [-- http://lii.org/pub/htdocs/search?sm=;search=%S;action=show --]
profile: profile directory (like chrome: must be customized to user's own profile)
[file:///C:/Documents%20and%20Settings/Administrator/Application%20Data/Mozilla/Firefox/Profiles/default.NOP/]
w: Wikipedia [-- http://en.wikipedia.org/wiki/%s --]
xl: Excel on local HD [-- file:///c:/localsite/dmcritchie/excel/%s --]
z: search dmoz.org Open Directory of webpages [-- http://www.google.com/search?q=site%3Admoz.org+%s --]There are some special considerations for Google Advanced Search regarding the keyword shortcuts of gg: and gga: seen above that are covered on an additional page (google.htm) in more detail, and also Remediation for disastrous Google Beta Groups.
about: « builtin keywords for about:, about:config, about:cache, about:buildconfig, about:plugins, about:credits, about:blank More information on about:config preference entries documentation in the MozillaZine Knowledge Base. This documentation has progressively degenerated since some decision was made to move things into categories, for instance accessibility is no longer in the document (moved 2006-01-03 06:10:10.
bookmarklets which have been also implemented as keyword shortcuts — highlight:(highlight links), href:, id:, int:(int/ext links), titles:(paren tips), reset:(PF5)
bugzilla
272359, 270703 use of a fragment id with %s replacement; (messes up with /, #, @ characters)
Appears to be fixed in Firefox 1.5 -- xlp: join.htm#trimall works as does
archive: http://dmcritchie.mvps.org/excel/join.htm#trimallUse of fragment-id on a page can mess up bringing up same page in an editor such as with the "Launchy" extension, simply remove the fragment-id, refresh, and try again as this is not a Firefox problem and a fragment-id would be completely meaningless to an application such as an editor.
Directory in a shortcut: if you have a shortcut such as xx: pointing to http://example.com/directory1/directory2/%s -- you can invoke it as xx: . with the period to bring up the directory instead of a specific file, xx: .. to go back one additional directory, probably more useful on your local site than on most websites.
problem: since slashes cannot customize a search for — g: site:mozilla.org inurl:support inurl:firefox %s
JavaScript (all on one line, spaces optional)
javascript:open("http://mail.google.com/", "menubar=yes, toolbar=no,location=yes, directories=yes,status=yes, resizable=yes,scrollbars=yes");Chrome URLs, Jesse Ruderman, to bring up portions of the options menu — i.e. chrome://browser/content/pref/pref.xul
See Keyboard shortcuts in HELP. Useful shortcuts include completing a domain name node to enter it as .com use Ctrl+Enter, to enter as .net use Shift+Enter, to enter as .org use Ctrl+Shift+Enter — you do not want to waste effort creating keyword shortcuts for such sites that you know so well. Such sites addressed by a single word do not need keyword shortcuts.
For a more comprehensive list of keyboard shortcuts not one oriented to 80% of user questions, Firefox and other Browser Keyboard Shortcuts. (Comparison Table). Neither list includes shortcuts added by extensions, for that you might want to install a keyconfig extension, but descriptios would be sparse.
Also see Sorting Bookmarks in Firefox, and an Extension above to sort permanently in your bookmarks.html
Just as you can open any link on a webpage into a new tab(/window) with a keyboard shortcut, you can use the same keyboard shortcuts to open a bookmark in a new tab(/window) after modifying about:config so that they match.
You can Alt+Enter to open search from search bar into a new page, or to open a typed in (pasted in) url from the location bar.
Open Bookmarks in New Tab, After you installed this addon to your Firefox, bookmarks are opened in new tab always, and because they share their codes, all items in "History" sidebar panel and "Library" are also opened with new tabs. I'm using other means to open a folder of bookmarks.
Add Javascript to your bookmarklet so your GMail inbox opens automatically in a new tab/window.
javascript:void(window.open(location.href="https://mail.google.com/mail/?ui=html&zy=s"))
For more information on using tabs see Tabbed Browsing in Firefox and Tabs configuration, extracted from About:config entries - MozillaZine Knowledge Base.
Bookmarks (Bar) "Personal Toolbar Folder" within your bookmarks.html
My current bookmarks toolbar is almost all folders with the exception of a small portion inserted where "gg:fix" would appear alphabetically. The bookmark separators allow these sections to remain in place while allowing for sorting of the bookmarks toolbar
with the "SortPlaces" extensionwithin a Bookmark Folder, using Bookmarks Context Menu.
... Fx | + < > gg:fix GV H L Pz Sp | K S sw | ID ... -- Bookmarks Toolbar Blue/Folders, Red/Bookmarks | userstyles.org
Bookmarklets on Bookmarks Toolbar (appear in red) used as buttons for easier access, and so that location bar url will remain undisturbed by not typing a keyword there.
- # -- bullets to numbers List Items (LI)
- + -- increase font size of selected text
- < -- decrement url last number in location bar url by 1 same as [prev:]
- > -- increment url last number in location bar url by 1 same as [next:]
- G -- Google search from selection or dialog (from location bar use [g:] instead)
- gg:fix -- Google Groups fix threaded list by removing last column [gg:fix]
- GV -- Google Voice (bookmark)
- H -- Highlight selection with yellow background [yell:]
- L -- Linkify text links [linkify:]
- Pz -- PageZipper to get the Next page continuously without hitting "Next" [PageZipper:]
- Sp -- Spell Check webpage by making current page editable [spellcheck:]
- tacc: -- Text area counter from squarefree.com [tacc:]
- | -- bookmark separator
- K -- a folder I created within my
"Personal Toolbar Folder""Bookmarks Toolbar"- S -- a folder for styles I use using "Stylish" addon.
- sw -- bookmarklet to switch current url between local drive url and online url (config changes also req'd).
- | -- bookmark separator
- Cp -- color:page (restore normal font colors squarefree.com)
- nBk -- Remove background image (annoyances)
- NO -- NO: No Overlay, remove floating overlay (annoyances)
- Ns -- nostyle: Toggle CSS Stylesheet (annoyances)
- Sc -- Linearize - Single Column http://www.rightreading.com/blog/webwork/ten-of-my-favorite-bookmarklets/
- Zc -- zap:colors zap colors -- squarefree.com (annoyances)
K |
(I authored the "HREF:" bookmarklet) To expand all of the links: use the HREF visible button above |
<!-- noindex --> *** bookmarks are not to be indexed by robots [unfortunately this method of suppression is no longer recognized]Keyword Shortcuts
These are just examples, please use the k.html link (found in the #khtml section, below) for a much more complete list, that can be imported into your bookmarks, and is better able to withstand changes by text editors over time.
Many of the shortcuts below do include shortcuturl="...:" but they don't seem to get carried to the link if you drag a link to your K (for keyword shortcuts) folder, so you will have to add the shortcut yourself, See manage bookmarks. All the more reason to install by importing the k.html file.
- : (quick access to firefox.htm page add #frag-id)
- :: - Mozillazine Knowledge Base search
- [-- http://www.google.com/search?num=100&hl=en&newwindow=1&q=site%3Akb.mozillazine.org+-intitle%3Atalk+%S&btnG=Search --]
- ::: SUMO wrestling with Mozilla
- [-- http://www.google.com/search?q=site%3Amozilla.com+%S --]
- %temp%
- aardvark: Aardvark Firefox Extension
- addons: Addons search at AMO (site:addons.mozilla.org inurl:en-US/firefox/addon)
- [-- http://www.google.com/search?num=100&q=site%3Aaddons.mozilla.org+inurl%3Aen-US%2Ffirefox%2Faddon+%S --]
- ans: Answers.com keyword search
- archive: Internet Archive Wayback Machine (set up for comparisons)
- oooo archive.org ooooo
- [-- javascript:location = 'http://web.archive.org/web/*dc_/'+escape(location); void 0 --]
- babelfish: AltaVista - Babel Fish Translation
- bmk: search bookmarklet OR favelet
- bug: Retrieve Bugzilla Bug Report Number
- chrome: userChrome, userContent, launchy (user must customize based on about:cache)
- config: about:config
- dict: dictionary search at reference.com (link is not invalid, it includes %s for substitution, when invoked)
- downloads: My downloads in documents and settings
- ext: search extensions -- addons extensionroom
- ff: Firefox web pages on local HD
- use a period (spaces also work) to access the directory or firefox.htm for that page.
- file:///c:/website/dmcritchie/firefox/%S
- Improved version below with IF('%S')... [ref]-- also note capitalized %S so can handle fragment-id
- javascript:if('%S')location.href='file:///c:/copiedsite/dmcritchie/firefox/%S';else%20location.href='file:///c:/copiedsite/dmcritchie/firefox/firefox.htm';
Unfortunately the improved version is not working, even though it had worked briefly.- ffp: Firefox web pages on website
- using a period to access the directory will fail on website, since the index is not available.
- javascript:if('%S')location.href='http://dmcritchie.mvps.org/firefox/%S';else%20location.href='http://dmcritchie.mvps.org/firefox/firefox.htm';
- Unfortunately the improved version above is not working, even though it had worked briefly. use instead: http://dmcritchie.mvps.org/firefox/%s
- ff_temp: Firefox Temporary directory
- free: Search for free stuff with a Google Search
- -buy -for-sale -free-to-try -free-trial -trial -price -purchase -€* -$* %S
- g: Google quick search)
- gc: Google Cache of current page (see imillylcom/bm.htm)
- gg: Google Advanced Groups Search (*excel*)
- gga: Google Groups Advanced search Panel
- ggff: Google Groups Advanced Search (*firefox*)
- search the Firefox newsgrop mozilla.support.firefox, return 100 items at a time, even if not in your Google Groups preferences.
[-- http://groups.google.com/groups?as_ugroup=mozilla.support.firefox&num=100&as_q=%s --]- GGUK: advanced UK Excel groups search
- gguk: GoogleGroups Advanced Search
- geoLoc: – geoLoc: obtain lat/long coordinates from Google Map
- Center map first by double-clicking on desired map point
[-- javascript:void(prompt('', gApplication.getMap().getCenter())); --]- gm: – Greasemonkey – gm_scripts/config.xml in your profile directory (like chrome: must be customized to user's own profile)
- GIFL: Google, I'm Feeling Lucky
- gov: FirstGov.gov: The U.S. Government's Official Web Portal
- gu: Geocities update (file manager)
- gsite: Google Search with page's domain ‡‡‡
- [-- http://www.google.com/search?num=100&q=site:' + escape(location.hostname) + ' %S' ; void 0 --]
- help: firefox support
- highlight: highlight links (bookmarklet)
- href: HREF visible (bookmarklet)
- href: HREF:A visible (bookmarklet for Android space instead of %20)
- html40: HTML 4.0 Elements
id: Show Classes and IDs (bookmarklet)- id: Show Classes and IDs (modified bookmarklet)
- ie: Internet Explorer and OE
- infospace: search for word
- int: int/ext links (bookmarklet)
- kb: Microsoft Knowledge Base (MSKB) article
- [-- http://support.microsoft.com/kb/%s --]
- kb_: Mozilla KB title search ("kb_:")
- [-- http://www.google.com/search?num=100&hl=en&newwindow=1&q=site%3Akb.mozillazine.org+-intitle%3Atalk+%S&btnG=Search --]
- Kzz: placeholder
- l: - Librarians' Index to the Internet (search)
- lg: Lockergnome - search Google
- lg: Lockergnome's IT Professionals - January 2005 Archives
- linkchecker: Validator w3.org (chk current page)
- link: Search links to this page using AltaVista
- -- javascript:void(location.href='http://www.altavista.com/web/results?itag=ody&q=link%3A'+location.href+'&kgs=1&kls=0') --
- linked: Search links to this page using Google
- -- javascript:function search_for_links_with_google (){window.open ('http://www.google.com/search?as_lq='+document.location, '','scrollbars,location,toolbar,status, menubar,resizable');}search_for_links_with_google(); --
- lists: List of Lists
- listzilla: ExtensionsList.html in download_win2000
- moz: Search MozillaZine Forums — These are the newsgroups at forums MozillaZine
- msgid: message-id into Google Groups (UK)
- mvp: search selected MVP excel web sites
- oe: Outlook Express
- pro: Dictionary - Yahooligans! Reference 9pronunciation)-
- profile: profile directory (user must customize based on about:cache)
- red: Make visited links an obvious color -- also available to use with Stylish extension in a couple of styles:
- Red: Mark visited links as read on unruly domains | userstyles.org, Google, and some of the Mozilla and MozillaZine sites are among the worst offenders.
- Red:visited -- Mark visited links Red (*DM) | userstyles.org, Provide distinctive red coloring for visited links on all sites.
- quote: stock prices at finance.yahoo
- Qzz: placeholder
- reset: Reset (F5, bookmarklet)
- sumo: wrestling with gators (SUMO:)
- [-- https://support.mozilla.org/kb/%S --]
- sumo2: Firefox Support Home Page (HELP and Tutorials)
- [-- http://www.google.com/search?q=site%3Amozilla.com+%S&newwindow=1 --]
- stock: Business Week (symbol)
- -- http://host.businessweek.com/businessweek/Corporate_Snapshot.html?Symbol=%s --
- t: thesaurus.reference.com
- temp: get a file within file:///c:/temp
- timer: Timer Wizard
- titles: paren tips (bookmarklet)
- TV: Listings, Yahoo (User must customize)
- tv_can: Television - Entertainment - canada.com network (User must customize)
- uptime: Show uptime for site server
- validate: HTML at w3.org (this page0
- w: is for Wikipedia
- wayback: current page
- javascript:void(location.href='http://web.archive.org/web/*dc_/'+location.href)
- weather: 7-Day Forecast (user must customize based on geographical location)
- xl: Excel local files
- xlcp: Chip Pearson's Excel Topic Index
- xldd: Contextures -- Excel Tips and Techniques
- xldm:s search of David McRitchie's site
- [-- http://www.google.com/search?q=%28site%3Admcritchie.mvps.org+inurl%3A%s --]
- xljw:s j-walk mostly Excel
- xlweb: Google Search of Excel w/o newsgroup repeaters
- z: Google Search: site:dmoz.org
Resize Window Examples ☷☷☷☷ (#resize)
The following has been also added to a MozillaZine article "Resizing oversize window.JavaScript no longer allowed to resize windows
Resizing with JavaScript has been made almost impossible beginning with Firefox 7.0.1 due to Bug 565541 – Web sites shouldn't be allowed to resize main window, which essentially renders the help provided on this page as useless and leaves users with problems without a simple circumvention to regain control so they can work including to work on fixing problems.
Overriding is convoluted because you must make a configuration change (about:config) to change services.sync.prefs.sync.dom.disable_window_move_resize to false.
You must invoke the JavaScript directly from a bookmark while in "about:config" or "about:addons" (i.e. an XUL window) as the active tab, and you can not invoke the bookmarklet as a keyword shortcut from the location bar.Some idiot told everyone about using about:config, so that convoluted method was made no longer available. Invoking a simple bookmarklet is now a prolonged 6-8 step process. The following box has a picture indicating how to resize window using the Web Developer which is built-in to Firefox with Firefox 19 and generally available.
resize
FUBAR
RecoveryPicture with steps necessary to resize window to specific dimensions and/or location, now that your resize bookmarklets have been reduced to a repository catalog of code to be copied and pasted into the Web Developer Web Console [Ctrl+Shift+K]. Examples to Resize or Move windows: (Everything can be invoked from the Location Bar) The extra unforgiving extra steps have been forced ONLY upon Firefox users.
Unforturnately Firefox and Google Chrome no longer allow JavaScript to be typed and executed from the address/location bar, even though that is how bookmarklets came into being as anything done in the address bar could become a bookmarklet. The justification of this damage was that some site could mess up the window size, and user not know how to fix or avoid. So even the extra steps for Firefox do not make this work. In fact you can no longer use a bookmarklet to change the size of the window. (Bug: 132286; Bug: 331408; Bug: 646533)
- "Ctrl+T" (command+T on a Mac) to open a new Tab in the current window with a keyboard shortcut
- "R:" invoke about:config with a keyword shortcut: (title begins with (space)R: to sort as the first shortcut in a bookmark folder named "Resize")
chrome://global/content/config.xul
- invoke any Resize or Move keyword shortcut:
- "1024: Resize to a width of 1024"
javascript:self.resizeTo(1024,screen.availHeight);self.moveTo(screen.availWidth-1024,0);
- "512:L Resize and move to left side of screen as if 1/2 of 1024"
javascript:self.resizeTo(512,screen.availHeight);self.moveTo(-1,0);
- "512:R"
javascript:self.resizeTo(512,screen.availHeight);self.moveTo(845,0);
- "center:bottom"
javascript:self.moveTo((screen.width-window.outerWidth)/2,screen.availHeight-window.outerHeight)
- "center:center"
javascript:self.moveTo((screen.availWidth-window.outerWidth)/2,(screen.availHeight-window.outerHeight)/2)
- "center:max"
javascript:self.resizeTo(window.outerWidth,screen.availHeight);self.moveTo((screen.width-window.outerWidth)/2,0)
- "center:top"
javascript:self.moveTo((screen.width-window.outerWidth)/2,0)
- "iPOD: simulate iPOD on larger screen"
javascript:self.resizeTo(800,480);self.moveTo(0,0);
- "max:height"
javascript:self.resizeTo(window.outerWidth,screen.availHeight);self.moveTo(window.screenX,0);
- "max:width"
javascript:self.resizeTo(screen.availWidth,window.outerHeight);self.moveTo(0,window.screenY);
- "netbook: Simulate 800x400 resolution on a larger screen" -- see http://kb.mozillazine.org/Netbooks"
javascript:self.resizeTo(800,480);self.moveTo(0,0);
- "resize: to specified window width and available height"
javascript:self.resizeTo(%S,screen.availHeight);self.moveTo((screen.availWidth-%S)/2+1,0)
- "resize:L simulate WinKey+left-cursor-key"
javascript:self.resizeTo(screen.availWidth/2,screen.availHeight);self.moveTo(0,0);
- "resize:R"
javascript:self.resizeTo(screen.availWidth/2,screen.availHeight);self.moveTo(screen.availWidth/2+1,0);
- "resize:reduce"
javascript:top.resizeTo(screen.width*0.8,screen.height*0.8);self.moveTo(0,0);
- "Ctrl+W" (command+W on a Mac) to close current Tab and hopefully return to the Tab from whence you came.
Additional Resize/Move keyword shortcuts can be found in the "Resize" folder within k.html, use the "href:" keyword shortcut per directions to see the urls and bookmarklet coding. See this posted comment for additional details and comments.
Additional Examples ☷☷☷☷ - large set of keyword shortcuts (#khtml)
<!-- end noindex --> *** bookmarks above are not to be indexed by robots
☷☷☷☷
For now the most complete and newest list of my shortcuts can be found in my lessons materials as k.html containing on 2011-03-20 (not recounted for each version) for the k.html bookmarksInstructions to install are in the keyword section of Firefox 4 Introduction.
- 750 Key word shortcuts (keywords:count).
- 466 bookmarks w/o keywords, for awesombar reference,
- 299 JavaScript bookmarklets (bml:) in K folder,
- 1216 bookmarks included in K folder,
- 264 substitution %S (href: - then using Find All (Find Bar count) before/after. * *
☷☷☷☷
All (almost all), of my keyword shortcuts have colons in them, scroll down in the k.html file until you see them, as I've included some related materials at the top, which will help you find some articles with the location bar autocomplete ("awesomebar") and some tab capacity testing materials.You can test these bookmarklets on files exported as bookmarks.html include the k.html file created for lessons pages. "keywords:", "subs:", "bml:", and "href:"
If you do you might notice that the following bookmarklets have both Javascript (by definition bookmarklets) and substitution (%S or %s) -- "echo:" "ff:" "gsite:" "G:chr:" "here:" "similar:" "ss:" "ssd:" "subs:" "tbs:" "zillow". You would also see them appear in the AwesomeBar (Location Bar Autocomplete) if you typed " %S javascript: * ". without the quotes and did not hit Enter.
The shortcuts Kzz: and Qzz: are not really intended for use as bookmarks or as keyword shortcuts, but are to prevent a single shortcut beginning with the letter K or Q from being invoked immediately. By typing in "Q" (one letter past "P") in the K folder (click to see), I can see a list of the shortcuts (bookmarks) that begin with "P" to refresh my memory as what KWS are available. (#placeholder)
Besides those actually marked as “(User must customize)”, in the above examples, you will certainly need to customize, add, or delete shortcuts to fit your own usage.
keyword description (suggest including keyword at beginning of description) NT: -- Open in New Tab (NT:), Links to
javascript:(function(){var%20a=document.getElementsByTagName('a');for(var%20i=0,j=a.length;i<j;i++){a[i].setAttribute('target','_blank');var%20img=document.createElement('img');img.setAttribute('class',%20'new-window');img.setAttribute('src','data:image/gif;base64,'+'R0lGODlhEAAMALMLAL66tBISEjExMdTQyBoaGjs7OyUlJWZmZgAAAMzMzP///////wAAAAAAAAAAAAAA'+'ACH5BAEAAAsALAAAAAAQAAwAAAQ/cMlZqr2Tps13yVJBjOT4gYairqohCTDMsu4iHHgwr7UA/LqdopZS'+'DBBIpGG5lBQH0GgtU9xNJ9XZ1cnsNicRADs=');img.setAttribute('style','width:16px!important;height:12px!important;border:none!important;');a[i].appendChild(img);}})();ST: -- Open in Same Tab (ST:), Links to
javascript:(function(){var%20a=document.getElementsByTagName('a');for(var%20i=0,j=a.length;i<j;i++){a[i].removeAttribute('target');var%20img=a[i].getElementsByTagName('img');for(var%20k=0,l=img.length;k<l;k++){if%20(img[k].getAttribute('class')=='new-window'){img[k].parentNode.removeChild(img[k]);}}}})();The "NT" and "ST" bookmarklets are from Fixing a small iPhone annoyance… | Doctyper, New Tab Bookmarklet by Richard Herrera, which were not named, so I gave them short names including, of course, the ending colon.
The following expansion will not work once you invoke "NT:" bookmarklet: more info ►
You can view the keywords in your Bookmarks Manager listing by adding the missing columns to your Bookmarks Manager listing (View, Add columns). Bookmarks and the Bookmarks Manager are described in more detail below on my bookmarks page, see Manage Bookmarks, where you will see that the Extended Bookmarks Manager is much better than the builtin Bookmarks Manager shown below.
Some of the extensions (addons.org) and styles (userstyles.org) that I use and that you may notice in the Library List (below) and bookmark dialog (right) are:
javascript:location%20='http://webcache.googleusercontent.com/search?q=cache:'+escape(location);%20void%200
If you so desired you could make up a shortcut for every single Firefox bookmark, so it is pointless to compare the size of shortcut lists, because they are strictly an optional property of a bookmark. As indicated in the previous topic, I keep my short cuts in their own folder on the Personal Toolbar, so that I can find them quickly, but there is another way to keep track of your shortcuts.Use the Bookmarks Manager to view your bookmarks and keywords, start from the Bookmarks (menu), manage bookmarks..., then in the Bookmarks Manager, view (menu), show columns you want - Name, Location, Keyword, Description. Keywords are not shown by default. Sorting on keywords will sort them within their respective folders. Right clicking on column headers is another way to indicate which columns are to display. If you have room you can incluede Added, Last Modified, Last Visited.
Keyword Name gm: gm: GreaseMonkey config xml gmail: gmail: Gmail - Inbox gmore: gmore: More Google Products gov: gov: FirstGov.gov The US Govern... Use the KeywordBar extension by Cory Schmidt, for a nice list in the sidebar of the keywords [Ctrl+Shift+K] with all bookmarks that contain a defined keyword shortcut [picture|. Double-clicking on a keyword will insert it into the URLBar ready for you to add an operand and/or hit enter. . Context menu includes properties, and Bookmark Manager (or EBS) [EBS filter on keyword not equal to "a" is somewhat of an alternative]
The shortcuts are entered on the location bar, some with additional operands. Since I store all my keyword shortcuts in one folder I can easily find them, and can implement them from the K folder on my personal toolbar folder of bookmarks file.
Call another URL using the current url as an argument « (#url)
Not documented in Firefox, but you can create a bookmarklet as in the following example:If you were to place the following onto the Location Bar (address bar) it would invoke a website that would check the current page and report on download sizes and download time. (Copy the following line and paste to the location bar to test concept -- you must be in an online page -- http: or https:)
javascript:location = 'http://www.websiteoptimization.com/services/analyze/wso.php?url='+escape(location); void 0
Test of generated url for "Web Page Speed Report", suggested keyword "size:::"
http://www.websiteoptimization.com/services/analyze/wso.php?url=dmcritchie.mvps.org/firefox/kws.htmSo while it might have been nice to have a %u (as described for Web Developer) to include the current urlname, it is not really needed as we can use JavaScript to do that for us in a Key Word Shortcut (kws).
Create a bookmarklet to invoke another web page with the current page as an argument
This is nothing new to people who write Firefox Extensions, and Bookmarklets, but I had to discover for myself the connection to something you can easily do yourself by creating a bookmarklet and kws combination which is stored in your bookmarks file and is basically what you have available in Web Developer, but you have more control and can set up your own directory/bookmark trees with kws involved. You won't find this on Firefox's keywords page (at least not when I created this topic).
To install as a bookmarklet with a keyword simply create a bookmarklet or bookmark in a folder, and
enter the fields into bookmark properties as follows: See Bookmark Properties picture
name: size: Web Page Speed Report - WebSiteOptimization.com
location: javascript:location = 'http://www.websiteoptimization.com/services/analyze/wso.php?url='+escape(location); void 0
keyword: size:As I said I keep all of these in my K folder, but you could set up a hierarchy like the Web Developer Extension so you can find your shortcuts easier.
The Web Developer Extension (Chris Pederick) has two forms to show document size:
-- Web Developer, Tools, View Speed Report (as above but doesn't work)
-- Web Developer, Information, View Document Size (short summary size list)
If you look at Options, Options, tools in Web Developer you will see the assignments used.Some JavaScript usage with multiple links usage (#multiple) and (#javascript)
NAME/KEYWORD: source: view-source:<url> (first two work)
LOCATION: javascript:location = 'view-source:'+location
LOCATION: javascript:location.href="view-source:"+location
LOCATION:javascript:location.href='view-source:'+encodeURIComponent(location);void 0JavaScript mixed in with keyword search (#javascript_h4)
As already noted many of the keyword shortcuts are also actually bookmarklets. If you click on the "HREF visible" bookmarklet (above) you will see that many of the keyword searches on this page include JavaScript. Here is an application of two searches at once which would be implemented as a keyword shortcut.Search that targets both Google and AltaVista into two separate Tabs(/windows) (old FatJohn 2005-10-28)
javascript:void(window.open('http://www.google.com/search?q=%s')); void(window.open('http://www.altavista.com/web/results?q=%s'))MUST be invoked from a tab with content, and will then open two new tabs. These setting might possibly affect this.
browser.link.open_newwindow default integer 3 browser.link.open_newwindow.restriction user set integer 0 browser.tabs.loadBookmarksInBackground default boolean false browser.tabs.loadDivertedInBackground default boolean false browser.tabs.loadInBackground user set boolean false Multiple Urls in one link on a web page (#multiplelinks)
Open Multiple Urls in one link on a web page, also takes an extra step here to show that the link will not work if JavaScript is not active.Test <a href="javascript:window.open('tabs.htm'); window.open('../ie/bookmarklets.htm');void(0);">open two links</a> <noscript>(Test will not work because JavaScript is Turned off)</noscript>Test open two links [Recommend use of Tab Counter when working with multiple tabs, so you can see the change in the number of open tabs displayed on a toolbar]Multiple parameters in keyboard shortcuts (#parameters)
See use of multiple parameters with keyword shortcuts in Multiple parameter keyword searches - MozillaZine Knowledge Base
Restore use of AwesomeBar searching & bookmarks sidebar search of bookmarks that contain javascript not spotty results)Restore use of invoking bookmarklets with javascript, and javascript itself from location bar (and bookmarks sidebar)
- broken indirectly by Bug 565541 – Web sites shouldn't be allowed to resize main window
Restore use of move and resize in bookmarklets, broken by
- more details of what was broken in https://support.mozilla.com/questions/891249 #answer-267490
Check if "is Not a Number" (isNaN) (#isnan)
gi = global, case-insensitive search; i = case-insensitive search; (null) = case-sensitive searchname: addon: Bring up addon based on number or name
keyword: addon:
location: javascript:var%20str='%S';str=str.replace(/%20/gi,'');if(isNaN(str)){location.href='https://addons.mozilla.org/firefox/addon/'+str+'/';}else{location.href='https://addons.mozilla.org/firefox/'+str;}
Description: formerly: https://addons.mozilla.org/firefox/addon/%S -- until 2011-01-15 when addons are now known by hyphenated names instead of numbers.addon: 1865
addon: adblock-plusUse selection or prompt for string to initiate a search (#selection)
This one I use on the Bookmarks Toolbar without a keyword shortcutname: G [search Google from a selection]
location: javascript:q%20=%20''%20+%20(window.getSelection%20?%20window.getSelection() %20:%20document.getSelection%20?%20document.getSelection() %20:%20document.selection.createRange().text);%20if%20(!q) %20q%20=%20prompt('Enter%20your%20search%20here',%20'');%20if%20(q!=null) %20location='http://google.com/search?query='%20+%20escape(q).replace(/%20/g,%20'+')+'&num=100';%20void%200
Description: Search Google from a selection -- http://www.ampercent.com/useful-search-bookmarklets/5269/Use only prompt for string to initiate a search nbsp; (#prompt)
The Dolphin browser
and Boat browserson an Android do not have selection, so making the bookmarklet accept a selection or a prompt is wasted on Dolphin. Also there appears to be a length restriction of a bookmarklet size. Dolphin does not allow % characters such as space(%20) in bookmarks to be shown as the character. Boat will fill in spaces in url with %20. Here is an example of what would typically be a keyword bookmark named "gsite:" shortened to just "gs" as something that can be quickly written as a gesture. (not working in "Boat" browser as gesture and not even as just a bookmarklet.)name: gs: [gsite:] Google search within current domain (Dolphin version) (there is a space between " ")
address: javascript:s=prompt("Enter arguments:","");if(s!=null) location="http://www.google.com/search?num=100&q=site:"+escape(location.hostname)+" "+escape(s);void 0
folder: bookmarklets
Assign Gesture: gsPlain vanilla Firefox keyword search within current domain (Firefox version)
name:gsite: search for text within current domain search in Firefox)
address: javascript:location='http://www.google.com/search?num=100&q=site:'+escape(location.hostname)+'%20%S';void%200
keyword: gsite:Searches for Multiple Online/Retail Stores (#shopping)
The following is a continuation of the multiple Search described above. This time bookmarklets for online shopping and retail shopping. You can see the code using the "href:" bookmarklet near bottom of page but these are just expansions of the following pattern with a search for each store instead of a search engine shown:javascript:void(window.open('http://www.google.com/search?q=%s')); void(window.open('http://images.google.com/images?q=%s')); void(window.open('http://www.altavista.com/web/results?q=%s'))Create you JavaScript bookmarklet with a text editor (Notepad or Wordpad) and remove the line breaks and spaces between segments.As long as you installed Keyword addition style, or an extension such as the "Add Bookmark Here ²" extension you can create your bookmarklet in one-shot.
To use the examples, drag the bookmarklet to your bookmarks bar and grab the location properties from there, if you want to change.
Bookmarklets: Multiple Search as described on Keyword Search, look for javascript_h4 or open multiple pages. These bookmarklets will search multiple retailers on a search argument, each store opening into its own page so you can refine your search arguments from the generic one you used when invoking the bookmarklet. Generally for best search urls, right-click in the store's search field, and choose "Add a keyword for this search" then copy the properties into notepad, substituting %S for %s in your pattern. (This will work much better than trying to modify a completed search url, either way it must include substitution.). Drag the completed bookmarklet to a folder in your bookmarks toolbar, and provide a search name in the bookmarks properties. Any keyword you want, perhaps "shopping:online" and "shopping:local" might be better names. These are just examples.
To use type the keyword you assigned, and your search argument.
shopping:online -- Tech Bargains, etc, lowest prices shopping:online GPS
shopping:local (big box) -- shopping:local GPS
The above two bookmarks are not yet in my k.html file
Note: Don't forget that Firefox has "Open All in Tabs" at the bottom of all Bookmark folders, which is perfectly suitable for opening several links that you don't have to provide parameters, such as looking a several blogs. Right-clicking on a bookmasrk folder will produce an "Open All in Tabs" in the context menu.
Create a bookmarklet for a version comparisons page at archive.org (#archiveorg)
Suppose you don't like the way web archive.org is invoked for a web page and you want the page that gives you ability to compare two archived pages with "*dc_" instead of "*" that you get in their default searches -- simply create another bookmarklet with a keyword shortcut. Right click within the personal bookmarks folder and use New bookmark then fill in the properties --
name: archive: Internet Archive Wayback Machine
location: javascript:location = 'http://web.archive.org/web/*dc_/'+escape(location); void 0
keyword: archive:
description: wayback machine at archive.orgActual generated link would look like: http://web.archive.org/web/*dc_/http%3A//dmcritchie.mvps.org/firefox/firefox.htm
Bookmark to reopen within the current directory (#d)
name: d: reopen in directory, so Launchy can open with Windows Explorer
location: javascript:void(location.href=location.href.substring(0,location.href.substring(0,location.href.length-1).lastIndexOf('/')+1))
keyword: d:
description: see documentation in http://dmcritchie.mvps.org/kws.htm#directoryCreate a bookmarklet to translate the current page to your own language using Google Translate (#translate)
Use the encodeURIComponent to turn spaces into "+", mask control characters and punctuation, etc.
name: gt: Google Translate
location: javascript:location='http://translate.google.com/translate?u='+encodeURIComponent(location);
keyword: gt:
description: Translates from another language as found to your own languageThe encoded part of the first item below would look like http%3A%2F%2Fwww.humour.com
- http://www.humour.com (French), test with "gt:" for English
- Hoehlenfoto.de (German), test with "gt:" for English
gsite: Google Search Current Site %s (#gsite)
Suppose you want to use Google to search within the domain of the current page for the search words you want to use.
Right click within the personal bookmarks folder and use New bookmark then fill in the properties --
name: gsite: Google Search within page's domain
location: javascript:location='http://www.google.com/search?num=100&q=site:' + escape(location.hostname) + ' %S' ; void 0
keyword: gsite:
description: based on http://www.squarefree.com/bookmarklets/search.htmlname: ss: Site Search - search within site (domain)
location: javascript:void(location.href='http://www.google.com/search?&q=site:'+location.href.split(%22/%22)[2]+'+%s&sourceid=firefox')
keyword: ss:
description: based on http://lifehacker.com/software/geek-to-live/geek-to-live-fifteen-firefox-quick-searches-129658.phpname: ss:y Site Search - Yahoo search within site (domain)
location: javascript:void(location.href='http://search.yahoo.com/search?p=site:'+location.href.split(%22/%22)[2]+'+%s')
keyword: ss:y
description: based on http://lifehacker.com/software/geek-to-live/geek-to-live-fifteen-firefox-quick-searches-129658.phpCreate a bookmarklet to check domain of current page with McAfee Site Advisor (#mcafee)
McAfee site advisor only reports on the domain name, convert this bookmarklet: http://www.siteadvisor.com/lookup/?q=%s extracted from it's search form into a bookmark to give results based on current page domain.
Use the encodeURIComponent to turn spaces into "+", mask control characters and punctuation, etc.
name: advisor: mcafee site advisor
location: javascript:void(location.href='http://www.siteadvisor.com/lookup/?q='+location.href.split(%22/%22)[2])
keyword: advisor:
description: McAfee SiteAdvisor - Protection from adware, spam, viruses, and online scams.Create a bookmarklet to check high level domain name and TLD of current page with domainfinder (#domainfinder)
whoisnt.net and nfhost.com have slipped away, but if there is a need to submit a web request from the domainname and the TLD as separate items this bookmarklet show how that can be done, if needed.whoisnt.net (Domainfinder), required the hostname to be split up between the ?second level? domainname and the TLD {com, net, org, uk, us, biz, info, name, etc.}. This bookmarklet if used on this webpage will generate the requisite url
–http://whoisnt.nfshost.com/?show_raw=1&domain=mvps&ext=org
name: domainfinder: whois search for current url
location: javascript:void(location.href="http://whoisnt.nfshost.com/?show_raw=1&domain="+location.hostname.split(%22.%22)[1]+"&ext="+location.hostname.split(%22.%22)[2])
keyword: domainfinder:
description: -- May rename this bookmarklet to some form of "whois".Bookmarklets to search from within the current directory (#directory)
name: ssd: Site Search - search within current directory
location: javascript:void(location.href='http://www.google.com/search?&q=site:'+location.href.substring(0,location.href.substring(0,location.href.length-1).lastIndexOf('/')+1)+'+%s&newwindow=1&sourceid=firefox')
keyword: ssd:
description: based on techniques worked out in http://dmcritchie.mvps.org/firefox/javascript.txtBookmarklets to search based on selection (#selection)
Firefox 3.5 will allow a selection to be extended with use of Ctrl key, be sure include leading space between multiple selections.name: g:sel Google Selection(s)
location: javascript:q=""+(window.getSelection?window.getSelection()%20: %20document.getSelection%20? document.getSelection()%20:%20document.selection.createRange().text); if%20(!q)%20q%20=%20prompt("Enter%20your search%20here",%20"");%20if%20(q!=null)%20location="http://www.google.com/search?q=" +escape(q).replace(/%20/g,%20"+");%20void%200
keyword: g:sel
description: http://www.techradar.com/news/internet/web/40-productivity-boosting-search-bookmarklets-609028?artc_pg=4name: Wi: Wiktionary search of selected(typed) text; http://en.wiktionary.org/wiki/Wiktionary:Bookmarklets
location: see attempts to fix below
description: Wiktionary search of selected text or prompts for typed text
(Firefox/Netscape/Mozilla, etc), http://en.wiktionary.org/wiki/Wiktionary:Bookmarklets
example on site fails have to change the first IF.==Does what I want, only if I have a selection, and then it replaces current page== javascript:Wi=document.getSelection();%20if%20(!Wi)%20Wi=prompt('Type%20word%20for%20Wiktionary:','');if%20(Wi)%20location.href='http://en.wiktionary.org/wiki/'+escape(Wi) ==Gets a new page as wanted (with or w/o a selection), but original page also changes== javascript:Wi=document.getSelection();%20if%20(Wi == null || Wi == '') Wi=prompt('Type%20word%20for%20Wiktionary:','');if%20(Wi) void(window.open(location.href='http://en.wiktionary.org/wiki/'+escape(Wi))) ==Tried to improve by making it a function, but does same as above changes new and old page== javascript:(function(){var Wi=document.getSelection();if(Wi == null || Wi == '')Wi=prompt('Type word for Wiktionary:','');if (Wi)void(window.open(location.href='http://en.wiktionary.org/wiki/'+escape(Wi)))})();
Copy and Paste Document Properties and Selections (#paste)
For creating titled links with a (normally) small selection for web pages, email, and wikis I mainly use "CopyURL Plus" to place information into the clipboard, another extension from a single tab is "QuoteURLText". Information from multiple tabs can be copied to clipboard with
"Copy All Urls, or"Multiple Tab Handler" -- obviously they won't include text selection from multiple web pages.But keyworded bookmarklets can be used in place of extensions outside of normal profile use such as for testing in any profile that we copy our keyworded bookmarklets to without installing any extensions, and they would run in safe mode. So for a test profile there would be no impact due to extensions.
The first problem is that you can't use something simple like document.selection but you have use something like, one of these
- (window.getSelection ? window.getSelection().toString() : (document.selection ? document.selection.createRange().text: "") -- from HubLog: Updating "Selected Text" Bookmarklets
- (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text) -- from 40 productivity-boosting search bookmarklets | News | TechRadar UK
The problem with putting data to the clipboard in Firefox is that you have to change configuration settings and have to accept a challenge each time about security (or use signed code). While these bookmarklets do work and you have to copy from the dialogs, you would find the "CopyURL Plus" extension a lot easier/faster to use as you would be only using the mouse.
user_pref("signed.applets.codebase_principal_support", true);(selection / into clipboard)
To make interactive you could substitute "**cliptext**" with prompt("Enter%20your search%20here",%20"")
name: cliptext: test add to clipboard
keyword: cliptext:
location: javascript:(function(){var%20copyText="**cliptext**"; netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); var%20str=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);if(!str)return%20false;str.data=copyText;var%20trans=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(!trans)return%20false;trans.addDataFlavor("text/unicode");trans.setTransferData("text/unicode",str,copyText.length*2);var%20clipid=Components.interfaces.nsIClipboard;var%20clip=Components.classes["@mozilla.org/widget/clipboard;1"].getService(clipid);if(!clip)return%20false;clip.setData(trans,null,clipid.kGlobalClipboard);})();
description: http://osdir.com/ml/web.wiki.moin.general/2005-02/msg00025.htmlname: copy:wiki create link for a Wiki
keyword: copy:wiki
location: javascript:(function(){var%20copyText="["+document.location+"%20"+document.title+"]%20"+(window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text); netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); var%20str=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);if(!str)return%20false;str.data=copyText;var%20trans=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(!trans)return%20false;trans.addDataFlavor("text/unicode");trans.setTransferData("text/unicode",str,copyText.length*2);var%20clipid=Components.interfaces.nsIClipboard;var%20clip=Components.classes["@mozilla.org/widget/clipboard;1"].getService(clipid);if(!clip)return%20false;clip.setData(trans,null,clipid.kGlobalClipboard);})();
description:
like CopyURL+ -- (Wiki external) Blog URL Title reference
http://moinmo.in/BradeyHonsinger/CopyWikiLinkBookmarklet
http://osdir.com/ml/web.wiki.moin.general/2005-02/msg00025.html
Modified to include selection - http://dmcritchie.mvps.org/firefox/kws.htmThe next one will put the code into a prompt box that can be copied, just using the JavaScript alert dialog box for you to copy from, so that there are no configuration changes. To put to the clipboard, you would use the code similar to the copy:wiki
name: copy:title (like CopyURL PLUS)
keyword: copy:title
location: javascript:void(alert(document.title+'\n'+document.location));
description: like CopyURL+ -- Copy URL + TitleIn the next example we will replace document.selection which does not work in a Firefox bookmarklet with the selection code seen in copy:wiki, but will leave out the clipboard code, since these are really being created for testing (test profiles) without extensions or configuration changes, and I will use the CopyURL+ extension in my normal profile.
name: copy:sel [Partially revised] (like CopyURL PLUS)
keyword: copy:sel
location: javascript:void(alert(document.title+'\n'+(window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text)+'\n'+document.location));
description: like CopyURL+ -- Copy URL + Title + SelectionReplacement examples (#replace)
name: goto: remove spaces and '>' from %S and open in new tab (longurl)
keyword: goto:
location: javascript:(function()%20{var%20str="%s";str=str.replace(/%20/gi,"");str=str.replace(/>/gi,"");window.open(str)})();name: m: convert abcdotdefatgmaildotcom to abc.def@gmail.com
- Reloads to location bar will still show the actual file when this finishes.
- Replaces the last "at" with "@" using reverse
- Replaces all "dot" with "."
- Replaces "name: " with ""
- Replaces "email: " with "<"
- Inserts ">" at the very end
keyword: m:
location: javascript:void(window.location.reload(false));(function()%20{var%20str="%S";String.prototype.reverse%20=%20function%20()%20{%20%20%20%20%20return%20this.split('').reverse().join('');%20}; %20%20String.prototype.replaceLast%20=%20function%20 (what,%20replacement)%20 {%20%20%20%20%20return%20this.reverse().replace(new%20RegExp(what.reverse()), %20replacement.reverse()).reverse();%20}; %20%20str%20=%20str.replaceLast('at',%20'@');%20; str=str.replace(/>%20/gi,""); str=str.replace("Name:%20%20%20%20",""); str=str.replace("Email:%20%20%20","<");str=str.replace(/dot/gi,"."); prompt("Ready%20to%20copy%20to%20clipboard",str+">");})();Switch from test to production url in location bar
(Not quite working only converts test to production version)name: swc: bring up production version of file:///c:/copiedsite/dmcritchie/
Keyword: swc:
location: javascript:location.href=location.href.replace
("file:///c:/copiedsite/dmcritchie/","http://dmcritchie.mvps.org/")Reversal of production and test uri in location bar
Actually the following is bi-directional once the change is made is made to settings, but will go with Ralph Fox's changes in the one after this that has some additional tweaks for letter case changes.
name: sw: switch production version vs file:///c:/copiedsite/dmcritchie/
Keyword: sw:
location: javascript:if(location.href==location.href.replace
("file:///c:/copiedsite/dmcritchie/","http://dmcritchie.mvps.org/"))
{location.href=location.href.replace
("http://dmcritchie.mvps.org/","file:///c:/copiedsite/dmcritchie/")}
else
{location.href=location.href.replace
("file:///c:/copiedsite/dmcritchie/","http://dmcritchie.mvps.org/")}Bi-directional switch between test and production url (#sw)
name: sw: [switch current url Test <--> Production]
keyword: sw:
location: javascript:(function(){var%20flip='file:///c:/copiedsite/dmcritchie/';var%20flop='http://dmcritchie.mvps.org/';var%20x_xc;try{var%20x_lip=String(flip).length;var%20x_lop=String(flop).length;var%20x_old=String(top.location.href);var%20x_do=0;var%20x_new='';if(x_old%20&&%20x_old.substring(0,x_lip).toLowerCase()==String(flip).toLowerCase()){x_new=flop+x_old.substring(x_lip);x_do=1;}else%20if(x_old%20&&%20x_old.substring(0,x_lop).toLowerCase()==String(flop).toLowerCase()){x_new=flip+x_old.substring(x_lop);x_do=1;}if(x_do){top.location=x_new;}}catch(x_xc){}void(0);})()
description: sw: switch current url Test <--> Production
Ralph Fox (2010-10-01 mozilla.support.firefox) improved and pointed to fact it gets a security error see http://support.mozilla.com/en-US/kb/Links+to+local+or+network+pages+do+not+work but even with the "testlinks" extension still fails. (more in somnats)
http://kb.mozillazine.org/Links_to_local_pages_don%27t_workMailto: Examples (#email)
Email: Example for emailing a link with the subject containing the title, and the body containing the subject / title / selection(s). You can include multiple selections with the Ctrl key, just be sure to include some spacing in-between. "CopyURL Plus" extension would be my usual choice, but this would be better for an email with only one purpose -- to mail one link, and it can be used simply by copying folders of bookmarks and not using any extensions. CRLF (Carriage Return Line-feed required in Email) "%xx" must be escaped with "%25xx", so the CRLF as "%0D%0A" is escaped with "%250D%250D" [ref].
Name: email: Email Title / URL / Selection
keyword: email:
location: javascript:location.href='mailto:?SUBJECT='+document.title+'&BODY='+document.title+"%250D%250A"+escape(location.href) %20+"%250D%250A%250D%250ASelection:%20%20"+(window.getSelection%20?%20%20%20window.getSelection()%20:%20document.getSelection%20? %20document.getSelection() %20:%20document.selection.createRange().text);
description: Email the url of the current page D.McRitchie in (%xx must be escaped as %25xx) http://dmcritchie.mvps.org/firefox/kws.htmName: send: email link with Title & URL (w/o selection)
keyword: send:
location: javascript:location.href='mailto:?SUBJECT='+document.title+'&BODY='+document.title+"%250D%250A%20%20"+escape(location.href)
description: Also see mailto: which includes the selection as a summaryIf you are interested in emailing a number of links from selected tabs that are open I would suggest using the "Multiple Tab Handler" extension. A lot of my documentation relies on the "Copy URL Plus" extension in many different formats derived from the active tab.
Just a reminder the most complete and newest list of my shortcuts can be found in my lessons materials as k.html with instructions to install in the keyword section of Firefox 4 Introduction.
javascript:window.open('http://dmcritchie.mvps.org/firefox/firefox.htm','_blank')
From my section above (#replace, and from my newtab page and javascript page you will see examples like (newtab) and JavaScript bookmarklets and tools pages you will find a bookmarklet for dict: coded as:
<a class="bml" shortcuturl="dict:" title="dict: dictionary.com search" href="javascript:s=prompt('Enter word for Dictionary.com lookup:','');if(s!=null) location='http://dictionary.reference.com/browse/'+escape(s); void 0">dict:</a>
Add a Search Engine, or add a Keyword Shortcut for a search from any search Form (#addkws)
The Add to Search Bar (formerly Search Engine Ordering) Extension.
to create a search engine or a keyword shortcut by simply right-clicking within a search form and choosing between:
Add a Keyword for this Search...
Add this search to the Search Bar...The Context Search extension enhances the Search web for on the context menu to include a drop down of all of your personalized seach engines. It will not change the search engine you already have on the search bar.
Search web for "selected words" ▶This area is pretty close but needs a little work since add to search bar replaces search engine ordering extension.
Some additional pictures of the drop-downs and context menu with the searchbar drop-downs – [large drop-down] [Context menu added by Add to Search Bar extension]
It will not include anything already written into the search form, but this is a big help for making searching easier. You can test with the following, copied from http://www.mozilla.org/
This one is for my own testing, don't have the hang of forms yet, so it won't work in the normal way:
Google web search eliminating newsgroup discussions The actual search generated will be something like this (%s is your words)
http://www.google.com/search?&q%20&rest?sourceid=Mozilla-search&rest=filetype%3A html%20OR%20filetype%3Ahtm%20%0D%0A-hth%20-new.threads%20-next.thread%20-thread. index%20-vbulletin%20-top.results%20-get.paid%20%0D%0A-discussion.groups%20-reply. to.this%20-usenet-archives%0D%0Afiletype%3Ahtm%20filetype%3Ahtml%20%0D%0A-inurl%3A archive%20-inurl%3Athread%20-inurl%3Aforum%20%20-site%3Aozgrid.com&q=%sAdd to Search Bar - context menu for searchbar (#addtosearchbar_context)
Add a Keyword for this Search...
Add a Search BarThe Add to Search Bar extension adds context items to the main context menu to add search engines with a right click on the main entry area of a (search or other) form.
Additional Search Related items/extensions (#searchext)
I have included the actual addresses of the extensions above, but you might really want to look them up from my Firefox page which has additional Short Comment Notes.
- Search Engine assistance in Generating (onsite)
- Bookmarks Scrollbar adds a much needed scrollbar to your personal bookmarks, bookmarks, and search engines when the drop-down does not fit on screen. [Notes]
- Browser Keyboard Shortcuts (Table), comparison of keyboard shortcuts for major browsers used on Windows and Linux.
- Context Search :: Mozilla Add-ons :: Add Features to Mozilla Software, Expands the context menu's 'Search for' item into a list of search engines. [Notes]
- CustomizeGoogle :: Mozilla Add-ons :: Add Features to Mozilla Software, enhance Google search results by adding extra information/ [Notes]
- DictionarySearch: "Search easily in online Dictionaries", lookup (or translate) a word. [Notes]
- Enhanced Bookmark Search [Notes]
- Generate Search Plugins, searchplugins.net, search plugins for ie7 and firefox2
- Google: Web Search Help Center, solve location suffix problems in Google search (also filter on browser.fixup in Firefox preferences)
- Increase the width of the Firefox search bar and move it alongside the Firefox menu bar. [menu notes]
- KeywordBar :: Mozilla Add-ons :: Add Features to Mozilla Software, Shows a sidebar with all bookmarks that contain a defined keyword (shortcuts). [Notes]
- Mycroft Project: Sherlock &\1 OpenSearch Search Engine Plugins [Notes]
- Roll your own Firefox Search Engine, Create custom search engines to multiple sites. [Notes]
- Add to Search Bar [Notes]
- SiteAdvisor (McAfee), adds things to search engine results to warn of unsafe sites. [Notes]
Bugzilla (#bugzilla)
- Keyword shortcuts: bugs:, bugs:s,, bugs:adv (to be created)
- Search for bugs, Advanced Bugzilla Search Form
Newsgroups, threads, message-id (#newsgroups)
If anyone has a script to remove "Message-id: <" and ">", when present, would be helpful,
- msgid: bring up newsgroup thread based on Message-id in newsgroup headers.
- Bring up Google Groups for the indicated message-id
- http://groups.google.com/groups?threadm=%s
- news:ff news.mozilla.org
- Bring up single message from news server, if still present
- news://news.mozilla.org/%S
Ctrl+Z to retrieve previously entered kws (#ctrlz)
If you used a keyword shortcut to invoke a bookmarklet to change the appearance of the page you can place cursor on location bar and hit Ctrl+Z first to bring back the keyword and parameters you entered, next to show the actual url that is for the current page but became hidden. (Splibbilla 2007-07-01)Web Developer, revealed (#wd)
The following web page appears to describe how Web Developer items are defined.
- Check http://www.neowin.net/forum/index.php?showtopic=311042 seems to use %u in web developer.
- try play with this for speed and dowloaded sizes:
size: Web Page Speed Report - ebSiteOptimization.com
http://www.websiteoptimization.com/services/analyze/wso.php?url=%u
http://www.websiteoptimization.com/services/analyze/wso.php?url=http://www.markme.com/jd/archives/007858.cfm
http://www.markme.com/jd/archives/007858.cfm- Without trying to go into the code here is some insight provided by Chris Pederick
Although the examples on this page will be updated manually the initial table was generated by copying a section of bookmarks.htm (within your profile) and pasting into Excel and then using the description and embedded link to generate a string for HTML.View bookmarks.html with your browser, select the "S" folder (shortcuts, and paste into Excel. use the following Excel worksheet formula to convert links into hyperllinks for inclusion above.
A1: aardvark: Aardvark Firefox Extension
Formula as entered in cell B2:
="<dt><a href="""&pesonal.xls!url(A2)& """ shortcuturl="""&LEFT(A2,FIND(" ",A2)-1)&"""><b>" &LEFT(A2,FIND(" ",A2)-1)& "</b>" & MID(A2,FIND(" ",A2),250)&"</a></dt>"formula used to display the above for html
=pesonal.xls!htmlify(pesonal.xls!GetFormulaD(B2))To view all of the links included: click on the “HREF visible” at top of page.
Text as seen in HTML source
<dt><a href="http://karmatics.com/aardvark/" shortcuturl="aardvark:"><b>aardvark:</b> Aardvark Firefox Extension</a></dt>Was hoping inclusion of shortcuturl would allow one to drag the bookmark from here to a folder on the personal toolbar folder, but didn't work that way you still have enter the shortcut yourself under properties. If you want to update several or see what is available along with the link, and comments you can right click on the folder on your personal toolbar to bring up the context menu and use Expand just like any other bookmark folder.
Notepad is a good example of a program you want quick accessibility to from HTML if you are using a Windows system, set the string value to c:\winnt\system32\notepad.exe via about:config
extensions.editconfigfiles.config.editor.path, c:\winnt\system32\notepad.exe
greasemonkey.editor, c:\winnt\system32\notepad.exe
menux.editor.path, c:\winnt\system32\notepad.exe
view_source.editor.external, True
view_source.editor.path, c:\winnt\system32\notepad.exeThe MenuX extension provides Alt+X shortcut to open the current HTML file in Notepad. This is the easiest method I've found. caution: MenuX is reading from the location bar rather than the actual filename, though it has been fixed to ignore a fragment-id (firefox.htm#keywords) which is an improvement. Being able to specify the editor to be used in MenuX makes this work well for Windows as well as Linux users. Have since dropped MenuX as it creates too many problem such as stepping on the keyboard shortcuts of Firefox itself and of many extensions and very little of it is actually wanted. For other solutions see invoking Notepad.
The Launchy extension provides access to Notepad by name in it's context menu because Notepad is an editor. Directly edits a file if the HTML file on your local drive, and uses a temporary file if invoked from HTML on the web, which helps.
The Launchy extension provides access to a link file:///c:/winnt/system32/notepad.exe if you choose Browse Link in Explorer (from within Launchy) and then choose Open. Some of my webpages indicate a link to installed software as (/\) and you can use launchy as just described to open the link. IE would put you directly to the dialog for you to choose Open.
I have no Keywords shortcut to launch an executable file directly and this is, I'm sure, specifically by design in Firefox, though there certainly are exceptions.
Another possibility, I am hoping for is a JavaScript keyword shortcut to invoke Notepad for a local file (url).
Dev : Firefox Chrome URLs - MozillaZine Knowledge Base, a list of all standard XUL files contained by Firefox, displayed using their chrome URLs. Also shown is a description of what that URL does and how it is used. To run a chrome URL in Firefox, you must copy and paste it into the location bar. If it is type "A", then it will probably work using this method.
so I set up at keyword shortcut "b:" (to be entered on the location bar) for the Bookmarks Manager, chrome://browser/content/bookmarks/bookmarksManager.xul -- which is the only item on my View, Sidebar that is missing a keyboard shortcut.
To be added
Try Alt+T+A to get to Tools, Ad-ons If you have the MenuX extension you might have suppressed that menu item.. This should get you to the Extensions list in Firefox 2 chrome://mozapps/content/extensions/extensions.xul paste the above line into your location bar Not finding this in http://kb.mozillazine.org/Dev_:_Firefox_Chrome_URLs Looked in about:config for "chrome" guess it can be changed
note: Dumped this extension, myurlbar is too distracting, and has speed issues.Basically myurlbar brings the Manage Bookmarks search feature right to your location bar showing url and title. Lacks documentation but guess you've got a little more now. Links to install the myurlbar extension can be found on my Extensions Page. You can use Manage Bookmarks to find the actual bookmark. Your bookmarks and history become very handy for anyone who accesses your computer with your profile (just a friendly warning).
Use of the myurlbar somewhat shows the advantage of including a colon as part of your key word shortcuts.
Fx3 (and above) has this builtin and is much better see next topic.
The location bar in Fx3 (and above) shows a filled star on the Location bar, if the page is bookmarked.The
SmartLocation Bar Autocomplete (AwesomeBar) in Fx3 (and above) that appears automatically below the location bar, shows a star if the url is bookmarked, a tag if bookmark is tagged, and an unmarked entry if the item was found in History. The algorithms used by Firefox (frecency tables) work very well in placing your top usages first.Use of keyword shortcuts together with efficient use of the Smart Location bar (AwesomeBar), you hardly have go to directly to bookmarks or search bookmarks most of the time. The easiest way to get the Smart Location bar working efficiently for you is to use it. If you use Keyword Shortcuts, you will notice they don't have much effect on usage so you might increase the importance in the AwesomeBar by pasting the url four times into the location bar which counts as manual entry after that things should continue smoothly with normal usage. This is a lot better than trying to tweak the results by modifying frecency tables.
For more information on Places and on the AwesomeBar see awesomebar (URL bar autocomplete list).
Some things you can type into the Location Bar Autocomplete (AwesomeBar) to restrict suggestions to particular types, which can be combined, but are typed as single word characters in your location bar autocomplete. Don't use as the first word or it could be confused with a keyword shortcut. You will find some of these in about:config entries for browser.urlbar.restrict.* {bookmark | history | tag | typed}.
Unlike tags, the keyword is not a searchable entity, but if you include both '%s' and 'javascript:' when looking for something your restriction will pretty much cover most keyword shortcuts, unless the keyword just uses an unqualified bookmark ("*"). If you include your keyword in the bookmark name they would be included -- all of my keyword shortcuts are included before the rest of the name since it is the keyword I try to remember.
- restrict -- * Bookmarks, ^ History, + Tags, ~ typed
- match -- # Title, @ URL
- with substitution -- %s
- with JavaScript -- javascript:
Actually keywords are searchable without the keyword within the title (Bug 392143) but there are severe restrictions, so severe that I never realized anything had been done:
I would suggest replacing tag symbol by star with black tips, and keyword by star with red skeletal lines inside. That would make 5 star symbols including the gray outline form, and star-tipped-skeletal.
- Must include the first letter of the keyword.
- Must hit a space after for it to show up
- No modified star symbol to show it is/has a keyword.
- My method of including keywords in title works best along with the fact that I also include a colon in my keyword names.
The keyword shortcuts mentioned earlier on this page can be very useful in solving Firefox problems.Most Firefox problems can be solved with some help from one or more of the following:
- Google search of the Mozillazine Knowledge Base, the keyword shortcut ("::") as two colons is faster to type than ("kb_:") which distinguished it from the Microsoft Knowledge Base ("kb:") keyword shortcut.
- Google search of Mozillazine in General, the keyword shortcut ("moz:"), or just the Mozillazine Forums ("moz:f"), or just the KB ("::").
- Google Groups search of Mozilla newsgroups, the keyword shortcut ("ggff:")
- Help with your Profile and if on Windows also see QuickLaunch.
- Many problems can be solved by reading ALL of my Firefox Customizations (Notes), particularly in the following areas:
- Large list of practical extensions, along with information on avoiding useless extensions. I am practical minded and don't like fluffy exensions and don't use themes.
- Problems with Firefox, Problems/annoyances that many people have initially with Firefox 2.0.* (fx2) which is my own short FAQ for fx2, also have one for Firefox 3.0.* (fx3), Fx4: Firefox 4.0 Problems and Orientation (#fx4) all on the same page.
- Major Problems with Firefox (links)
- Another spage on places (new in Fx3).
- Make use of Firefox Documentation, also see MozillaZine page Tools for copying text and other content from web pages - MozillaZine Knowledge Base, bout documentation of tabs, bookmarks, and page selections as plain text, HTML text, Wiki text, blog text and of particular interest to those doing research for school, or graduate papers.
- Firefox doesn't know how to open this address, because the protocol (stocks) isn't associated with any program.
Probably means that you either misspelled something like "http:", "https:", and as seen for keyword search failures, simply means that you never created the keyword "stocks:" in this case.
Search hint for Google use:
"Firefox doesn't know how to open this address, because the protocol" "isn't associated with any program."
Please send your comments concerning this web page to: David McRitchie send email comments
Copyright © 2004 - 2014, F. David McRitchie, All Rights Reserved