Options
All
  • Public
  • Public/Protected
  • All
Menu

External module scripts/bg/notify

Manage the notifications that will be displayed to the user https://developer.chrome.com/apps/notifications

Index

Events

onButtonClicked

  • onButtonClicked(id: string, btnIdx: number): void

onNotificationClicked

  • onNotificationClicked(id: string): void

Variables

Const ERROR_NO_NOTIFICATIONS

ERROR_NO_NOTIFICATIONS: "Display of notifications on received messages has been disabled." = "Display of notifications on received messages has been disabled."

Const ICON_ERROR

ICON_ERROR: "/images/ic_email_black_48dp.png" = "/images/ic_email_black_48dp.png"

Const chromep

chromep: ChromePromise = new ChromePromise()

Functions

create

getOptions

  • getOptions(type: INotifyType, message: string): NotificationOptions

hasNavigatorPermission

  • hasNavigatorPermission(): Promise<boolean>

onCopyEnabled

  • onCopyEnabled(): null | false | true

onErrorEnabled

  • onErrorEnabled(): null | false | true

onSendEnabled

  • onSendEnabled(): null | false | true

sendErrorEmail

Object literals

Const TYPE

TYPE: object

Notification types

CLIPBOARD_CHANGED

CLIPBOARD_CHANGED: INotifyType = {id: 'localCopy',title: 'Clipboard change detected',message: 'Not set',icon: '/images/ic_local_copy.png',isError: false,pageRoute: 'page-main',requireInteraction: false,hasButtons: false,buttons: [],buttonFunctions: [],} as INotifyType

detected clipboard change

DEVICE_ADDED

DEVICE_ADDED: INotifyType = {id: 'added',title: 'Sent push message',message: 'Not set',icon: '/images/ic_add_device.png',isError: false,pageRoute: 'page-devices',requireInteraction: false,hasButtons: false,buttons: [],buttonFunctions: [],} as INotifyType

added our device

DEVICE_REMOVED

DEVICE_REMOVED: INotifyType = {id: 'removed',title: 'Sent push message',message: 'Not set',icon: '/images/ic_remove_device.png',isError: false,pageRoute: 'page-main',requireInteraction: false,hasButtons: false,buttons: [],buttonFunctions: [],} as INotifyType

removed our device

ERROR_FORCE_SIGN_OUT

ERROR_FORCE_SIGN_OUT: INotifyType = {id: 'error_force_sign_out',title: 'Forced to sign out of extension',message: 'Not set',icon: '/images/ic_error.png',isError: true,pageRoute: 'page-error',requireInteraction: true,hasButtons: true,buttons: [{title: 'Contact support',iconUrl: chrome.runtime.getURL(ICON_ERROR),},],buttonFunctions: [sendErrorEmail],} as INotifyType

error requiring sign out

ERROR_SEND

ERROR_SEND: INotifyType = {id: 'error_send',title: 'Failed to send message',message: 'Not set',icon: '/images/ic_error.png',isError: true,pageRoute: 'page-error',requireInteraction: true,hasButtons: true,buttons: [{title: 'Contact support',iconUrl: chrome.runtime.getURL(ICON_ERROR),},],buttonFunctions: [sendErrorEmail],} as INotifyType

error sending message

ERROR_STORE_CLIP

ERROR_STORE_CLIP: INotifyType = {id: 'error_store_clip',title: 'Failed to store clipboard contents',message: 'Not set',icon: '/images/ic_error.png',isError: true,pageRoute: 'page-error',requireInteraction: true,hasButtons: true,buttons: [{title: 'Contact support',iconUrl: chrome.runtime.getURL(ICON_ERROR),},],buttonFunctions: [sendErrorEmail],} as INotifyType

error saving to database

MESSAGE_SENT

MESSAGE_SENT: INotifyType = {id: 'localCopy',title: 'Sent push message',message: 'Not set',icon: '/images/ic_local_copy.png',isError: false,pageRoute: 'page-main',requireInteraction: false,hasButtons: false,buttons: [],buttonFunctions: [],} as INotifyType

message sent to remote devices

Generated using TypeDoc