This commit is contained in:
Aevann1 2021-12-10 00:51:12 +02:00
parent 7c74929a4f
commit 20d9427ab0
2 changed files with 8 additions and 11 deletions

View file

@ -2576,10 +2576,6 @@ var PusherPushNotifications = (function (exports) {
return _char.charCodeAt(0); return _char.charCodeAt(0);
})); }));
} }
/**
* Modified from https://stackoverflow.com/questions/4565112
*/
function isSupportedBrowser() { function isSupportedBrowser() {
var winNav = window.navigator; var winNav = window.navigator;
@ -2606,11 +2602,12 @@ var PusherPushNotifications = (function (exports) {
}({})); }({}));
const beamsClient = new PusherPushNotifications.Client({
instanceId: '02ddcc80-b8db-42be-9022-44c546b4dce6', const beamsClient = new PusherPushNotifications.Client({instanceId: '02ddcc80-b8db-42be-9022-44c546b4dce6'});
}); const strid = document.getElementById('strid').innerHTML;
beamsClient.start() beamsClient.start()
.then((beamsClient) => beamsClient.getDeviceId()) .then((beamsClient) => beamsClient.getDeviceId())
.then(() => beamsClient.addDeviceInterest('{{v.strid}}')) .then(() => beamsClient.addDeviceInterest(`${strid}`))
.then(() => beamsClient.getDeviceInterests()) .then(() => beamsClient.getDeviceInterests())
.catch(console.error); .catch(console.error);

View file

@ -148,8 +148,8 @@
{% endif %} {% endif %}
{% if v %} {% if v %}
<div class="d-none" id="strid"></div> <div class="d-none" id="strid">{{v.strid}}</div>
<script src="/assets/js/pusher.js?v=4"></script> <script src="/assets/js/pusher.js?v=6"></script>
{% endif %} {% endif %}
{% endblock %} {% endblock %}