Created
August 20, 2009 09:36
-
-
Save dwinter/170935 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This is a command to use the very cool NameLink API provided by the | |
* Encyclopedia of Life for adding links to biodiversity databases for | |
* any taxonomic names in a webpage: | |
* http://hickory.eol.org:8081/display/public/NameLink+Documentation | |
*/ | |
CmdUtils.CreateCommand({ | |
names: ["taxonomise", "taxonomy", "tax-links"], | |
icon: "http://www.gbif.org/favicon.ico", | |
description: "Include links from any taxon names in a website that names records in taxonomy databases", | |
help: "Type taxonomise then choose a collection (available collections explained on homepage)", | |
author: {name: "david winter", email: "[email protected]"}, | |
license: "Free", | |
homepage: "http://theatavism.blogspot.com/2009/08/link-taxonomic-names-on-any-website-to.html", | |
arguments: [{role: "object", | |
nountype: ["gbif", "col", "eol", "gti", "itis", "namebank"], | |
label: "collection"}], | |
execute: function execute(arguments) { | |
var api = "http://services.eol.org/namelink/doc/namelink_service.php?collections=" + arguments.object.text; | |
var url = "&logo=1&url=" + Application.activeWindow.activeTab.document.location.href; | |
Application.activeWindow.activeTab.document.location.replace(api+url); | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment