mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-16 14:28:33 +02:00
7 lines
215 B
JavaScript
7 lines
215 B
JavaScript
const leftPad = require("left-pad");
|
|
|
|
browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
|
const result = leftPad(message.text, message.amount, message.with);
|
|
sendResponse(result);
|
|
});
|