From 442388304bdf948fe5a439aa85eb2c73255dcdfb Mon Sep 17 00:00:00 2001 From: Aurimas Vinckevicius Date: Fri, 14 Nov 2014 05:30:14 -0600 Subject: [PATCH] Add Zotero.Libraries.isGroupLibrary --- chrome/content/zotero/xpcom/data/libraries.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/data/libraries.js b/chrome/content/zotero/xpcom/data/libraries.js index 828e35af75..9fdc5a827c 100644 --- a/chrome/content/zotero/xpcom/data/libraries.js +++ b/chrome/content/zotero/xpcom/data/libraries.js @@ -177,4 +177,12 @@ Zotero.Libraries = new function () { throw new Error("Unsupported library type '" + type + "' in Zotero.Libraries.getName()"); } } -} + + this.isGroupLibrary = function (libraryID) { + if (!_libraryDataLoaded) { + throw new Error("Library data not yet loaded"); + } + + return this.getType(libraryID) == 'group'; + } +} \ No newline at end of file