Skip to content

Instantly share code, notes, and snippets.

@promicrobial
Last active November 18, 2024 20:07
Show Gist options
  • Save promicrobial/c2ce52599aca3c7ca44d9aff2628148a to your computer and use it in GitHub Desktop.
Save promicrobial/c2ce52599aca3c7ca44d9aff2628148a to your computer and use it in GitHub Desktop.
Assigning this code to a keybinding e.g. using the Actions & Tags plugin will allow you to return to the main "My Library" collection when browsing a subcollection or reading a pdf (even if you were previously in a subcollection).
const Zotero = require("Zotero");
const Zotero_Tabs = require("Zotero_Tabs");
if (Zotero_Tabs.selectedID != 'zotero-pane') {
Zotero_Tabs.select('zotero-pane')
}
Zotero.getActiveZoteroPane().collectionsView.selectLibrary(Zotero.Libraries.userLibraryID)
@promicrobial
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment