ipython-extensions icon indicating copy to clipboard operation
ipython-extensions copied to clipboard

Grant Notification Permissions button does not register an "Agree" click.

Open aroussel-data opened this issue 6 years ago • 1 comments

Jupyter version : 4.4.0 OS: Ubuntu 16.04.5 Browser: Chrome 71.0.3578.98

After installing the jupyter notebook extensions configurator, I enable Notify from the nbextensions list, which displays it upon loading of a jupyter notebook.

image

The "ask for notification permissions" button appears, however upon clicking the button, it doesn't then change and display the notify options, as described by notify.js here:

var ensure_permission = function () {
    ask_permission();  // Asks for permission on notebook load, doesn't work in Chrome
    // If don't have permission now, add a button to the toolbar to let user request permission
    if (Notification && Notification.permission !== "granted") {
      add_permissions_button();
      add_permissions_list();
      $(".permissions-list").hide();
    } else if (Notification && Notification.permission === "granted") {
      add_permissions_list();
    }
  };

  var ask_permission = function () {
    if (Notification && Notification.permission !== "granted") {
      Notification.requestPermission(function (status) {
        if (Notification.permission !== status) {
          Notification.permission = status;
        }
        // Wait for permission to be granted, then remove the permissions-button and show permissions-list
        if (Notification && Notification.permission === "granted" && $("#permissions-button").length > 0) {
          $("#permissions-button").remove();
          $(".permissions-list").show();
        }
      });
    }
  };

When looking at the install path, it appears to default to /venv/lib/python2.7/site-packages/jupyter_contrib_nbextensions/nbextensions/notify/notify.js, which causes ~/.jupyter/nbconfig/notebook.json to have more than one entry for "notify" when enabling it using the suggestions in this repo's README: (note: snippet below is with "notify" disabled) { "load_extensions": { "execute_time/ExecuteTime": true, "jupyter-js-widgets/extension": true, "collapsible_headings/main": true, "nbextensions_configurator/config_menu/main": true, "codefolding/main": true, "varInspector/main": true, "theme_toggle": true, "notify/notify": false, "contrib_nbextensions_help_item/main": true, "code_prettify/code_prettify": false, "notify": true }, "notify": {}

Is this an issue with my installation? As far as I can tell I followed the documentation correctly.

Thanks

aroussel-data avatar Feb 14 '19 07:02 aroussel-data

Having the same issue. Have you found any solution

kapilkd13 avatar Sep 17 '19 10:09 kapilkd13