Example #1
0
exports.popup = (function () {
  let popup = new Panel({
    contentURL: data.url('./popup/index.html'),
    contentScriptFile: [
      data.url('./popup/firefox/firefox.js'),
      data.url('./popup/index.js')
    ]
  });
popup.on('hide', () => exports.button.state({checked: false}));
  return {
    show: (position) => popup.show({
      width: 500,
      height: 160,
      position
    }),
    hide: () => popup.hide(),
    send: (id, data) => popup.port.emit(id, data),
    receive: (id, callback) => popup.port.on(id, callback)
  };
})();
Example #2
0
            onHide: function() {
                console.info('clicktodialpanel.onhide');

                // we no longer need this call's status
                timer.stopTimer('clicktodial.status');
                timer.unregisterTimer('clicktodial.status');

                // next time a new panel is created
                clicktodialpanel.destroy();

                // stop updating the call status
                timer.stopTimer('clicktodial.status');
            },
Example #3
0
    exports.ClickToDialPanel = function(options) {
        var contentScripts = [
            // no need for jquery for very simple javascript tasks
            data.url('clicktodial/assets/js/clicktodialpanel.js')
        ];
        var clicktodialpanel = new Panel({
            contentScriptFile: contentScripts,
            contentURL: data.url('clicktodial/html/clicktodial.html'),
            height: 79,
            width: 300,
            onHide: function() {
                console.info('clicktodialpanel.onhide');

                // we no longer need this call's status
                timer.stopTimer('clicktodial.status');
                timer.unregisterTimer('clicktodial.status');

                // next time a new panel is created
                clicktodialpanel.destroy();

                // stop updating the call status
                timer.stopTimer('clicktodial.status');
            },
            onShow: function() {
                console.info('clicktodialpanel.onshow');

                // start updating the call status
                timer.startTimer('clicktodial.status');
            },
        });

        clicktodialpanel.port.on('clicktodialpanel.close', function() {
            console.info('clicktodialpanel.close');

            clicktodialpanel.hide();
        });

        return clicktodialpanel;
    };
Example #4
0
        clicktodialpanel.port.on('clicktodialpanel.close', function() {
            console.info('clicktodialpanel.close');

            clicktodialpanel.hide();
        });
Example #5
0
 hide: () => popup.hide(),
Example #6
0
 show: (position) => popup.show({
   width: 500,
   height: 160,
   position
 }),
Example #7
0
/** This file handles the secure text box chrome logic */
const clipboard = require('sdk/clipboard');
const data = require('sdk/self').data;
const Panel = require('sdk/panel').Panel;
const ss = require('sdk/simple-storage');

const secureTextPanel = new Panel({
	contentURL: data.url('secureTextPanel/secureText.html'),
	contentStyleFile: data.url('secureTextPanel/secureText.css'),
	contentScriptFile: [data.url('lib/aes.js'),
						data.url('lib/ecc.js'),
						data.url('lib/sha256.js'),
						data.url('lib/jquery-2.1.3.js'),
						data.url('lib/mousetrap.js'),
						data.url('lib/linkify.js'),
						data.url('observer.js'),
						data.url('frameComm.js'),
						data.url('cryptoManager.js'),
						data.url('main.js')],
	width: 300,
	height: 235,
});

secureTextPanel.port.on('copy_ciphertext', (text) => {
	clipboard.set(text, 'text');
});

secureTextPanel.port.emit('panelMode');

secureTextPanel.on('show', () => {
	secureTextPanel.port.emit('secret', {