gotify-firefox

Send push notifications to your Gotify server from Firefox
git clone git://fossdaily.xyz/gotify-firefox
Log | Files | Refs | README | LICENSE

options.js (563B)


      1 $(function () {
      2   browser.storage.local
      3     .get({
      4       gotify_url: null,
      5       app_token: null,
      6     })
      7     .then(function (items) {
      8       $("#gotify-url").val(items.gotify_url);
      9       $("#app-token").val(items.app_token);
     10       Materialize.updateTextFields();
     11     });
     12 
     13   $("#save-options").click(function (e) {
     14     e.preventDefault();
     15 
     16     browser.storage.local
     17       .set({
     18         gotify_url: $("#gotify-url").val(),
     19         app_token: $("#app-token").val(),
     20       })
     21       .then(() => {
     22         Materialize.toast("Options saved!", 4000);
     23       });
     24   });
     25 });