Skip to content

Commit 5004ad3

Browse files
committed
Add 'HUD' port
This allows the background_page to use the HUD of the currently selected tab to display popup messages.
1 parent bed5b9e commit 5004ad3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vimiumFrontend.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,14 @@ function initializePreDomReady() {
125125
port.onMessage.addListener(function (args) {
126126
refreshCompletionKeys(args.completionKeys);
127127
});
128+
} else if (port.name == "HUD") {
129+
port.onMessage.addListener(function(args) {
130+
if (args.timeout && args.timeout > 0) {
131+
HUD.showForDuration(args.message, args.timeout);
132+
} else {
133+
HUD.show(args.message);
134+
}
135+
});
128136
}
129137
});
130138
}

0 commit comments

Comments
 (0)