ctrl+shift opens result in new window
This commit is contained in:
parent
3ca270d0e2
commit
5aff3781c5
3 changed files with 8 additions and 5 deletions
|
|
@ -10,7 +10,7 @@
|
|||
<groupbox align="center" orient="horizontal">
|
||||
<vbox>
|
||||
<text value="Leo Search" style="font-weight: bold; font-size: x-large;"/>
|
||||
<text value="&version; 1.3.1"/>
|
||||
<text value="&version; 1.4.0"/>
|
||||
<separator class="thin"/>
|
||||
<text value="&createdBy;" style="font-weight: bold;"/>
|
||||
<text value="Johannes Findeisen"/>
|
||||
|
|
|
|||
|
|
@ -4,15 +4,18 @@ var leo_search = {
|
|||
this.strings = document.getElementById("leo_search-strings");
|
||||
},
|
||||
onSearchCommand: function(e, lang, sitelang) {
|
||||
// evil but done in one line... ;)
|
||||
var query = window._content.window.getSelection();
|
||||
if(query != null)
|
||||
{
|
||||
var url = "http://dict.leo.org/" + lang + "de?lang=" + sitelang + "&search=" + query;
|
||||
if(e.ctrlKey == true)
|
||||
if(e.ctrlKey == true && e.shiftKey == true) {
|
||||
window = window.open(decodeURIComponent(url), "leo_search-resultwindow");
|
||||
window.focus();
|
||||
} else if(e.ctrlKey == true && e.shiftKey == false) {
|
||||
this.newTab(url, true);
|
||||
else
|
||||
} else {
|
||||
this.newTab(url, false);
|
||||
}
|
||||
}
|
||||
},
|
||||
onFirefoxLoad: function(event) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue