Adds some integration with firefox.

This is still rather unstable, but it runs.
This commit is contained in:
Markil3
2021-07-11 23:33:39 -06:00
parent 2bc005f031
commit 704ab06f85
535 changed files with 2381 additions and 23 deletions

29
add-on/background.js Normal file
View File

@@ -0,0 +1,29 @@
var port = browser.runtime.connectNative("universal_music")
/**
* Sends a message to the application
*/
function writeMessage(message)
{
port.postMessage(message)
}
/**
* Sends a message to the application
*/
function onAppMessage(message)
{
if ("command" in message)
{
switch (message["command"])
{
case "ping":
writeMessage({
"response": "ping"
});
break
}
}
}
port.onMessage.addListener(onAppMessage);

239
add-on/icon.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 114 KiB

View File

@@ -0,0 +1,7 @@
{
"name": "universal_music",
"description": "A link between the Universal Music Player and the web browser.",
"path": "${LINK_PATH}",
"type": "stdio",
"allowed_extensions": ["universal_music@regis.edu"]
}

30
add-on/manifest.json Normal file
View File

@@ -0,0 +1,30 @@
{
"description": "An add-on to link the Universal Music Player to compatible web music players.",
"manifest_version": 2,
"name": "Universal Music Addon",
"version": "0.1",
"icons": {
"16": "icon.svg",
"32": "icon.svg",
"64": "icon.svg",
"128": "icon.svg",
"256": "icon.svg",
"512": "icon.svg"
},
"browser_specific_settings": {
"gecko": {
"id": "universal_music@regis.edu",
"strict_min_version": "55.0"
}
},
"background": {
"scripts": ["background.js"]
},
"browser_action": {
"default_icon": "icon.svg"
},
"permissions": ["nativeMessaging"]
}