This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Slaask is not working when used with requirejs | |
Place this slaask script tags just before the requirejs one | |
--> | |
<script src="https://cdn.slaask.com/chat.js"></script> | |
<script> | |
//Override _slaask.createScriptTag to use requireJS to load injected module 'Pusher' | |
window._slaask.createScriptTag = function (url) { | |
var t = {}; | |
require([url], function() { t.onload(); }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const MainProcessNotification = require("electron").Notification; | |
const isRenderer = process && process.type === "renderer"; | |
const isSupported = () => isRenderer ? "Notification" in window : MainProcessNotification.isSupported(); | |
const renderNotify = (title, body) => { | |
const notification = new Notification(title, { | |
body: body | |
}); | |
return notification | |
}; | |
try { |