mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-16 06:18:35 +02:00
add in titlePreface (#256)
This commit is contained in:
@@ -18,6 +18,10 @@
|
||||
|
||||
<div class="panel-section-separator"></div>
|
||||
|
||||
<a href="#" id="window-preface-title">Preface title</a><br>
|
||||
|
||||
<div class="panel-section-separator"></div>
|
||||
|
||||
<a href="#" id="window-create-incognito">Create new incognito window</a><br>
|
||||
<a href="#" id="window-create-normal">Create normal window</a><br>
|
||||
<a href="#" id="window-create-panel">Create panel</a><br>
|
||||
|
||||
@@ -92,5 +92,14 @@ document.addEventListener("click", (e) => {
|
||||
});
|
||||
}
|
||||
|
||||
else if (e.target.id === "window-preface-title") {
|
||||
getCurrentWindow().then((currentWindow) => {
|
||||
let updateInfo = {
|
||||
titlePreface: "Preface | "
|
||||
}
|
||||
browser.windows.update(currentWindow.id, updateInfo);
|
||||
});
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user