Skip to content

Commit

Permalink
Exclude 'Bok' tag
Browse files Browse the repository at this point in the history
  • Loading branch information
AbeJellinek committed Apr 23, 2024
1 parent c988662 commit 3400777
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion LIBRIS ISBN.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"priority": 98,
"inRepository": true,
"translatorType": 8,
"lastUpdated": "2024-01-23 08:54:03"
"lastUpdated": "2024-04-23 18:44:30"
}

/*
Expand Down Expand Up @@ -58,6 +58,11 @@ async function doSearch(item) {
let translator = Zotero.loadTranslator('import');
translator.setTranslator('edd87d07-9194-42f8-b2ad-997c4c7deefd');
translator.setString(marcXml);
translator.setHandler('itemDone', (_obj, item) => {
// Yes, it is a book
item.tags = item.tags.filter(tag => (tag.tag || tag) !== 'Bok');
item.complete();
});
translator.translate();
}

Expand Down

0 comments on commit 3400777

Please sign in to comment.