mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
Remove the Social API
This commit is contained in:
parent
72d9e76fca
commit
44dc9ecd8e
50 changed files with 16 additions and 2887 deletions
|
|
@ -556,47 +556,6 @@ const CustomizableWidgets = [
|
|||
clearSubview(sidebarItems);
|
||||
fillSubviewFromMenuItems([...menu.children], sidebarItems);
|
||||
}
|
||||
}, {
|
||||
id: "social-share-button",
|
||||
// custom build our button so we can attach to the share command
|
||||
type: "custom",
|
||||
onBuild: function(aDocument) {
|
||||
let node = aDocument.createElementNS(kNSXUL, "toolbarbutton");
|
||||
node.setAttribute("id", this.id);
|
||||
node.classList.add("toolbarbutton-1");
|
||||
node.classList.add("chromeclass-toolbar-additional");
|
||||
node.setAttribute("label", CustomizableUI.getLocalizedProperty(this, "label"));
|
||||
node.setAttribute("tooltiptext", CustomizableUI.getLocalizedProperty(this, "tooltiptext"));
|
||||
node.setAttribute("removable", "true");
|
||||
node.setAttribute("observes", "Social:PageShareable");
|
||||
node.setAttribute("command", "Social:SharePage");
|
||||
|
||||
let listener = {
|
||||
onWidgetAdded: (aWidgetId) => {
|
||||
if (aWidgetId != this.id)
|
||||
return;
|
||||
|
||||
Services.obs.notifyObservers(null, "social:" + this.id + "-added", null);
|
||||
},
|
||||
|
||||
onWidgetRemoved: aWidgetId => {
|
||||
if (aWidgetId != this.id)
|
||||
return;
|
||||
|
||||
Services.obs.notifyObservers(null, "social:" + this.id + "-removed", null);
|
||||
},
|
||||
|
||||
onWidgetInstanceRemoved: (aWidgetId, aDoc) => {
|
||||
if (aWidgetId != this.id || aDoc != aDocument)
|
||||
return;
|
||||
|
||||
CustomizableUI.removeListener(listener);
|
||||
}
|
||||
};
|
||||
CustomizableUI.addListener(listener);
|
||||
|
||||
return node;
|
||||
}
|
||||
}, {
|
||||
id: "add-ons-button",
|
||||
shortcutId: "key_openAddons",
|
||||
|
|
|
|||
|
|
@ -240,8 +240,6 @@
|
|||
onclick="PanelUI.hide();"/>
|
||||
</panelview>
|
||||
|
||||
<panelview id="PanelUI-socialapi" flex="1"/>
|
||||
|
||||
<panelview id="PanelUI-feeds" flex="1" oncommand="FeedHandler.subscribeToFeed(null, event);">
|
||||
<label value="&feedsMenu2.label;" class="panel-subview-header"/>
|
||||
</panelview>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue