Initial commit

This commit is contained in:
Johannes Findeisen 2009-10-15 12:41:23 +02:00
commit 7bc2d97112
9 changed files with 185 additions and 0 deletions

View file

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window class="dialog"
title="Leo Search - About"
orient="vertical"
autostretch="always"
onload="sizeToContent()"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!-- Original template by Jed Brown -->
<groupbox align="center" orient="horizontal">
<vbox>
<text value="Leo Search"
style="font-weight: bold; font-size: x-large;" />
<separator class="thin" />
<text value="Created By:"
style="font-weight: bold;" />
<text value="Johannes Findeisen"
class="url"
onclick="window.open('http://hanez.org/'); window.close();" />
<separator class="thin" />
<text value="Leo Search at addons.mozilla.org:"
style="font-weight: bold;" />
<text value="hhttps://addons.mozilla.org/extensions/moreinfo.php?id=984"
class="url"
onclick="window.open('https://addons.mozilla.org/extensions/moreinfo.php?id=984'); window.close();" />
<separator class="thin" />
<text value="Home Page:"
style="font-weight: bold;" />
<text value="http://hanez.org/leo-search.html"
class="url"
onclick="window.open('http://hanez.org/leo-search.html'); window.close();" />
<separator class="thin"/>
</vbox>
<spring flex="1"/>
<image src="chrome://leo_search/skin/leo_searchb.png"/>
</groupbox>
<hbox>
<spacer flex="1"/>
<button label="Close" oncommand="window.close();"/>
</hbox>
</window>

View file

@ -0,0 +1,32 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<RDF:Seq RDF:about="urn:mozilla:package:root">
<RDF:li RDF:resource="urn:mozilla:package:leo_search"/>
</RDF:Seq>
<RDF:Seq RDF:about="urn:mozilla:overlays">
<RDF:li RDF:resource="chrome://browser/content/browser.xul"/>
<RDF:li RDF:resource="chrome://navigator/content/navigator.xul"/>
</RDF:Seq>
<RDF:Seq RDF:about="chrome://browser/content/browser.xul">
<RDF:li>chrome://leo_search/content/leo_searchOverlay.xul</RDF:li>
</RDF:Seq>
<RDF:Seq about="chrome://navigator/content/navigator.xul">
<RDF:li>chrome://leo_search/content/leo_searchOverlay.xul</RDF:li>
</RDF:Seq>
<RDF:Description RDF:about="urn:mozilla:package:leo_search"
chrome:displayName="Leo Search"
chrome:author="Johannes Findeisen"
chrome:authorURL="http://hanez.org/"
chrome:name="leo_search"
chrome:extension="true"
chrome:description="Searches for marked words in the Database at Leo.org and opens the result in a new tab.">
</RDF:Description>
</RDF:RDF>

View file

@ -0,0 +1,25 @@
function leo_search()
{
var query = window._content.document.getSelection();
if(query != null)
{
var myURL = "http://dict.leo.org/?lp=ende&lang=de&searchLoc=0&cmpType=relaxed&relink=on&sectHdr=on&spellToler=std&search=" + query;
openNewTabWith(myURL, null, null, true);
}
}
/*
function hide_show_meuitem()
{
var query = window._content.document.getSelection();
if(query != null)
{
document.getElementById("leo_search").hidden = false;
}
else
{
document.getElementById("leo_search").hidden = true;
}
}
*/

View file

@ -0,0 +1,20 @@
<?xml version="1.0"?>
<overlay id="leo_searchOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript"
src="chrome://leo_search/content/leo_searchOverlay.js">
</script>
<!-- <popup id="contentAreaContextMenu" onpopupshowing="hide_show_meuitem()"> -->
<popup id="contentAreaContextMenu">
<menuitem id="leo_search"
label="Search at leo.org"
insertafter="context-stop"
oncommand="leo_search();"
class="menuitem-iconic"
image="chrome://leo_search/skin/ende.png"/>
</popup>
</overlay>

View file

@ -0,0 +1,17 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<RDF:Seq about="urn:mozilla:skin:root">
<RDF:li resource="urn:mozilla:skin:classic/1.0" />
</RDF:Seq>
<RDF:Description about="urn:mozilla:skin:classic/1.0">
<chrome:packages>
<RDF:Seq about="urn:mozilla:skin:classic/1.0:packages">
<RDF:li resource="urn:mozilla:skin:classic/1.0:leo_search" />
</RDF:Seq>
</chrome:packages>
</RDF:Description>
</RDF:RDF>

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

28
install.rdf Normal file
View file

@ -0,0 +1,28 @@
<?xml version="1.0"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>{c666c018-6409-4479-afa3-68e4129e7eff}</em:id>
<em:name>Leo Search</em:name>
<em:version>0.3.2</em:version>
<em:description>Searches for marked words in the Database at Leo.org and opens the result in a new tab.</em:description>
<em:creator>Johannes Findeisen (you@hanez.org)</em:creator>
<em:homepageURL>http://hanez.org/leo-search.html</em:homepageURL>
<em:iconURL>chrome://leo_search/skin/leo_search.png</em:iconURL>
<em:aboutURL>chrome://leo_search/content/about.xul</em:aboutURL>
<em:file>
<Description about="urn:mozilla:extension:file:leo_search.jar">
<em:package>content/leo_search/</em:package>
<em:skin>skin/classic/leo_search/</em:skin>
</Description>
</em:file>
<!-- firefox -->
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>1.0</em:minVersion>
<em:maxVersion>3.5.*</em:maxVersion>
</Description>
</em:targetApplication>
</Description>
</RDF>