Skip to content

Commit

Permalink
Release 1.0.0-29
Browse files Browse the repository at this point in the history
  • Loading branch information
windingwind committed Nov 30, 2023
1 parent 24d542c commit b370ad7
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-actions-tags",
"version": "1.0.0-28",
"version": "1.0.0-29",
"description": "Action it, tag it, sorted.",
"config": {
"addonName": "Actions and Tags for Zotero",
Expand Down
14 changes: 7 additions & 7 deletions src/modules/preferenceWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function initUI() {
const renderLock = Zotero.Promise.defer();
if (!isWindowAlive(addon.data.prefs.window)) return;
addon.data.prefs.tableHelper = new ztoolkit.VirtualizedTable(
addon.data.prefs.window!
addon.data.prefs.window!,
)
.setContainerId(`${config.addonRef}-table-container`)
.setProp({
Expand All @@ -40,13 +40,13 @@ async function initUI() {
addon.data.prefs.window?.document
.querySelectorAll(".action-selection")
?.forEach((e) =>
setButtonDisabled(e as XUL.Button, selectedKeys.length === 0)
setButtonDisabled(e as XUL.Button, selectedKeys.length === 0),
);

addon.data.prefs.window?.document
.querySelectorAll(".action-selection-single")
?.forEach((e) =>
setButtonDisabled(e as XUL.Button, selectedKeys.length !== 1)
setButtonDisabled(e as XUL.Button, selectedKeys.length !== 1),
);
})
// When pressing delete, delete selected line and refresh table.
Expand Down Expand Up @@ -97,7 +97,7 @@ function initEvents() {
.querySelector(`#${config.addonRef}-action-add`)
?.addEventListener("command", (e) => {
const key = addon.api.actionManager.updateAction(
Object.assign({}, emptyAction)
Object.assign({}, emptyAction),
);
updateUI();
editAndUpdate(key);
Expand All @@ -123,14 +123,14 @@ function initEvents() {
?.addEventListener("command", async (e) => {
const newAction = Object.assign(
{},
addon.data.actions.map.get(addon.data.actions.selectedKey!)
addon.data.actions.map.get(addon.data.actions.selectedKey!),
);
if (newAction.name) {
// Add (1) (2) ... to the end of the name
if (newAction.name.match(/\(\d+\)$/)) {
newAction.name = newAction.name.replace(
/\((\d+)\)$/,
(_, num) => `(${parseInt(num) + 1})`
(_, num) => `(${parseInt(num) + 1})`,
);
} else {
newAction.name += " (1)";
Expand Down Expand Up @@ -181,7 +181,7 @@ function getRowData(index: number) {
return {
event: getString(`prefs-action-event-${ActionEventTypes[action.event]}`),
operation: getString(
`prefs-action-operation-${ActionOperationTypes[action.operation]}`
`prefs-action-operation-${ActionOperationTypes[action.operation]}`,
),
data: action.data,
shortcut: action.shortcut,
Expand Down
4 changes: 2 additions & 2 deletions update-beta.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"zoterotag@euclpts.com": {
"updates": [
{
"version": "1.0.0-28",
"update_link": "https://github.com/windingwind/zotero-actions-tags/releases/download/v1.0.0-28/zotero-actions-tags.xpi",
"version": "1.0.0-29",
"update_link": "https://github.com/windingwind/zotero-actions-tags/releases/download/v1.0.0-29/zotero-actions-tags.xpi",
"applications": {
"zotero": {
"strict_min_version": "6.999"
Expand Down

0 comments on commit b370ad7

Please sign in to comment.