Skip to content

Commit

Permalink
Release 1.0.0-4
Browse files Browse the repository at this point in the history
  • Loading branch information
windingwind committed Sep 10, 2023
1 parent e303cfd commit 536e7fc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zotero-tag",
"version": "1.0.0-3",
"version": "1.0.0-4",
"description": "Action it, tag it, sorted.",
"config": {
"addonName": "Actions and Tags for Zotero",
Expand Down
10 changes: 5 additions & 5 deletions src/modules/preferenceWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async function initUI() {
if (!isWindowAlive(addon.data.prefs.window)) return;
updateCachedRuleKeys();
addon.data.prefs.tableHelper = new ztoolkit.VirtualizedTable(
addon.data.prefs.window!
addon.data.prefs.window!,
)
.setContainerId(`${config.addonRef}-table-container`)
.setProp({
Expand Down Expand Up @@ -161,7 +161,7 @@ function getRowData(index: number) {
return {
event: getString(`prefs-rule-event-${TagEventTypes[rule.event]}`),
operation: getString(
`prefs-rule-operation-${TagOperationTypes[rule.operation]}`
`prefs-rule-operation-${TagOperationTypes[rule.operation]}`,
),
data: rule.data,
shortcut: rule.shortcut,
Expand Down Expand Up @@ -280,7 +280,7 @@ async function editRule(currentKey?: string) {
const content = await openEditorWindow(dialogData.data);
(
dialog.window.document.querySelector(
"#data-input"
"#data-input",
) as HTMLTextAreaElement
).value = content;
dialogData.data = content;
Expand Down Expand Up @@ -311,7 +311,7 @@ async function editRule(currentKey?: string) {
const key = ev.target as HTMLElement;
const win = dialog.window;
key.textContent = `[${getString(
"prefs-rule-edit-shortcut-placeholder"
"prefs-rule-edit-shortcut-placeholder",
)}]`;
dialogData.shortcut = "";
const keyDownListener = (e: KeyboardEvent) => {
Expand Down Expand Up @@ -401,7 +401,7 @@ async function openEditorWindow(content: string) {
const editorWin = addon.data.prefs.window?.openDialog(
"chrome://scaffold/content/monaco/monaco.html",
"monaco",
"chrome,centerscreen,dialog=no,resizable,scrollbars=yes,width=800,height=600"
"chrome,centerscreen,dialog=no,resizable,scrollbars=yes,width=800,height=600",
);
await waitUtilAsync(() => editorWin?.loadMonaco);
const { monaco, editor } = await editorWin.loadMonaco({
Expand Down
8 changes: 4 additions & 4 deletions src/utils/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function initRules() {
addon.data.rules.data = new ztoolkit.LargePref(
`${config.prefsPrefix}.rules`,
`${config.prefsPrefix}.rules.`,
"parser"
"parser",
).asMapLike() as TagRuleMap;
if (!getPref("rulesInit")) {
for (const key of defaultRules.keys()) {
Expand Down Expand Up @@ -126,7 +126,7 @@ async function applyRule(rule: TagRule, data: TagRuleData) {
item.removeTag(tag);
}
message = `Remove tag ${tags.join(",")} from item ${item.getField(
"title"
"title",
)}`;
break;
}
Expand All @@ -139,7 +139,7 @@ async function applyRule(rule: TagRule, data: TagRuleData) {
}
}
message = `Toggle tag ${tags.join(",")} to item ${item.getField(
"title"
"title",
)}`;
break;
}
Expand All @@ -148,7 +148,7 @@ async function applyRule(rule: TagRule, data: TagRuleData) {
try {
const func = new AsyncFunction("item, data, require", script);
message = await func(item, data, (module: string) =>
ztoolkit.getGlobal(module)
ztoolkit.getGlobal(module),
);
} catch (e) {
ztoolkit.log("Script Error", e);
Expand Down

0 comments on commit 536e7fc

Please sign in to comment.