From 643073da5449d2c9d410d086a42a8ad2f0ad18f7 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 29 May 2009 22:52:01 +0000 Subject: [PATCH] Don't show icon on private groups in zotero.org translator --- repotime.txt | 2 +- translators/zotero.org.js | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/repotime.txt b/repotime.txt index 3d78f582c..ad39be0c8 100644 --- 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 index 110edac0e..c3c93228b 100644 --- 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();