|
QLookup is a quick hack to add Google and Dictionary lookups to the context menu in Mozilla. All you need to do is highlight a word or phrase on a web page and then right-click and select "Google" or "Dictionary" to perform a lookup on the selected word or phrase.
Simple hack? Yep. I firmly believe that (XPI + simple hacks) = success for Mozilla. I did this mainly for myself, because I wanted it. Send me a note if there's something else you'd like to see beyond Google and Dictionary.com. This is what Mozilla is all about. Enjoy.
Recently
I'm Mike Stricklin and I've recently (Oct 2002) adopted QLookup. It looked like a neat hack,
but didn't work on my 1.1 browser, so I poked at the code and it seemed to be easy to fix.
I've also changed a number of behaviors which may or may not be popular; let me know how you feel.
Fixes/Features
- No longer hangs Mozilla 1.1 and better on shutdown.
- All searches open in tabs now, rather than new windows. "It's the Mozilla way! ©"
- Properly fetches selections from sub-frames.
- If a string has a leading or trailing space, it's trimmed before 'Go to URL'.
- If no-thing is selected, the QLookup menu items are disabled. Code for this ripped off from the LeoDict project.
- Example code for extending included inline, in source code, also new page for same.
- Hokay. I've been convinced that my schema for 'Go to URL' is wrong! wrong! wrong! It's possible to have interior spaces in URLs, and not necessarily a good thing to prepend 'http://'. Now we're back to the original functionality: whatever is selected, Go to URL will pass on the mozilla to use as best it can. Faulty URLs are *your* responsibility ;->
Install QLookup email the author
Test Matrix
| | Linux | MacOS X | MacOS old | Windows |
| 1.0 | | | | X |
| 1.0.1 | | | | |
| 1.1 | X | | X | X |
| 1.2.1 | X | | X | |
If you do not get a response to a question posted in this forum, please try sending a message to the project's mailing list or to the project owner directly.
-
Post any questions or comments here.
-
is there a way to hack the hack to make results open in a new tab instead of a new window?
-
I like it, but can I get it to open a tab instead of a new window? I am HOOKED on tabs in Mozilla!!! :)
Thanx! Richard
-
Qlookup http://qlookup.mozdev.org/ adds the term snarf!!! to the Help menu.
The item can be checked or unchecked.
A definition of snarf /vt./ "To grab, esp. to grab a large document or file for the purpose of using it with or without the author's permission" raises questions regarding the safety and purpose of this menu item.
Can anyone explain the function behind this menu item and validate its safety?
Thanks
shipdoc
-
Yeah, I noticed "Snarf!!!" on my Help menu as well... I was wondering where that came from. Please do tell, what does it do, if anything?
-
Yes, it is possible to make it open in a tab instead of a new window, if you are using tabs. I submitted a patch to the author on 2002-05-24 with the modifications necessary to do so. I have as of yet received no reply.
I have now made the patch available from http://www.paganpaths.org/~lebleu/qlookup.js-tabpatch.txt as well.
Enjoy! -- Kevin
-
Hi, FYI, I posted this in the "netscape.mozilla.user.win32" NG:
--- Original Message --- On 2002-06-05 5:06 PM, walkAbout wrote:
Hi,
the latest builds seems to have a new bug. Or it is one of the add-ons I'm using (spellchecker, prefbar, calendar, qlookup). Ok, I will try it also without addons.
The problem is, when I exit Mozilla, I'm unable to reload it again. The splash screen appears and then nothing. Weird that I can open mailnews, so probably it is an addon that causes this.
Anyone else noticed this??
CU walkAbout
Hi again,
so for now I think it is the qlookup plugin. I did a new install just without this one and Mozilla works so far.
CU walkAbout
Jay Garcia (NS champion): When you exit Mozilla, do CTRL+ALT+DEL to bring up the "task list". If "mozilla" is listed then "end task" on it and try again. This anomaly happens sometimes when exiting from the mail/news component.
Yes Jay, that's what I did several times. Although Mozilla is completely removed from the memory, it doesn't start. Without the qlookup plugin everything is fine. If I have the time, I will forward these postings to guy, who developed this plugin.
CU walkAbout
-
I hope it is one of these addons that is flooding this fourm. In answer to your question, qlookup is highly unlikely to be causing the problem. It is, as the author says, just an interface hack, implemented via Javascript. You could probably remove Snarf if you like, its probably just for debugging.
-
Hi, sorry for the flood. I used accidental a local proxy server and this might caused the problem for the flood. This time without proxy... To the topic. Since I removed QLookup my Mozilla runs fine again.
-
I too have had problems with qlookup killing the latest builds of mozilla on winxp
-
A realy cool context menu addon would be the ability to right click a <li>link</li> and open it in the Wayback machine or the Google cache.
-
google search is kind of obsolete (moz already has 'Web search for "/selection/"' popup menu item).
-
I like the feature for highlighting and doing a "new search" based on your selection. Is Qlookup the feature that so this too? I can't seem to find any others that mention it. If so I'd like to make some long needed changes if I can.
-
What does snarf do?
Suggestion: delete google search, add thesaurus, add translator, add tabs support or pop support, another idea is to have definitions appear as tooltips.
-
Just started tinkering with qlookup.. perfect addon for me with a few changes. Changed to a context submenu (adding 7-10 search items, so this is less cluttered), removed Snarf, and made the results come up in tabs (many thanks to Kevin C. for the initial code posted above)
Minh-or anyone else, really-a thesaurus and hopefully translation are in the works for my little modification, any interest in the results when they're finished?
-
Jason, opening links in wayback or google cache would be great!
Sysinfo: yep, that would sound interesting. Where do I sign up? ;-)
-
Qlookup and Mozilla 1.1 don't like each other. I also get the "mozilla.exe won't end process" problem, and I links that open in new windows will no longer load. Which sort of sucks. I love this plugin, but if it is causing so many problems, I really want to know how to remove it.
-
Manually, like any other XPI add-on not having an uninstall routine.
1- Quit mozilla, even the quicklaunch feature. 2- Open a file browser (explorer in Windows), go to the directory where you installed Mozilla. (Mozilla) 3- Delete the "Mozillachromeoverlayinfo" directory, and the file "Mozillachromechrome.rdf". 4- Delete the offending add-on *.jar file in the "Mozillachrome" directory, or in this case, it is in a subdirectory tree called "Mozillachromeqlookup". Delete that directory. 5- Start Mozilla.
-
Oh well, that thing looks really messed up....
1- Quit mozilla, even the quicklaunch feature.
2- Open a file browser (explorer in Windows), go to the directory where you installed Mozilla. Enter the "chrome" directory under Mozilla home.
3- Delete the "overlayinfo" subdirectory, and the file "chrome.rdf".
4- Delete the offending add-on *.jar file, or in this case, it is a subdirectory tree called "qlookup". Delete that subdirectory.
5- Start Mozilla.
I hope this helps.
georgie
-
Thanks for the tips - I assume deleting all the overlayinfo directory will kill all your XPIs. Although, I bit the bullet and just uninstalled Moz and reinstalled it and then came back here, reinstalling all my XPIs (except Qlookup, unfortunately). How do you install XPIs without having to download them again?
Sysinfo, Qlookup kicked butt when I used Moz 1.0 - if you are willing to make a "Son of Qlookup", please post it on Mozdev, I think we would all be very interested!
-
I see, deleting /overlayinfo and chrome.rdf is okay, since Moz will rebuild them when you restart it.
-
Any fix on this, I had a clean Mozilla 1.1 install and just added this feature (I wanted the dictionary feature). I replicated all the hangs mentioned above. Ended up reinstalling 1.1 which removed the plug in -- all is well now without it again :(.
-
Qlookup has been put up for adoption...Sysinfo or whoever, please adopt this kickass XPI...
-
Would you add a note in "What's new" as follows: "Qlookup doesn't work with Mozilla 1.1, 1.2a"
-
>It doesn't seem to work in a frames-based page -- I'm >probably pulling the selection from the frame >definition page, not the currently active page... >drop me a line if you know a better way to: >selection = window._content.document.getSelection();
Hi! If you still curious here is how to do it:
var focusedWindow = document.commandDispatcher.focusedWindow; var selection = focusedWindow.__proto__.getSelection.call(focusedWindow);
Please, keep the project alive, Sorry for bad english.
-
Hello All! It's me again.
I have fixed problem with "mozilla.exe won't end process" and "won't open links in new window". Also have i added posibility to use it on pages with frames and other small changes. I have tested it on mozilla 1.2a on Linux and win98.
How can i post here modified version?
Sorry again for bad english, Roman Stukalov <zulus3@yahoo.com>
-
Hello, Roman,
why don't you adopt qlookup - I believe it's up for adoption.
Dominic Tey
-
Thanks, Mike for your adoption and improvements,
It's confiremd that it works for Mozilla 1.1 (Gecko/20020826) on Windows XP (haven't tested the sub-frame thingy but I have no doubt it will work too :-)
And searches appear in a New Tab which is truly "The Mozilla way! ©" as you said. Really, really appreciate this.
And as for your RFC, I think a error message is more informative (and looks less like a bug on qlookup/mozilla's part) than if an empty search tab is opened (which also has the disadvantage in shifting the user's focus to the new tab, and confusion the user)
Dominic Tey
-
It works on Mozilla 1.2b (20021007).
I LOVE the Go To URL option ! It's something I've been asking for in the main Mozilla trunk... Though it could use some recognition of the highlighted string, to see if it really is an URL (the most basic way would be: "the string has no space inside, and either is a number, or has one dot in it").
-
love that it has been updated. how about an option to change where the dictionary lookup goes to? I prefer meriam webster's online dictionary (www.m-w.com) to dictionary.com
-
To get a lookup at m-w.com, you can change the file to read <menuitem id="qlookup-dict" label="Lookup at m-w.com" oncommand="doLookup('http://www.m-w.com/cgi-bin/dictionary?va=')"/>
This isn't the best way to do the update; I should really create a new item or somesuch.
-
*sigh* I didn't realize the comments quote the HTML properly. And I didn't specify which file.
You can modify the file qlookup.xul (version 1.5 line 40) to read:
<menuitem id="qlookup-dict" label="Lookup at m-w.com" oncommand="doLookup('http://www.m-w.com/cgi-bin/dictionary?va=')"/>
-
-
Thanks for adopting and updating this Mike!
One thing I have to disagree with is testing whether something selected for "Go to URL" is really a URL. If you use the Mozilla feature where you can create keyword bookmarks that take a parameter, so, for example you can make typing "bug 1234" in the URL bar show you Mozilla bug #1234 or "cache URL" open the URL in the Google cache, then you may find it useful to treat the phrase "bug 1234" as a URL you can go to. (Espescially if it is on Slashdot ;)
Just my humble suggestion -- Kevin
-
-
Hello,
Just installed it and love it.
Anyway, I am using Mozilla 1.2.1 (20021130 WinXP) and whenever I right click on the page the menu items are not disabled even if nothing is highlighted. I think the function isSelection() does not get invoked, don't know why.
I also made a hack so that the tab is opened based on the load links in the background preference. I copied the codes from mozgest :)
// preferences root branch
var prefRoot =
Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("");
function doUrl(urlToLoad) {
var browser = getBrowser();
// Original line
// browser.selectedTab =
// browser.addTab(urlToLoad, getReferrer(document));
var tab = browser.addTab(urlToLoad, getReferrer(document));
if (!prefRoot.getBoolPref("browser.tabs.loadInBackground"))
browser.selectedTab = tab;
}
-
Hello,
Now I know why the menu items are not disabled even there is not any text highlighted. isSelection() is not called because linky was installed and linky.xul has onpopupshown on the same id too:
<popup id="contentAreaContextMenu" onpopupshown="linkyContext()">
So, I created a submenu based on what Sam wrote:
<popup id="contentAreaContextMenu">
<menu label="QLookup">
<menupopup onpopupshown="isSelection()">
<menuitem id="qlookup-goog" ...
<menuitem id="qlookup-url" ...
<menuitem id="qlookup-dict" ...
</menupopup>
</menu>
</popup>
and now qlookup and linky are together happily!
-
-
Qlookup is great, thanks. Esp. love the url feature.
I have noticed one problem that I think might be attrubuted to qlookup. I use mozilla 1.2.1 at work and at home. At home I ahve qlookup installed, and sometimes when I click in the address bar, it will highlight the entire url and I can't click to deselect it. I'll have to use the arrow keys to get the cursor back. At work, I do not have qlookup installed and I do not notice the problem there. Anyone having the same issue?
-
-
Has anyone been able to get qlookup work with Phoenix 0.5? Thanks in advance,
-
does anyone know how to get two sites to load at the same time like Opera's super search.. and when it comes to the google advanced search isnt that the same way one would get the google directory search? and if so why isnt it in there.
-
// ==============
// original code didnt contain keywords
//
function doLookup(prefix) {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlToLoad = prefix+selection;
doUrl(urlToLoad);
}
-
Great toy, this QLookup! Thanx! Among my long list in the popup menu I could donate the following:
<menuitem id="qlookup-images" label="Lookup at Google Images" oncommand="doLookup('http://images.google.com/images?client=googlet&q=')"/>
that one was easy... didn't work the code for Google's 'Web Directory' yet, though. Also, I need more universal code to process entries in non-English, non-Latin languages, anyone to help?
Another working code:
<menuitem id="qlookup-ebay" label="Lookup at eBay" oncommand="doLookup('http://search.ebay.com/search/search.dll?MfcISAPICommand=GetResult&query=')"/>
Naturally, this trick will work with national eBays, like eBay.de, eBay.jp, whatever. Here, also, I need some advanced help: how do you make external search at eBay having 'Search in titles AND descriptions' marked? Anyone to help?
Also, looking for code to include Wikipedia, Slashdot, Tucows News, Sourceforge, Freshmeat, Britannica, MapQuest, Oxford English Dictionary (if it's possible at all, w/out subscription...), and whatnot.
To QLookup creators: one little bug -- QLookup interferes with my Googlebox (out of Multizilla):
"The file /search?sourceid=mozclient&q={mysearchword} cannot be found. Please check the location and try again". Naturally, only {mysearchword} was entered and visible in the Googlebox. Out of two Googlebox and QLookup smart services, I need both, how do I disentangle them, please? Shouldn't be very hard, I suppose...
Thanx again, and please reply here.
AU
-
If you look at the screenshot he has im wondering how do you get his oter menue items? Also, how do you arrange your menus?
Thanks_Aaron Kok
-
-
i don't like having the results on another window
-
-
A minor problem with the Go to URL-function. If the selected URL contains a protocol (http://www.foo.bar/) Qlookup will try to go address www.<protocol>.com
With http-links this gives a quite surprising result: the browser is redirected to a porn site.
A small suggestion: Test the URL before determining whether it needs a protocol or not.
-
here's a request, how would one add an option to search the imdb (www.imdb.com)?
-
-
searchthis.mozdev.org don't work for me..
-
-
As a non-root user using Redhat 7.2 (Mozilla 0.9.2.1) it complains "Failed to create directory" (probably due to not having root).
Thanks,
-
Thanks you for the web, it is what I needed to complete my work.
You do a very good work and you must feel proud of it.
-
I see, deleting /overlayinfo and chrome.rdf is okay, since Moz will rebuild them when you restart it.
-
-
In the doLookup function, urlToLoad is set to "prefix+selection". I've played around with using "prefix+escape(selection)" instead. I've run into a problem when the selection is not escaped. I like to use Google to look up addresses. They may be formatted in a web page on two lines as:
123 Foobar lane
Foobar, NJ 00000
The problem with the existing code is that the lookup URL gets translated into something like http://www.google.com/search?q=123+Foobar+laneFoobar,+NJ+00000
As you can see, the linebreak between lane and Foobar is not converted. By escaping the code, the address gets converted to:
http://www.google.com/search?q=123%20Foobar%20lane%0D%0AFoobar,%20NJ%2000000
This allows google to recognize the address as an address.
Does anyone have other opinions? Can this (or should this) be rolled into the main code?
Thanks,
Sam
-
For a working example of the issue I describe, you can use the following address to select and search in google. (My provided example is bogus)
135 W. 50th Street
New York, NY 10020
--Sam
-
/*
* Quick Lookup for Mozilla
* QLookUp.Js (Example of my modifications)
*/
// ==============
// == load-time code ==
var elementTags = new Array('qoogle_web',
'google_pic',
'google_grp',
'google_dir',
'google_new',
'google_adv',
'allweb_web',
'allweb_new',
'allweb_pic',
'allweb_vid',
'allweb_mp3',
'allweb_ftp',
'all_info',
'almanacs_info',
'general_info',
'enter_info',
'sport_info',
'dict_info',
'ency_info',
'bio_info',
'web_pile',
'ima_pile',
'aud_pile',
'smd_pile',
'nws_pile',
'fil_pile',
'brd_pile',
'w_mama',
'n_mama',
'i_mama',
'a_mama',
'k_mama',
'dict',
'theo',
'go-url');
// ==============
function getSelection() {
var focusedWindow = document.commandDispatcher.focusedWindow;
var selection = focusedWindow.__proto__.getSelection.call(focusedWindow);
return String(selection);
}
// ==============
function isSelection() {
var activeP = 'true';
if (getSelection().length > 0)
activeP = 'false';
for (var i=0; i<elementTags.length; i++)
document.getElementById(elementTags[i]).setAttribute('disabled',activeP);
}
// ==============
function doUrl(urlToLoad) {
var browser = getBrowser();
browser.selectedTab = browser.addTab(urlToLoad, getReferrer(document));
}
// ==============
function doLookup(prefix) {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlToLoad = prefix+selection;
doUrl(urlToLoad);
}
// ==============
function gotoURL() {
var selection = getSelection();
if (selection.length < 1)
return;
while (1) {
if (selection.substring(selection.length - 1, selection.length) != " ")
break;
selection = selection.substring(0, selection.length - 1);
}
doUrl('http://'+selection);
}
// ==============
function doGoogleAdvanced() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http://www.google.com/search?as_q=';
urlPostfix = '&num=100&hl=en&ie=ISO-8859-1&btnG=Google+Search&as_epq=&as_oq=&as_eq=&lr=&as_ft=i&as_filetype=&as_qdr=all&as_occt=any&as_dt=i&as_sitesearch=&safe=images';
doUrl(urlPrefix + selection + urlPostfix);
}
// ==============
function doGoogleDirectory() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=';
urlPostfix = '&sa=N&tab=id&cat=gwd%2FTop';
doUrl(urlPrefix + selection + urlPostfix);
}
// ==============
function All_InfoPlease() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http://www.infoplease.lycos.com/search.php3?query=';
urlPostfix = '+&in=all&go.x=21&go.y=8';
doUrl(urlPrefix + selection + urlPostfix);
}
// ==============
function All_Almanacs_InfoPlease() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http://www.infoplease.lycos.com/search.php3?query=';
urlPostfix = '+&in=almanacs&go.x=13&go.y=6';
doUrl(urlPrefix + selection + urlPostfix);
}
// =================
function General_Almanacs_InfoPlease() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http://www.infoplease.lycos.com/search.php3?query=';
urlPostfix = '+&in=general&go.x=11&go.y=7';
doUrl(urlPrefix + selection + urlPostfix);
}
// =================
function Entertainment_Almanacs_InfoPlease() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http://www.infoplease.lycos.com/search.php3?query=';
urlPostfix = '+&in=entertainment&go.x=9&go.y=5';
doUrl(urlPrefix + selection + urlPostfix);
}
// =================
function Sports_Almanacs_InfoPlease() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http://www.infoplease.lycos.com/search.php3?query=';
urlPostfix = '+&in=sports&go.x=11&go.y=7';
doUrl(urlPrefix + selection + urlPostfix);
}
// =================
function Dictionary_InfoPlease() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http://www.infoplease.lycos.com/search.php3?query=';
urlPostfix = '+&in=dictionary&go.x=10&go.y=9';
doUrl(urlPrefix + selection + urlPostfix);
}
// =================
function Encyclopedia_InfoPlease() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http://www.infoplease.lycos.com/search.php3?query=';
urlPostfix = '+&in=encyclopedia&go.x=15&go.y=6';
doUrl(urlPrefix + selection + urlPostfix);
}
// =================
function Web_DogPile() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http://search.dogpile.com/texis/search?q=';
urlPostfix = '&cat=web&top=1';
doUrl(urlPrefix + selection + urlPostfix);
}
// =================
function Pic_DogPile() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http://search.dogpile.com/texis/search?q=';
urlPostfix = '&cat=ima&top=1';
doUrl(urlPrefix + selection + urlPostfix);
}
// =================
function Mp3_DogPile() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http://search.dogpile.com/texis/search?q=';
urlPostfix = '&cat=audio&top=1';
doUrl(urlPrefix + selection + urlPostfix);
}
// =================
function Media_DogPile() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http://search.dogpile.com/texis/search?q=';
urlPostfix = '&cat=smd&top=1';
doUrl(urlPrefix + selection + urlPostfix);
}
// =================
function News_DogPile() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http://search.dogpile.com/texis/search?q=';
urlPostfix = '&cat=nws&top=1';
doUrl(urlPrefix + selection + urlPostfix);
}
// =================
function Files_DogPile() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http://search.dogpile.com/texis/search?q=';
urlPostfix = '&cat=files&top=1';
doUrl(urlPrefix + selection + urlPostfix);
}
// ==============
function Web_Mama() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http:www.mama.com/Mamma?query=';
urlPostfix = '&image222x=31&image222.y=7&qtype=0';
doUrl(urlPrefix + selection + urlPostfix);
}
// ==============
function News_Mama() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http://www.mamma.com/Mamma?cb=Mama%2FMamma&query=';
urlPostfix = '&image222.x=38&image222.y=5&qtype=4';
doUrl(urlPrefix + selection + urlPostfix);
}
// ==============
function Images_Mama() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http://mamma18.mamma.com/Mamma_pictures?query=';
urlPostfix = '&go.x=22&go.y=8&qtype=48';
doUrl(urlPrefix + selection + urlPostfix);
}
// ==============
function Audio_Mama() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http://mamma18.mamma.com/Mamma?timeout=8&query=';
urlPostfix = '&go.x=59&go.y=9&qtype=49';
doUrl(urlPrefix + selection + urlPostfix);
}
// ==============
function Kids_Mama() {
var selection = getSelection();
if (selection.length < 1)
selection = prompt('Keywords...','');
if (selection.length < 1)
return;
urlPrefix = 'http://mamma18.mamma.com/Mamma?timeout=8&query=';
urlPostfix = '&go.x=56&go.y=5&qtype=80';
doUrl(urlPrefix + selection + urlPostfix);
}
-
-
If anyone notices any errors in the code that I posted please let me know.. I also created them into search keys. thought the two could go hand and hand.
-
It looks like your code works, but there are definitely some major issues. You have around 20 different functions that have almost identical code. This is very poor style. My recommendation is that you rewrite doLookup to take two arguments, "prefix" and "suffix" and modify the XUL accordingly. Your code will be more readable and easier to maintain.
--Sam
-
-
-
-
Please continue to improve on this excellent add-on to Mozilla. I've used over several months and loved it. It's very convenient. However, I can not find it the active project list. That is the reason I write this message. This add-on actually becomes a neccessity for web users like me using Mozilla instead of the Micro(Macro=big)s$ft I.E.
Thanks alot for your contribution.
Trung
-
-
cool plug in. add your own search engine to the source code and voila. really nice time saver for us lazy types
-
-
-
Feel like a total idiot: I made changes to both the .xul and .js files but Moz 1.3 seems not to take notice and still shows the original setup. I even moved the qlookup folder to the desktop (Windows). Obviously I'm missing something here with my first attempt at hacking.
-
Hi,
Can anyone please tell me how to make configure qlookup to open the search results in the following ways:
1. In Existing Tab.
2. In New Tab and switch focus to that tab.
3. In New Tab in the background.
I'm using TabBrowsing Extensions and somehow can't configure the qlookup behaviour to get results for each of the above scenarios.
Thanks!
-
Kevin mentioned above that it would be nice to have the selected text interpreted as a bookmark keyword. For example, selecting "bug 12345", and then the Goto URL menu item, would then use the bookmark with the "bug" keyword, and substitute the %s in the bookmark URL with 12345. This doesn't work with the current version of qlookup.js. So here's a fix. In the function doUrl(), Change this:
browser.addTab(urlToLoad, getReferrer(document))
to this:
browser.addTab(getShortcutOrURI(urlToLoad), getReferrer(document));
Another benefit of resolving bookmark keywords is that now you don't need to hardcode any URLs in your qlookup menu entries. Instead, you use the bookmark keyword, and if you later find a web application that you like better than the one you were using, you just change the bookmark URL.
For example, you have created a bookmark with a keyword for a google search. The bookmark URL is
"http://www.google.com/search?q=%s" and the keyword is "gg". This allows you to do a google search for qlookup by typing "gg qlookup" in the location bar.
So in qlookup.xul, instead of having
Now you can also easily use URLs with qlookup that require a string after the selected text. The bookmark URL can have the %s embedded anywhere in the URL. This would simplify complex menu setups as posted by NectarineBlue tremendously. No new js code is needed at all.
-
The qlookup.xul changes got stripped from my update above. Trying again. It should read:
So in qlookup.xul, instead of having
<menuitem id="google_web" label="Web" oncommand="doLookup('http://www.google.com/search?q=')"/>
you can now simply use:
<menuitem id="google_web" label="Web" oncommand="doLookup('gg ')"/>
Fun stuff!
-
What would be really cool is if it was possible to dynamically generate a popup menu with entries for all bookmarks with keywords. Could use the bookmark name as the menu item text. Anyone know if it is possible to dynamically generate popup menus?
-
Congratulations for your site
Hector gomis diseño web
-
-
-
-
All of the features of qlookup (and SearchThis), and a lot more, are available in NeedleSearch. Go take a look at http://needlesearch.mozdev.org/
Very cool.
-
Congratulation - it works!
-
Congratulations for your great job.
Héctor Gomis diseño web estudio
-
-
-
-
-
Great work!!!
/host
Diseño web hosting
-
-
-
Does it works to other languages than english?
-----
-
This site its very cool!
/
-
-
-
greetings to your great team
3-D
-
QLookup is a nice an helpful tool -
-
-
-
Hello, I just wanted to say you have a very informative site which really made me think, Thanks !
-
I just surfed in and found your site, I really enjoyed the visit and hope to come back soon. Greetings..
-
-
Thanks for the site, I really enjoyed it.
-
Congratulations for your site!
-
versteigerung
Doppeldecker
greencard usa
kosmetik shop
sofort kredit
online shopping
dvd shop
kreditkarte
versicherungsvergleich
handy shop
partnervermittling
last minute
-
-
-
-
-
Hope I'll get through all this spam!!
I have an important question about this context menue:
Will other googles (eg. google.de) or other directory services be supported by this feature?
Ulrich S. Kapp
BIGPiNG! OHG, Webdesign und Internetberatung / Web Design and Internet Consulting
kapp@bigping.de
-
IF you need voluntaries, contact me.
-
|

|
 |
5 Dec New version: 0.6.3 available. |
 |
Valid 'Go to URL' criterion re-worked. |
 |
Menu items disabled if no-thing selected. |
 |
Example code for extending functionality added. |
|