Changes between Version 12 and Version 13 of I2P_Browser_develop_n_hacks


Ignore:
Timestamp:
Jun 10, 2019, 7:44:11 PM (6 days ago)
Author:
Meeh
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • I2P_Browser_develop_n_hacks

    v12 v13  
    7070}}}
    7171
     72This code produces a standard notification, on OSX at least, the native notification system. Not tested myself on Linux and Windows but I guess they, at least Windows, provide something similar which Firefox uses under the hood.
     73{{{
     74var myServices = {};
     75Cu.import('resource://gre/modules/XPCOMUtils.jsm');
     76
     77//set it up
     78XPCOMUtils.defineLazyGetter(myServices, 'as', function () { return Cc['@mozilla.org/alerts-service;1'].getService(Ci.nsIAlertsService) });
     79
     80//when you need to use it
     81myServices.as.showAlertNotification('chrome://branding/content/icon64.png', 'this was lazyloaded', 'this is a notification from myServices.as', null, null);
     82}}}
    7283
    7384