mirror of
https://github.com/dustinbrun/openwebrx_docker_installation.git
synced 2025-11-04 15:27:32 +01:00
added docker compose and plugins for openwebrx installation
This commit is contained in:
25
docker/openwebrx/plugins/receiver/notify/README.md
Normal file
25
docker/openwebrx/plugins/receiver/notify/README.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
layout: page
|
||||
title: "OpenWebRX+ Receiver Plugin: Notify"
|
||||
permalink: /receiver/notify
|
||||
---
|
||||
|
||||
This is `utility` plugin. It provides notifications for other plugins.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
Plugins.notify.show('some notification');
|
||||
```
|
||||
|
||||
## Load
|
||||
|
||||
Add this line in your `init.js` file:
|
||||
|
||||
```js
|
||||
await Plugins.load('https://0xaf.github.io/openwebrxplus-plugins/receiver/notify/notify.js');
|
||||
```
|
||||
|
||||
## init.js
|
||||
|
||||
Learn how to [load plugins](/openwebrxplus-plugins/#load-plugins).
|
||||
21
docker/openwebrx/plugins/receiver/notify/notify.css
Normal file
21
docker/openwebrx/plugins/receiver/notify/notify.css
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Plugin: Notifications for other plugins
|
||||
*
|
||||
*/
|
||||
|
||||
#plugins-notification {
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
width: 200px;
|
||||
position: absolute;
|
||||
bottom: 50px;
|
||||
left: calc((100vw / 2) - 100px);
|
||||
border: 2px solid white;
|
||||
background: #333;
|
||||
margin: 20px;
|
||||
display: none;
|
||||
opacity: 0.9;
|
||||
color: white;
|
||||
border-radius: 10px;
|
||||
font-family: monospace;
|
||||
}
|
||||
37
docker/openwebrx/plugins/receiver/notify/notify.js
Normal file
37
docker/openwebrx/plugins/receiver/notify/notify.js
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Plugin: Provides notifications for other plugins
|
||||
*
|
||||
* Usage:
|
||||
* Plugins.notify.send('some notification');
|
||||
*
|
||||
* License: MIT
|
||||
* Copyright (c) 2023 Stanislav Lechev [0xAF], LZ2SLL
|
||||
*
|
||||
*/
|
||||
|
||||
// Notify plugin version
|
||||
Plugins.notify._version = 0.1;
|
||||
|
||||
// Initialize the plugin
|
||||
Plugins.notify.init = function () {
|
||||
Plugins.notify.show = function (text) {
|
||||
// create the message div if it's not there
|
||||
if ($("#plugins-notification").length < 1)
|
||||
$("body").append("<div id='plugins-notification'></div>");
|
||||
|
||||
// set the message text
|
||||
$("#plugins-notification").html(text);
|
||||
|
||||
// show the message
|
||||
$("#plugins-notification").fadeIn('fast');
|
||||
|
||||
// clear the timeout of previous message (if exists)
|
||||
clearTimeout(Plugins.notify.notify_timeout);
|
||||
|
||||
// timeout the current message
|
||||
Plugins.notify.notify_timeout = setTimeout('$("#plugins-notification").fadeOut("fast")', 1000);
|
||||
|
||||
};
|
||||
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user