Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions content_scripts/hud.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const HUD = {

// duration - if omitted, the message will show until dismissed.
async show(text, duration) {
await DomUtils.documentComplete();
await DomUtils.documentReady();
clearTimeout(this._showForDurationTimerId);
// @hudUI.activate will take charge of making it visible
await this.init(false);
Expand All @@ -88,7 +88,7 @@ const HUD = {

async showFindMode(findMode = null) {
this.findMode = findMode;
await DomUtils.documentComplete();
await DomUtils.documentReady();
await this.init();
this.hudUI.show({ name: "showFindMode" });
this.tween.fade(1.0, 150);
Expand Down Expand Up @@ -177,14 +177,14 @@ const HUD = {
// * events.
// * the HUD shouldn't be active for this frame while any of the copy/paste commands are running.
async copyToClipboard(text) {
await DomUtils.documentComplete();
await DomUtils.documentReady();
await this.init();
this.hudUI.postMessage({ name: "copyToClipboard", data: text });
},

async pasteFromClipboard(pasteListener) {
this.pasteListener = pasteListener;
await DomUtils.documentComplete();
await DomUtils.documentReady();
await this.init();
this.tween.fade(0, 0);
this.hudUI.postMessage({ name: "pasteFromClipboard" });
Expand Down