mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1106415 - Allow the add-on SDK to dynamically insert add-on options. r=mfinkle
--HG-- extra : rebase_source : fb958f6d6f77cd6bc2d356b6b76107fc653dff12 extra : amend_source : 67b932a1a42836cc824478ffe11f4b8f4da592a7
This commit is contained in:
parent
ba4481fc88
commit
d12b17372c
@ -348,15 +348,11 @@ var Addons = {
|
|||||||
let event = document.createEvent("Events");
|
let event = document.createEvent("Events");
|
||||||
event.initEvent("AddonOptionsLoad", true, false);
|
event.initEvent("AddonOptionsLoad", true, false);
|
||||||
window.dispatchEvent(event);
|
window.dispatchEvent(event);
|
||||||
|
|
||||||
// Also send a notification to match the behavior of desktop Firefox
|
|
||||||
let id = aListItem.getAttribute("addonID");
|
|
||||||
Services.obs.notifyObservers(document, AddonManager.OPTIONS_NOTIFICATION_DISPLAYED, id);
|
|
||||||
} else {
|
|
||||||
// No options, so hide the header and reset the list item
|
|
||||||
detailItem.setAttribute("optionsURL", "");
|
|
||||||
aListItem.setAttribute("optionsURL", "");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Also send a notification to match the behavior of desktop Firefox
|
||||||
|
let id = aListItem.getAttribute("addonID");
|
||||||
|
Services.obs.notifyObservers(document, AddonManager.OPTIONS_NOTIFICATION_DISPLAYED, id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xhr.send(null);
|
xhr.send(null);
|
||||||
|
@ -39,10 +39,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.addon-item[isDisabled="true"] .options-header,
|
.addon-item[isDisabled="true"] .options-header,
|
||||||
.addon-item:not([optionsURL]) .options-header,
|
|
||||||
.addon-item[optionsURL=""] .options-header,
|
.addon-item[optionsURL=""] .options-header,
|
||||||
.addon-item[isDisabled="true"] .options-box,
|
.addon-item[isDisabled="true"] .options-box,
|
||||||
.addon-item:not([optionsURL]) .options-box,
|
|
||||||
.addon-item[optionsURL=""] .options-box {
|
.addon-item[optionsURL=""] .options-box {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user