13 lines
326 B
JavaScript
13 lines
326 B
JavaScript
chrome.action.onClicked.addListener((tab, event) => {
|
|
chrome.windows.getCurrent((window) => {
|
|
chrome.windows.create({
|
|
url: "popup.html",
|
|
type: "popup",
|
|
width: 250,
|
|
height: 84,
|
|
top: window.top + (window.height - 84) / 2,
|
|
left: window.left + (window.width - 250) / 2,
|
|
});
|
|
});
|
|
});
|