Options
All
  • Public
  • Public/Protected
  • All
Menu

Module background

Index

Type aliases

Updater

Updater: function

Updater performs the necessary steps to perform an update from the given version. It returns the version it updated to.

Type declaration

    • (version: string): string | undefined | PromiseLike<string | undefined>
    • Parameters

      • version: string

      Returns string | undefined | PromiseLike<string | undefined>

Variables

Const extUpdatedKey

extUpdatedKey: "ext::updated" = "ext::updated"

Const hasNewEpisode$

hasNewEpisode$: Subject<NewEpisodeEvent> = new Subject()

Const hasNewVersion$

hasNewVersion$: BehaviorSubject<boolean> = new BehaviorSubject(false)

Const notificationLock

notificationLock: AsyncLock = new AsyncLock()

AsyncLock used to trigger notifications sequentially.

Const onButtonClicked$

onButtonClicked$: Observable<NotificationEvent> = getObservable("onButtonClicked")

Const onClicked$

onClicked$: Observable<NotificationEvent> = getObservable("onClicked")

Const onClosed$

onClosed$: Observable<NotificationEvent> = getObservable("onClosed")

Const remoteGrobberClientServer

remoteGrobberClientServer: RemoteGrobberClientServer = new RemoteGrobberClientServer(grobberClient)

Const updateLock

updateLock: AsyncLock = new AsyncLock()

Functions

checkAnimeUpdate

  • checkAnimeUpdate(): Promise<void>

createNotification

  • createNotification(options: NotificationOptions): Promise<string>
  • Low-level function to show a notification. The difference between this function and just straight up calling chrome.notifications.create is that it uses the notificationLock to make sure only one notification is shown at a time.

    see

    BrowserNotification for a higher level approach to notifications.

    Parameters

    • options: NotificationOptions

    Returns Promise<string>

getObservable

getUpdater

  • getUpdater(version: string): Updater | undefined

performExtensionUpdate

  • performExtensionUpdate(fromVersion: string): Promise<void>

performUpdateCheck

  • performUpdateCheck(): void

setBadgeText

  • setBadgeText(text?: undefined | string): void
  • Show the given text on the popup badge. If the concept of a badge text does not exist (i.e. on mobile) the text is shown in the title.

    Passing a falsy value or omitting the text altogether will reset the text.

    Parameters

    • Optional text: undefined | string

    Returns void

Generated using TypeDoc