Skip to content

Instantly share code, notes, and snippets.

@bulfaitelo
Created June 2, 2017 12:56
Show Gist options
  • Save bulfaitelo/8f1f6ff9343e8b0219cd750d08abefc8 to your computer and use it in GitHub Desktop.
Save bulfaitelo/8f1f6ff9343e8b0219cd750d08abefc8 to your computer and use it in GitHub Desktop.
OneSignal Configuração PT-br
<!-- OneSignal Push -->
<script async='async' src='https://cdn.onesignal.com/sdks/OneSignalSDK.js'></script>
<script>
var OneSignal = window.OneSignal || [];
OneSignal.push(["init", {
appId: "Aqui entra o OneSignal App ID",
subdomainName: 'bulfaitelo-project',
httpPermissionRequest: {
enable: true,
modalTitle: 'Grato pela assinatura',
modalMessage: "Você pode cancelar a inscrição a qualquer momento",
modalButtonText: 'FECHAR'
},
notifyButton: {
enable: true, /* Required to use the notify button */
size: 'medium', /* One of 'small', 'medium', or 'large' */
theme: 'default', /* One of 'default' (red-white) or 'inverse" (white-red) */
position: 'bottom-left', /* Either 'bottom-left' or 'bottom-right' */
prenotify: true, /* Show an icon with 1 unread message for first-time site visitors */
showCredit: false, /* Hide the OneSignal logo */
text: {
'tip.state.unsubscribed': 'Assinar notificações',
'tip.state.subscribed': "Você está inscrito nas notificações",
'tip.state.blocked': "Você bloqueou notificações",
'message.prenotify': 'Clique para subscrever as notificações',
'message.action.subscribed': "Obrigado por se inscrever!",
'message.action.resubscribed': "Você está inscrito nas notificações",
'message.action.unsubscribed': "Você não receberá notificações novamente",
'dialog.main.title': 'Gerenciar Notificações',
'dialog.main.button.subscribe': 'SE INSCREVA!',
'dialog.main.button.unsubscribe': 'UNSUBSCRIBE',
'dialog.blocked.title': 'Desbloquear Notificações',
'dialog.blocked.message': "Siga estas instruções para permitir notificações:"
}
},
safari_web_id: 'Aqui entra o Safari Web ID',
autoRegister: true,
// Your other init options here
promptOptions: {
/* These prompt options values configure both the HTTP prompt and the HTTP popup. */
/* actionMessage limited to 90 characters */
actionMessage: "Gostaria de ficar antenado as últimas notícias e atualizações.",
/* acceptButtonText limited to 15 characters */
acceptButtonText: "PERMITIR",
/* cancelButtonText limited to 15 characters */
cancelButtonText: "NÃO, OBRIGADO",
/* Change bold title, limited to 30 characters */
siteName: 'Bulfaitelo Project',
/* Subtitle, limited to 90 characters */
actionMessage: "Gostaríamos de lhe mostrar as notificações das últimas notícias e atualizações.",
/* Example notification title */
exampleNotificationTitle: 'Exemplo de notificação',
/* Example notification message */
exampleNotificationMessage: 'Este é um exemplo de notificação',
/* Text below example notification, limited to 50 characters */
exampleNotificationCaption: 'Você pode cancelar a inscrição a qualquer momento',
/* Accept button text, limited to 15 characters */
acceptButtonText: "PERMITIR",
/* Cancel button text, limited to 15 characters */
cancelButtonText: "NÃO, OBRIGADO"
}
}]);
</script>
<!-- /OneSignal Push FIM -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment