Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install
KoL Wiki Search
Search the KoL Wiki one of two ways: 1) double-click on bold text; 2) shift-click on selected text.
|
|
Minor update: changed the inclusion rules slightly. |
|
|
I've updated the script -- now you can shift-click on selected text to perform a search. There's also a hidden preference to switch between |
|
|
That?s a good idea. I think that I?d rather do it in some other way, though? |
|
|
This is an excellent script! Here's an addition I made which makes it even more useful: if (window.location.pathname == '/main.html') {
GM_registerMenuCommand("KoL Wiki search from selection", function() {
for (var f = 0; f < window.frames.length; f++) {
if (!window.frames[f].getSelection().isCollapsed) {
wikiLookup(window.frames[f].getSelection().toString());
return;
}
}
window.alert("Highlight text first!");
});
GM_registerMenuCommand("KoL Wiki search...", function() {
var term = window.prompt("KoL Wiki search term:");
if (term) {
wikiLookup(term);
}
});
}
Note that I've taken the original GM_openInTab() call and exported the functionality to a function called wikiLookup(), so that all three calls do the same thing. And personally, in my installation I use window.open(), since that opens in a new tab (with my FF configuration) but also automatically focuses on the new tab. |
You could comment on this script if you were logged in.
