gotify-firefox

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

popup.js (622B)


      1 "use strict";
      2 
      3 $(function () {
      4   $("#submit").click(function (e) {
      5     e.preventDefault();
      6     var title = $("#title").val();
      7     var message = $("#message").val();
      8 
      9     var object = gotify.buildMessageObject(title, message);
     10     gotify.postMessage(object, function () {
     11       Materialize.toast("Sent!", 4000);
     12     });
     13   });
     14 
     15   $("#popout-link").click(function (e) {
     16     e.preventDefault();
     17     browser.tabs.create({
     18       url: "popup.html",
     19     });
     20   });
     21 
     22   $("#options-link").click(function (e) {
     23     e.preventDefault();
     24     browser.tabs.create({
     25       url: "options.html",
     26     });
     27   });
     28 });