{"action":"created","comment":{"url":"https://api.github.com/repos/zotero/translators/pulls/comments/30140625","id":30140625,"diff_hunk":"@@ -0,0 +1,227 @@\n+\n+{\n+\t\"translatorID\": \"7a81d945-7d9c-4f8c-bd7b-4226c1cab40e\",\n+\t\"label\": \"Dryad Digital Repository\",\n+\t\"creator\": \"Nathan Day\",\n+\t\"target\": \"^https?://(?:www\\\\.)?datadryad\\\\.org/\",\n+\t\"minVersion\": \"1.0\",\n+\t\"maxVersion\": \"\",\n+\t\"priority\": 100,\n+\t\"inRepository\": true,\n+\t\"translatorType\": 4,\n+\t\"browserSupport\": \"g\",\n+\t\"lastUpdated\": \"2014-11-09 20:04:09\"\n+}\n+\n+/*\n+\t***** BEGIN LICENSE BLOCK *****\n+\n+\tCopyright © 2014 Dryad Digital Repository\n+\n+\tThis file is part of Zotero.\n+\n+\tZotero is free software: you can redistribute it and/or modify\n+\tit under the terms of the GNU Affero General Public License as published by\n+\tthe Free Software Foundation, either version 3 of the License, or\n+\t(at your option) any later version.\n+\n+\tZotero is distributed in the hope that it will be useful,\n+\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\n+\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+\tGNU Affero General Public License for more details.\n+\n+\tYou should have received a copy of the GNU Affero General Public License\n+\talong with Zotero. If not, see <http://www.gnu.org/licenses/>.\n+\n+\t***** END LICENSE BLOCK *****\n+*/\n+\n+function detectWeb(doc, url) {\n+\tvar xpath = '//meta[@name=\"DC.type\"]';\n+\tif (ZU.xpath(doc, xpath).length > 0) {\n+\t\tif (ZU.xpath(doc, xpath) === \"Article\") {\n+\t\t\treturn \"Article\";\n+\t\t} else if (ZU.xpath(doc, xpath) === \"Dataset\") {\n+\t\t\treturn \"Dataset\";\n+\t\t}\n+\t}\n+\treturn false;\n+}\n+function doWeb(doc, url) {\n+\tif (detectWeb(doc, url) === \"Article\" || detectWeb(doc, url) === \"Dataset\") {\n+\t\tvar translator = Zotero.loadTranslator(\"import\");\n+\t\t// use the Embedded Metadata translator\n+\t\ttranslator.setTranslator(\"951c027d-74ac-47d4-a107-9c3069ab7b48\");\n+\t\ttranslator.setHandler(\"itemDone\", function (obj, item) {\n+\t\t\titem.abstractNote = item.extra;\n+\t\t\titem.extra = '';\n+\t\t\titem.complete();\n+\t\t});\n+\t\ttranslator.getTranslatorObject(function (obj) {\n+\t\t\tobj.doWeb(doc, url);\n+\t\t});","path":"Dryad Digital Repository.js","position":106,"original_position":62,"commit_id":"8073a78bc47de5b6159b069ae46e99baf514d151","original_commit_id":"e5f87a5b3645ae3d431f84c97ae1c2e6e8c6abf9","user":{"login":"aurimasv","id":1381759,"avatar_url":"https://avatars.githubusercontent.com/u/1381759?v=3","gravatar_id":"","url":"https://api.github.com/users/aurimasv","html_url":"https://github.com/aurimasv","followers_url":"https://api.github.com/users/aurimasv/followers","following_url":"https://api.github.com/users/aurimasv/following{/other_user}","gists_url":"https://api.github.com/users/aurimasv/gists{/gist_id}","starred_url":"https://api.github.com/users/aurimasv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aurimasv/subscriptions","organizations_url":"https://api.github.com/users/aurimasv/orgs","repos_url":"https://api.github.com/users/aurimasv/repos","events_url":"https://api.github.com/users/aurimasv/events{/privacy}","received_events_url":"https://api.github.com/users/aurimasv/received_events","type":"User","site_admin":false},"body":"I'd like you to address this. While it works, `.getTranslatorObject` is rather complex due to sandboxing and we should avoid it as much as possible.","created_at":"2015-05-12T14:43:22Z","updated_at":"2015-05-12T14:43:22Z","html_url":"https://github.com/zotero/translators/pull/800#discussion_r30140625","pull_request_url":"https://api.github.com/repos/zotero/translators/pulls/800","_links":{"self":{"href":"https://api.github.com/repos/zotero/translators/pulls/comments/30140625"},"html":{"href":"https://github.com/zotero/translators/pull/800#discussion_r30140625"},"pull_request":{"href":"https://api.github.com/repos/zotero/translators/pulls/800"}}},"pull_request":{"url":"https://api.github.com/repos/zotero/translators/pulls/800","id":24156046,"html_url":"https://github.com/zotero/translators/pull/800","diff_url":"https://github.com/zotero/translators/pull/800.diff","patch_url":"https://github.com/zotero/translators/pull/800.patch","issue_url":"https://api.github.com/repos/zotero/translators/issues/800","number":800,"state":"open","locked":false,"title":"translator for Dryad Digital Repository","user":{"login":"rnathanday","id":1653619,"avatar_url":"https://avatars.githubusercontent.com/u/1653619?v=3","gravatar_id":"","url":"https://api.github.com/users/rnathanday","html_url":"https://github.com/rnathanday","followers_url":"https://api.github.com/users/rnathanday/followers","following_url":"https://api.github.com/users/rnathanday/following{/other_user}","gists_url":"https://api.github.com/users/rnathanday/gists{/gist_id}","starred_url":"https://api.github.com/users/rnathanday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnathanday/subscriptions","organizations_url":"https://api.github.com/users/rnathanday/orgs","repos_url":"https://api.github.com/users/rnathanday/repos","events_url":"https://api.github.com/users/rnathanday/events{/privacy}","received_events_url":"https://api.github.com/users/rnathanday/received_events","type":"User","site_admin":false},"body":"This translator for Dryad Digital Repository biases the translator toward the embedded metadata.","created_at":"2014-11-10T15:59:49Z","updated_at":"2015-05-12T14:43:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d1031ed1e11b2863ae2cd87ac03aca68cac7e0c0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zotero/translators/pulls/800/commits","review_comments_url":"https://api.github.com/repos/zotero/translators/pulls/800/comments","review_comment_url":"https://api.github.com/repos/zotero/translators/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zotero/translators/issues/800/comments","statuses_url":"https://api.github.com/repos/zotero/translators/statuses/8073a78bc47de5b6159b069ae46e99baf514d151","head":{"label":"rnathanday:dryad","ref":"dryad","sha":"8073a78bc47de5b6159b069ae46e99baf514d151","user":{"login":"rnathanday","id":1653619,"avatar_url":"https://avatars.githubusercontent.com/u/1653619?v=3","gravatar_id":"","url":"https://api.github.com/users/rnathanday","html_url":"https://github.com/rnathanday","followers_url":"https://api.github.com/users/rnathanday/followers","following_url":"https://api.github.com/users/rnathanday/following{/other_user}","gists_url":"https://api.github.com/users/rnathanday/gists{/gist_id}","starred_url":"https://api.github.com/users/rnathanday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnathanday/subscriptions","organizations_url":"https://api.github.com/users/rnathanday/orgs","repos_url":"https://api.github.com/users/rnathanday/repos","events_url":"https://api.github.com/users/rnathanday/events{/privacy}","received_events_url":"https://api.github.com/users/rnathanday/received_events","type":"User","site_admin":false},"repo":{"id":26136969,"name":"translators","full_name":"rnathanday/translators","owner":{"login":"rnathanday","id":1653619,"avatar_url":"https://avatars.githubusercontent.com/u/1653619?v=3","gravatar_id":"","url":"https://api.github.com/users/rnathanday","html_url":"https://github.com/rnathanday","followers_url":"https://api.github.com/users/rnathanday/followers","following_url":"https://api.github.com/users/rnathanday/following{/other_user}","gists_url":"https://api.github.com/users/rnathanday/gists{/gist_id}","starred_url":"https://api.github.com/users/rnathanday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnathanday/subscriptions","organizations_url":"https://api.github.com/users/rnathanday/orgs","repos_url":"https://api.github.com/users/rnathanday/repos","events_url":"https://api.github.com/users/rnathanday/events{/privacy}","received_events_url":"https://api.github.com/users/rnathanday/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rnathanday/translators","description":"Zotero Translators","fork":true,"url":"https://api.github.com/repos/rnathanday/translators","forks_url":"https://api.github.com/repos/rnathanday/translators/forks","keys_url":"https://api.github.com/repos/rnathanday/translators/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rnathanday/translators/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rnathanday/translators/teams","hooks_url":"https://api.github.com/repos/rnathanday/translators/hooks","issue_events_url":"https://api.github.com/repos/rnathanday/translators/issues/events{/number}","events_url":"https://api.github.com/repos/rnathanday/translators/events","assignees_url":"https://api.github.com/repos/rnathanday/translators/assignees{/user}","branches_url":"https://api.github.com/repos/rnathanday/translators/branches{/branch}","tags_url":"https://api.github.com/repos/rnathanday/translators/tags","blobs_url":"https://api.github.com/repos/rnathanday/translators/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rnathanday/translators/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rnathanday/translators/git/refs{/sha}","trees_url":"https://api.github.com/repos/rnathanday/translators/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rnathanday/translators/statuses/{sha}","languages_url":"https://api.github.com/repos/rnathanday/translators/languages","stargazers_url":"https://api.github.com/repos/rnathanday/translators/stargazers","contributors_url":"https://api.github.com/repos/rnathanday/translators/contributors","subscribers_url":"https://api.github.com/repos/rnathanday/translators/subscribers","subscription_url":"https://api.github.com/repos/rnathanday/translators/subscription","commits_url":"https://api.github.com/repos/rnathanday/translators/commits{/sha}","git_commits_url":"https://api.github.com/repos/rnathanday/translators/git/commits{/sha}","comments_url":"https://api.github.com/repos/rnathanday/translators/comments{/number}","issue_comment_url":"https://api.github.com/repos/rnathanday/translators/issues/comments{/number}","contents_url":"https://api.github.com/repos/rnathanday/translators/contents/{+path}","compare_url":"https://api.github.com/repos/rnathanday/translators/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rnathanday/translators/merges","archive_url":"https://api.github.com/repos/rnathanday/translators/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rnathanday/translators/downloads","issues_url":"https://api.github.com/repos/rnathanday/translators/issues{/number}","pulls_url":"https://api.github.com/repos/rnathanday/translators/pulls{/number}","milestones_url":"https://api.github.com/repos/rnathanday/translators/milestones{/number}","notifications_url":"https://api.github.com/repos/rnathanday/translators/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rnathanday/translators/labels{/name}","releases_url":"https://api.github.com/repos/rnathanday/translators/releases{/id}","created_at":"2014-11-03T20:23:01Z","updated_at":"2015-05-01T18:42:45Z","pushed_at":"2015-05-12T14:28:04Z","git_url":"git://github.com/rnathanday/translators.git","ssh_url":"git@github.com:rnathanday/translators.git","clone_url":"https://github.com/rnathanday/translators.git","svn_url":"https://github.com/rnathanday/translators","homepage":"http://www.zotero.org/support/dev/translators","size":11291,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"zotero:master","ref":"master","sha":"1b433db7933db6bf82cfa2baba6e709184355054","user":{"login":"zotero","id":891917,"avatar_url":"https://avatars.githubusercontent.com/u/891917?v=3","gravatar_id":"","url":"https://api.github.com/users/zotero","html_url":"https://github.com/zotero","followers_url":"https://api.github.com/users/zotero/followers","following_url":"https://api.github.com/users/zotero/following{/other_user}","gists_url":"https://api.github.com/users/zotero/gists{/gist_id}","starred_url":"https://api.github.com/users/zotero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zotero/subscriptions","organizations_url":"https://api.github.com/users/zotero/orgs","repos_url":"https://api.github.com/users/zotero/repos","events_url":"https://api.github.com/users/zotero/events{/privacy}","received_events_url":"https://api.github.com/users/zotero/received_events","type":"Organization","site_admin":false},"repo":{"id":1991863,"name":"translators","full_name":"zotero/translators","owner":{"login":"zotero","id":891917,"avatar_url":"https://avatars.githubusercontent.com/u/891917?v=3","gravatar_id":"","url":"https://api.github.com/users/zotero","html_url":"https://github.com/zotero","followers_url":"https://api.github.com/users/zotero/followers","following_url":"https://api.github.com/users/zotero/following{/other_user}","gists_url":"https://api.github.com/users/zotero/gists{/gist_id}","starred_url":"https://api.github.com/users/zotero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zotero/subscriptions","organizations_url":"https://api.github.com/users/zotero/orgs","repos_url":"https://api.github.com/users/zotero/repos","events_url":"https://api.github.com/users/zotero/events{/privacy}","received_events_url":"https://api.github.com/users/zotero/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zotero/translators","description":"Zotero Translators","fork":false,"url":"https://api.github.com/repos/zotero/translators","forks_url":"https://api.github.com/repos/zotero/translators/forks","keys_url":"https://api.github.com/repos/zotero/translators/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zotero/translators/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zotero/translators/teams","hooks_url":"https://api.github.com/repos/zotero/translators/hooks","issue_events_url":"https://api.github.com/repos/zotero/translators/issues/events{/number}","events_url":"https://api.github.com/repos/zotero/translators/events","assignees_url":"https://api.github.com/repos/zotero/translators/assignees{/user}","branches_url":"https://api.github.com/repos/zotero/translators/branches{/branch}","tags_url":"https://api.github.com/repos/zotero/translators/tags","blobs_url":"https://api.github.com/repos/zotero/translators/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zotero/translators/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zotero/translators/git/refs{/sha}","trees_url":"https://api.github.com/repos/zotero/translators/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zotero/translators/statuses/{sha}","languages_url":"https://api.github.com/repos/zotero/translators/languages","stargazers_url":"https://api.github.com/repos/zotero/translators/stargazers","contributors_url":"https://api.github.com/repos/zotero/translators/contributors","subscribers_url":"https://api.github.com/repos/zotero/translators/subscribers","subscription_url":"https://api.github.com/repos/zotero/translators/subscription","commits_url":"https://api.github.com/repos/zotero/translators/commits{/sha}","git_commits_url":"https://api.github.com/repos/zotero/translators/git/commits{/sha}","comments_url":"https://api.github.com/repos/zotero/translators/comments{/number}","issue_comment_url":"https://api.github.com/repos/zotero/translators/issues/comments{/number}","contents_url":"https://api.github.com/repos/zotero/translators/contents/{+path}","compare_url":"https://api.github.com/repos/zotero/translators/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zotero/translators/merges","archive_url":"https://api.github.com/repos/zotero/translators/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zotero/translators/downloads","issues_url":"https://api.github.com/repos/zotero/translators/issues{/number}","pulls_url":"https://api.github.com/repos/zotero/translators/pulls{/number}","milestones_url":"https://api.github.com/repos/zotero/translators/milestones{/number}","notifications_url":"https://api.github.com/repos/zotero/translators/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zotero/translators/labels{/name}","releases_url":"https://api.github.com/repos/zotero/translators/releases{/id}","created_at":"2011-07-03T17:40:38Z","updated_at":"2015-05-07T23:58:49Z","pushed_at":"2015-05-12T14:28:04Z","git_url":"git://github.com/zotero/translators.git","ssh_url":"git@github.com:zotero/translators.git","clone_url":"https://github.com/zotero/translators.git","svn_url":"https://github.com/zotero/translators","homepage":"http://www.zotero.org/support/dev/translators","size":17147,"stargazers_count":141,"watchers_count":141,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":119,"mirror_url":null,"open_issues_count":118,"forks":119,"open_issues":118,"watchers":141,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zotero/translators/pulls/800"},"html":{"href":"https://github.com/zotero/translators/pull/800"},"issue":{"href":"https://api.github.com/repos/zotero/translators/issues/800"},"comments":{"href":"https://api.github.com/repos/zotero/translators/issues/800/comments"},"review_comments":{"href":"https://api.github.com/repos/zotero/translators/pulls/800/comments"},"review_comment":{"href":"https://api.github.com/repos/zotero/translators/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zotero/translators/pulls/800/commits"},"statuses":{"href":"https://api.github.com/repos/zotero/translators/statuses/8073a78bc47de5b6159b069ae46e99baf514d151"}}}}