commit 442388304bdf948fe5a439aa85eb2c73255dcdfb parent 9f535e0e91e7707719cbe64ebf03dd147dfe6f85 Author: Aurimas Vinckevicius <aurimas.dev@gmail.com> Date: Fri, 14 Nov 2014 05:30:14 -0600 Add Zotero.Libraries.isGroupLibrary Diffstat:
| M | chrome/content/zotero/xpcom/data/libraries.js | | | 11 | ++++++++++- |
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git 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