Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
h3786010 authored Oct 9, 2024
1 parent 493144e commit 583f759
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions onesignal/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="manifest" href="manifest.json"/>
<title>Document</title>
<title>WebPush</title>
</head>
<body>
OneSignal ID:<br>
<span id="onesignal_id"></span>
Subscription ID:<br>
<span id="subscription_id"></span>

<script src="https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js" defer></script>
<script>
window.OneSignalDeferred = window.OneSignalDeferred || [];
OneSignalDeferred.push(async function(OneSignal) {
await OneSignal.init({
appId: "d05bc6c0-138a-4b4f-b0f9-b7ea01d40312",
});
document.write('OneSignal ID:'+OneSignal.User.onesignalId)
document.write('Subscription ID:'+OneSignal.User.PushSubscription.id)
document.getElementById('onesignal_id').value = OneSignal.User.onesignalId;
document.getElementById('subscription_id').value = OneSignal.User.PushSubscription.id;
});
</script>
</body>
Expand Down

0 comments on commit 583f759

Please sign in to comment.