mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00: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
46c55add68
commit
0677cb3a3d
@ -348,15 +348,11 @@ var Addons = {
|
||||
let event = document.createEvent("Events");
|
||||
event.initEvent("AddonOptionsLoad", true, false);
|
||||
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);
|
||||
|
@ -39,10 +39,8 @@
|
||||
}
|
||||
|
||||
.addon-item[isDisabled="true"] .options-header,
|
||||
.addon-item:not([optionsURL]) .options-header,
|
||||
.addon-item[optionsURL=""] .options-header,
|
||||
.addon-item[isDisabled="true"] .options-box,
|
||||
.addon-item:not([optionsURL]) .options-box,
|
||||
.addon-item[optionsURL=""] .options-box {
|
||||
display: none;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user