Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evemilano/c150bcee94217ecfcc120ce9d0693d38 to your computer and use it in GitHub Desktop.
Save evemilano/c150bcee94217ecfcc120ce9d0693d38 to your computer and use it in GitHub Desktop.
Personalizzare il Prompt Banner delle notifiche push
<script>
var OneSignal = window.OneSignal || [];
OneSignal.push(["init", {
appId: "12341234-1234-1234-1234-12341234",
safari_web_id: "web.onesignal.auto.12341234-1234-1234-1234-12341234",
autoRegister: false,
notifyButton: {
enable: false,
showCredit: false
},
welcomeNotification: {
"title": "EVE Milano Notifiche Push",
"message": "Grazie e benvenuto!",
"url": "https://www.evemilano.com/blog/"
},
promptOptions: {
/* These prompt options values configure both the HTTP prompt and the HTTP popup. */
/* actionMessage limited to 90 characters */
actionMessage: "Posso inviarti una notifica quando pubblico un nuovo articolo?",
/* acceptButtonText limited to 15 characters */
acceptButtonText: "ATTIVA",
/* cancelButtonText limited to 15 characters */
cancelButtonText: "NO GRAZIE"
}
}]);
OneSignal.push(function () {
OneSignal.showHttpPrompt();
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment