mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-17 06:48:37 +02:00
Rewrite examples to use browser.* and promises (#138)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
const leftPad = require("left-pad");
|
||||
|
||||
chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
||||
browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
||||
const result = leftPad(message.text, message.amount, message.with);
|
||||
sendResponse(result);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user