{"action":"created","comment":{"url":"https://api.github.com/repos/zotero/zotero/pulls/comments/30671473","id":30671473,"diff_hunk":"@@ -100,13 +120,14 @@ Zotero.QuickCopy = new function() {\n \t\t\t+ \"WHERE setting='quickCopySite' AND (key LIKE ? OR key LIKE ?)\";\n \t\tvar urlDomain = urlHostPort.match(/[^\\.]+\\.[^\\.]+$/);\n \t\tvar rows = Zotero.DB.query(sql, ['%' + urlDomain + '%', '/%']);\n-\t\tfor each(var row in rows) {\n-\t\t\tvar [domain, path] = row.domainPath.split(/\\//);\n+\t\tfor (let i = 0; i < rows.length; i++) {\n+\t\t\tlet row = rows[i];\n+\t\t\tlet [domain, path] = row.domainPath.split(/\\//);\n \t\t\tpath = '/' + (path ? path : '');\n-\t\t\tvar re = new RegExp(domain + '$');\n-\t\t\tif (urlHostPort.match(re) && urlPath.indexOf(path) == 0) {\n+\t\t\tlet re = new RegExp(domain + '$');","path":"chrome/content/zotero/xpcom/quickCopy.js","position":129,"original_position":129,"commit_id":"6983a99f0b59746ae1c28e6823f0b642610ec9cc","original_commit_id":"6983a99f0b59746ae1c28e6823f0b642610ec9cc","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":"`domain` should be escaped with `Zotero.Utilities.quotemeta`","created_at":"2015-05-20T05:03:49Z","updated_at":"2015-05-20T05:03:49Z","html_url":"https://github.com/zotero/zotero/pull/623#discussion_r30671473","pull_request_url":"https://api.github.com/repos/zotero/zotero/pulls/623","_links":{"self":{"href":"https://api.github.com/repos/zotero/zotero/pulls/comments/30671473"},"html":{"href":"https://github.com/zotero/zotero/pull/623#discussion_r30671473"},"pull_request":{"href":"https://api.github.com/repos/zotero/zotero/pulls/623"}}},"pull_request":{"url":"https://api.github.com/repos/zotero/zotero/pulls/623","id":28522446,"html_url":"https://github.com/zotero/zotero/pull/623","diff_url":"https://github.com/zotero/zotero/pull/623.diff","patch_url":"https://github.com/zotero/zotero/pull/623.patch","issue_url":"https://api.github.com/repos/zotero/zotero/issues/623","number":623,"state":"open","locked":false,"title":"Add drop-down menu for bibliographyLocale","user":{"login":"rmzelle","id":77951,"avatar_url":"https://avatars.githubusercontent.com/u/77951?v=3","gravatar_id":"","url":"https://api.github.com/users/rmzelle","html_url":"https://github.com/rmzelle","followers_url":"https://api.github.com/users/rmzelle/followers","following_url":"https://api.github.com/users/rmzelle/following{/other_user}","gists_url":"https://api.github.com/users/rmzelle/gists{/gist_id}","starred_url":"https://api.github.com/users/rmzelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmzelle/subscriptions","organizations_url":"https://api.github.com/users/rmzelle/orgs","repos_url":"https://api.github.com/users/rmzelle/repos","events_url":"https://api.github.com/users/rmzelle/events{/privacy}","received_events_url":"https://api.github.com/users/rmzelle/received_events","type":"User","site_admin":false},"body":"Groundwork for adding a drop-down menu to the Styles tab of the Cite tab of the Zotero preferences, for selecting the bibliography locale. See also https://forums.zotero.org/discussion/45805/\r\n\r\nStill needs some work, but I'd like some guidance on how to implement things:\r\n\r\n * I placed https://github.com/citation-style-language/locales/blob/master/locales.json at https://github.com/zotero/zotero/tree/4.0/resource/schema. Is that okay? How are similar files at this location being kept up to date (like \"renamed-styles.json\")?\r\n * Fresh installs of Zotero have an empty string for \"extensions.zotero.export.bibliographyLocale\". With the current code, an empty string value for bibliographyLocale is replaced by the value of Zotero.locale when the preference tab is loaded, or, if Zotero.locale isn't set, by \"en-US\". Is this behavior problematic if the pref can be set via the UI?\r\n * The drop-down menu options are limited to the locales for which we have CSL locale files. Should there be a way to specify a custom locale code for \"extensions.zotero.export.bibliographyLocale\" via the UI? If so, what should that look like? A \"Custom...\" entry at the bottom of the drop-down list, that, if selected, pops up a dialog box with a text box?\r\n * Should there be a top-five list of most-recently used locales at the top of the drop-down list?\r\n * For some reason the drop-down box stretches across the entire window. Not sure why. XUL beats me.\r\n * I removed `width` on `<label id=\"export-citePaperJournalArticleURL\" width=\"45em\">`, since it didn't do anything on OS X. Is this still necessary? Maybe we can check on other platforms.","created_at":"2015-02-03T02:42:03Z","updated_at":"2015-05-20T05:03:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"209588d776a11b34c771bd1a775054f99375af8a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zotero/zotero/pulls/623/commits","review_comments_url":"https://api.github.com/repos/zotero/zotero/pulls/623/comments","review_comment_url":"https://api.github.com/repos/zotero/zotero/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zotero/zotero/issues/623/comments","statuses_url":"https://api.github.com/repos/zotero/zotero/statuses/6983a99f0b59746ae1c28e6823f0b642610ec9cc","head":{"label":"rmzelle:locale-selector","ref":"locale-selector","sha":"6983a99f0b59746ae1c28e6823f0b642610ec9cc","user":{"login":"rmzelle","id":77951,"avatar_url":"https://avatars.githubusercontent.com/u/77951?v=3","gravatar_id":"","url":"https://api.github.com/users/rmzelle","html_url":"https://github.com/rmzelle","followers_url":"https://api.github.com/users/rmzelle/followers","following_url":"https://api.github.com/users/rmzelle/following{/other_user}","gists_url":"https://api.github.com/users/rmzelle/gists{/gist_id}","starred_url":"https://api.github.com/users/rmzelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmzelle/subscriptions","organizations_url":"https://api.github.com/users/rmzelle/orgs","repos_url":"https://api.github.com/users/rmzelle/repos","events_url":"https://api.github.com/users/rmzelle/events{/privacy}","received_events_url":"https://api.github.com/users/rmzelle/received_events","type":"User","site_admin":false},"repo":{"id":2706599,"name":"zotero","full_name":"rmzelle/zotero","owner":{"login":"rmzelle","id":77951,"avatar_url":"https://avatars.githubusercontent.com/u/77951?v=3","gravatar_id":"","url":"https://api.github.com/users/rmzelle","html_url":"https://github.com/rmzelle","followers_url":"https://api.github.com/users/rmzelle/followers","following_url":"https://api.github.com/users/rmzelle/following{/other_user}","gists_url":"https://api.github.com/users/rmzelle/gists{/gist_id}","starred_url":"https://api.github.com/users/rmzelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmzelle/subscriptions","organizations_url":"https://api.github.com/users/rmzelle/orgs","repos_url":"https://api.github.com/users/rmzelle/repos","events_url":"https://api.github.com/users/rmzelle/events{/privacy}","received_events_url":"https://api.github.com/users/rmzelle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rmzelle/zotero","description":"","fork":true,"url":"https://api.github.com/repos/rmzelle/zotero","forks_url":"https://api.github.com/repos/rmzelle/zotero/forks","keys_url":"https://api.github.com/repos/rmzelle/zotero/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rmzelle/zotero/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rmzelle/zotero/teams","hooks_url":"https://api.github.com/repos/rmzelle/zotero/hooks","issue_events_url":"https://api.github.com/repos/rmzelle/zotero/issues/events{/number}","events_url":"https://api.github.com/repos/rmzelle/zotero/events","assignees_url":"https://api.github.com/repos/rmzelle/zotero/assignees{/user}","branches_url":"https://api.github.com/repos/rmzelle/zotero/branches{/branch}","tags_url":"https://api.github.com/repos/rmzelle/zotero/tags","blobs_url":"https://api.github.com/repos/rmzelle/zotero/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rmzelle/zotero/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rmzelle/zotero/git/refs{/sha}","trees_url":"https://api.github.com/repos/rmzelle/zotero/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rmzelle/zotero/statuses/{sha}","languages_url":"https://api.github.com/repos/rmzelle/zotero/languages","stargazers_url":"https://api.github.com/repos/rmzelle/zotero/stargazers","contributors_url":"https://api.github.com/repos/rmzelle/zotero/contributors","subscribers_url":"https://api.github.com/repos/rmzelle/zotero/subscribers","subscription_url":"https://api.github.com/repos/rmzelle/zotero/subscription","commits_url":"https://api.github.com/repos/rmzelle/zotero/commits{/sha}","git_commits_url":"https://api.github.com/repos/rmzelle/zotero/git/commits{/sha}","comments_url":"https://api.github.com/repos/rmzelle/zotero/comments{/number}","issue_comment_url":"https://api.github.com/repos/rmzelle/zotero/issues/comments{/number}","contents_url":"https://api.github.com/repos/rmzelle/zotero/contents/{+path}","compare_url":"https://api.github.com/repos/rmzelle/zotero/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rmzelle/zotero/merges","archive_url":"https://api.github.com/repos/rmzelle/zotero/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rmzelle/zotero/downloads","issues_url":"https://api.github.com/repos/rmzelle/zotero/issues{/number}","pulls_url":"https://api.github.com/repos/rmzelle/zotero/pulls{/number}","milestones_url":"https://api.github.com/repos/rmzelle/zotero/milestones{/number}","notifications_url":"https://api.github.com/repos/rmzelle/zotero/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rmzelle/zotero/labels{/name}","releases_url":"https://api.github.com/repos/rmzelle/zotero/releases{/id}","created_at":"2011-11-04T01:58:56Z","updated_at":"2015-03-22T00:29:07Z","pushed_at":"2015-05-20T03:58:20Z","git_url":"git://github.com/rmzelle/zotero.git","ssh_url":"git@github.com:rmzelle/zotero.git","clone_url":"https://github.com/rmzelle/zotero.git","svn_url":"https://github.com/rmzelle/zotero","homepage":"http://zotero.org","size":53557,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"zotero:4.0","ref":"4.0","sha":"161733b207e7effc152447afb8c3b45350269154","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":2656556,"name":"zotero","full_name":"zotero/zotero","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/zotero","description":"Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources.","fork":false,"url":"https://api.github.com/repos/zotero/zotero","forks_url":"https://api.github.com/repos/zotero/zotero/forks","keys_url":"https://api.github.com/repos/zotero/zotero/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zotero/zotero/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zotero/zotero/teams","hooks_url":"https://api.github.com/repos/zotero/zotero/hooks","issue_events_url":"https://api.github.com/repos/zotero/zotero/issues/events{/number}","events_url":"https://api.github.com/repos/zotero/zotero/events","assignees_url":"https://api.github.com/repos/zotero/zotero/assignees{/user}","branches_url":"https://api.github.com/repos/zotero/zotero/branches{/branch}","tags_url":"https://api.github.com/repos/zotero/zotero/tags","blobs_url":"https://api.github.com/repos/zotero/zotero/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zotero/zotero/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zotero/zotero/git/refs{/sha}","trees_url":"https://api.github.com/repos/zotero/zotero/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zotero/zotero/statuses/{sha}","languages_url":"https://api.github.com/repos/zotero/zotero/languages","stargazers_url":"https://api.github.com/repos/zotero/zotero/stargazers","contributors_url":"https://api.github.com/repos/zotero/zotero/contributors","subscribers_url":"https://api.github.com/repos/zotero/zotero/subscribers","subscription_url":"https://api.github.com/repos/zotero/zotero/subscription","commits_url":"https://api.github.com/repos/zotero/zotero/commits{/sha}","git_commits_url":"https://api.github.com/repos/zotero/zotero/git/commits{/sha}","comments_url":"https://api.github.com/repos/zotero/zotero/comments{/number}","issue_comment_url":"https://api.github.com/repos/zotero/zotero/issues/comments{/number}","contents_url":"https://api.github.com/repos/zotero/zotero/contents/{+path}","compare_url":"https://api.github.com/repos/zotero/zotero/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zotero/zotero/merges","archive_url":"https://api.github.com/repos/zotero/zotero/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zotero/zotero/downloads","issues_url":"https://api.github.com/repos/zotero/zotero/issues{/number}","pulls_url":"https://api.github.com/repos/zotero/zotero/pulls{/number}","milestones_url":"https://api.github.com/repos/zotero/zotero/milestones{/number}","notifications_url":"https://api.github.com/repos/zotero/zotero/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zotero/zotero/labels{/name}","releases_url":"https://api.github.com/repos/zotero/zotero/releases{/id}","created_at":"2011-10-27T07:46:48Z","updated_at":"2015-05-19T17:52:19Z","pushed_at":"2015-05-20T03:58:21Z","git_url":"git://github.com/zotero/zotero.git","ssh_url":"git@github.com:zotero/zotero.git","clone_url":"https://github.com/zotero/zotero.git","svn_url":"https://github.com/zotero/zotero","homepage":"https://www.zotero.org","size":81711,"stargazers_count":298,"watchers_count":298,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":108,"mirror_url":null,"open_issues_count":276,"forks":108,"open_issues":276,"watchers":298,"default_branch":"4.0"}},"_links":{"self":{"href":"https://api.github.com/repos/zotero/zotero/pulls/623"},"html":{"href":"https://github.com/zotero/zotero/pull/623"},"issue":{"href":"https://api.github.com/repos/zotero/zotero/issues/623"},"comments":{"href":"https://api.github.com/repos/zotero/zotero/issues/623/comments"},"review_comments":{"href":"https://api.github.com/repos/zotero/zotero/pulls/623/comments"},"review_comment":{"href":"https://api.github.com/repos/zotero/zotero/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zotero/zotero/pulls/623/commits"},"statuses":{"href":"https://api.github.com/repos/zotero/zotero/statuses/6983a99f0b59746ae1c28e6823f0b642610ec9cc"}}}}