You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 13, 2025. It is now read-only.
Hi,
due I needed a browser solution for sending push notifications, just ran it through browserify.
I made a window function, which can be called through the HTML.
Following main.js is been browserfied. Works great.
window.ProwlPush = function (
apikey,
content,
header,
priority = 0,
description = null,
url = null
) {
var Prowl = require("node-prowl");
var prowl = new Prowl(apikey);
prowl.push(
content,
header,
{
priority: priority,
description: description,
url: url,
},
function (err, remaining) {
if (err) throw err;
console.log(
"I have " + remaining + " calls to the api during current hour."
);
}
);
};
But even after minifying with uglifyjs there is still a 1.3Mb file.
So, is there an easier or native JS way to send push notification per Prowl - or can we dispense for some require's, so that we can slim down a bit?