summaryrefslogtreecommitdiff
path: root/common/message_server.js
blob: c8c6696d2f32ea01c241d2870078265bf8ab02c8 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
 * This file is part of Haketilo.
 *
 * Function: Message server.
 *
 * Copyright (C) 2021 Wojtek Kosior
 * Redistribution terms are gathered in the `copyright' file.
 */

/*
 * IMPORTS_START
 * IMPORT browser
 * IMPORTS_END
 */

var listeners = {};

/* magic should be one of the constants from /common/connection_types.js */

function listen_for_connection(magic, cb)
{
    listeners[magic] = cb;
}

function raw_listen(port)
{
    if (listeners[port.name] === undefined)
	return;

    listeners[port.name](port);
}

browser.runtime.onConnect.addListener(raw_listen);

/*
 * EXPORTS_START
 * EXPORT listen_for_connection
 * EXPORTS_END
 */
06-27 12:46:30 +0200'>2018-06-27gnu: python-mpd2: Return #t from phases....Tobias Geerinckx-Rice 2018-05-29gnu: mpd: Update to 0.20.20....Leo Famulari 2018-05-12gnu: MPD: Remove unecessary dependency on libmad....Leo Famulari 2018-05-06gnu: mpd-mpc: Update to 0.30....Leo Famulari 2018-04-27gnu: mpd: Update to 0.20.19....Tobias Geerinckx-Rice 2018-04-15gnu: ncmpcpp: Update to 0.8.2....Leo Famulari 2018-03-21gnu: mpd: Update to 0.20.18....Leo Famulari 2018-02-22gnu: mpd-mpc: Update to 0.29....Leo Famulari 2018-02-22gnu: mpd: Update to 0.20.17....Leo Famulari 2018-02-22gnu: libmpdclient: Update to 2.14....Leo Famulari 2018-02-16gnu: Use HTTPS for supported nongnu.org home pages....Tobias Geerinckx-Rice 2018-01-22gnu: mpd: Update to 0.20.15....Leo Famulari 2018-01-13gnu: mpd: Remove (gnu packages gcc) import....Tobias Geerinckx-Rice 2018-01-13gnu: mpd: Use HTTPS for musicpd.org home pages....Tobias Geerinckx-Rice 2018-01-13gnu: mpdscribble: Update home page....Tobias Geerinckx-Rice 2018-01-13gnu: libmpdclient: Update to 2.13....Tobias Geerinckx-Rice 2017-12-19gnu: mpd: Update to 0.20.13....Leo Famulari 2017-12-07gnu: mpd: Update to 0.20.12....Leo Famulari 2017-11-17gnu: Move testing packages from python.scm to check.scm....Ricardo Wurmus 2017-10-31gnu: ncmpcpp: Update to 0.8.1....Leo Famulari 2017-10-30gnu: mpd: Update to 0.20.11....Leo Famulari