Bug 1589459 - allow context menu for Thunderbird's about:addons. r=darktrojan
This commit is contained in:
Родитель
796d62b956
Коммит
8bbc07c39b
|
@ -27,15 +27,21 @@ const THUNDERBIRD_THEME_PREVIEWS = new Map([
|
|||
|
||||
// Fix the "Search on addons.mozilla.org" placeholder text in the searchbox.
|
||||
let browser = document.getElementById("html-view-browser");
|
||||
browser.contentWindow.setTimeout(() => {
|
||||
let textbox = browser.contentDocument.getElementById("search-addons");
|
||||
let placeholder = textbox.getAttribute("placeholder");
|
||||
placeholder = placeholder.replace(
|
||||
"addons.mozilla.org",
|
||||
"addons.thunderbird.net"
|
||||
if (!/(interactive|complete)/.test(browser.contentDocument.readyState)) {
|
||||
await new Promise(resolve =>
|
||||
browser.contentWindow.addEventListener("DOMContentLoaded", resolve, {
|
||||
once: true,
|
||||
})
|
||||
);
|
||||
textbox.setAttribute("placeholder", placeholder);
|
||||
});
|
||||
}
|
||||
|
||||
let textbox = browser.contentDocument.getElementById("search-addons");
|
||||
let placeholder = textbox.getAttribute("placeholder");
|
||||
placeholder = placeholder.replace(
|
||||
"addons.mozilla.org",
|
||||
"addons.thunderbird.net"
|
||||
);
|
||||
textbox.setAttribute("placeholder", placeholder);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -371,8 +371,6 @@ var contentTabBaseType = {
|
|||
inContentOverlays: [
|
||||
// about:addons
|
||||
function(aDocument, aTab) {
|
||||
// Switch off the context menu.
|
||||
aTab.browser.removeAttribute("context");
|
||||
Services.scriptloader.loadSubScript(
|
||||
"chrome://messenger/content/aboutAddonsExtra.js",
|
||||
aDocument.defaultView
|
||||
|
|
Загрузка…
Ссылка в новой задаче