Skip to content

Latest commit

 

History

History
258 lines (126 loc) · 3.2 KB

zotero-plugin-toolkit.progresswindowhelper.md

File metadata and controls

258 lines (126 loc) · 3.2 KB

Home > zotero-plugin-toolkit > ProgressWindowHelper

ProgressWindowHelper class

ProgressWindow helper.

Signature:

export declare class ProgressWindowHelper 

Example 1

Show a popup with success icon

const tool = new ZoteroTool();
tool.createProgressWindow("Addon").createLine({
  type: "success",
  text: "Finish"
  progress: 100,
}).show();

Example 2

Show a popup and change line content

const compat = new ZoteroCompat();
const tool = new ZoteroTool();
const popupWin = tool.createProgressWindow("Addon").createLine({
  text: "Loading"
  progress: 50,
}).show(-1);
// Do operations
compat.getGlobal("setTimeout")(()=>{
  popupWin.changeLine({
    text: "Finish",
    progress: 100,
  });
}, 3000);

Constructors

Constructor

Modifiers

Description

(constructor)(header, options)

Constructs a new instance of the ProgressWindowHelper class

Properties

Property

Modifiers

Type

Description

win

Zotero.ProgressWindow

Methods

Method

Modifiers

Description

addDescription(text)

addLines(labels, icons)

changeHeadline(text, icon, postText)

changeLine(options)

Change the line content

close()

createLine(options)

Create a new line

setIconURI(key, uri)

static

Set custom icon uri for progress window

show(closeTime)

startCloseTimer(ms, requireMouseOver)