User talk:Trilobite/Tools
From Wikipedia, the free encyclopedia
Based on a bookmarklet from http://www.squarefree.com, I was able to make this monstrosity of a Quick search:
javascript:q = %22%22 + ('%s' != '%' + 's' ? '%s' : window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text); if (!q) q = prompt(%22You didn't select any text. Enter a WP: shortcut:%22, %22%22); if (q!=null) location=%22http://en.wikipedia.org/wiki/WP:%22 + escape(q.replace(/ /g, %22+%22).toUpperCase()); void 0;
- If you type "wp beans" into the address bar, it goes to WP:BEANS (converts to uppercase for you)
- If you have a word highlighted on the page, like "BEANS", and type "wp" into the address bar (or press the bookmark button), it goes to WP:BEANS (you can also right-click and press the search in the menu bar with the SmartSearch extension)
- If you just type "wp" it prompts you to enter the shortcut
Originally I was just going to make a simple one to do the uppercase conversion (holding down shift is sooo difficult) but copy and paste is so easy... So the highlighted text and prompt came with it. I'll probably never use them, but I know that they're there.
Javascript can make crazy quick searches... :-) — Omegatron 03:40, 26 January 2006 (UTC)