commit 643073da5449d2c9d410d086a42a8ad2f0ad18f7
parent dcd35f8e9bf836945139bad2831a767f076a5a39
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 29 May 2009 22:52:01 +0000
Don't show icon on private groups in zotero.org translator
Diffstat:
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/repotime.txt b/repotime.txt
@@ -1 +1 @@
-2009-05-29 22:30:00
+2009-05-29 22:55:00
diff --git a/translators/zotero.org.js b/translators/zotero.org.js
@@ -8,7 +8,7 @@
"maxVersion":"",
"priority":100,
"inRepository":true,
- "lastUpdated":"2009-05-29 22:30:00"
+ "lastUpdated":"2009-05-29 22:55:00"
}
function detectWeb(doc, url) {
@@ -16,12 +16,10 @@ function detectWeb(doc, url) {
var nsResolver = namespace ? function(prefix) {
if (prefix == 'x') return namespace; else return null;
} : null;
-
- if (url.match(/\/groups\/[^\/]+\/items/)) {
- var span = doc.getElementById('libraryGroupID');
- if (!span) {
- return false;
- }
+
+ // Skip private groups
+ if (url.match(/\/groups\/[0-9]+\/items/)) {
+ return false;
}
var a = doc.evaluate('//li[@id="library-tab"]/a[text()="My Library"]', doc, nsResolver, XPathResult.ANY_TYPE, null).iterateNext();