Add back the Quickdial show/hide control.

This also slightly tweaks the grid design styling.
Resolves #563
This commit is contained in:
wolfbeast 2018-06-28 22:04:10 +02:00 • committed by Roy Tam
commit 3b3e4b4cc5
4 changed files with 25 additions and 3 deletions

View file

@ -21,6 +21,10 @@ var gPage = {
// Listen for 'unload' to unregister this page.
addEventListener("unload", this, false);
// Listen for toggle button clicks.
let button = document.getElementById("newtab-toggle");
button.addEventListener("click", e => this.toggleEnabled(e));
// XXX bug 991111 - Not all click events are correctly triggered when
// listening from xhtml nodes -- in particular middle clicks on sites, so
@ -277,6 +281,11 @@ var gPage = {
}
},
toggleEnabled: function(aEvent) {
gAllPages.enabled = !gAllPages.enabled;
event.stopPropagation();
},
maybeShowAutoMigrationUndoNotification() {
// sendAsyncMessage("NewTab:MaybeShowAutoMigrationUndoNotification");
},