Options
All
  • Public
  • Public/Protected
  • All
Menu

External module scripts/bg/data

Manage the extension's global data

Index

Variables

Const DATA_VERSION

DATA_VERSION: 29 = 29

Version of data - update when items are added, removed, changed

Const chromep

chromep: ChromePromise = new ChromePromise()

Functions

addDefaults

  • addDefaults(): void

convertSliderValue

  • convertSliderValue(key: string): void
  • Convert a setting-slider value due to addition of units

    Parameters

    • key: string

      localStorage key

    Returns void

getIdleSeconds

  • getIdleSeconds(): number

getTempUnit

  • getTempUnit(): C | F

getTimeFormat

initialize

  • initialize(): Promise<void>

processEnabled

  • processEnabled(): Promise<void>
  • Set state based on screensaver enabled flag

    remarks

    Note: this does not effect the keep awake settings so you could use the extension as a display keep awake scheduler without using the screensaver

    Returns Promise<void>

processIdleTime

  • processIdleTime(): void

processKeepAwake

  • processKeepAwake(): void

processState

  • processState(key?: string): Promise<void>
  • Process changes to saved data

    Parameters

    • Default value key: string = "all"

      the item that changed

    Returns Promise<void>

restoreDefaults

  • restoreDefaults(): Promise<void>

setOS

  • setOS(): Promise<void>

update

  • update(): Promise<void>

updateToChromeLocaleStorage

  • updateToChromeLocaleStorage(): Promise<void>
  • Move the currently selected photo sources to chrome.storage.local and delete the old ones

    Returns Promise<void>

Object literals

Const DEFS

DEFS: object

App data saved to local storage

__computed

__computed: boolean = false

Space reddit selected state Earth reddit selected state Animal reddit selected state City reddit selected state Architecture unsplash collection selected state Nature unsplash photos selected state People unsplash collection selected state City unsplash collection selected state Interesting flickr selected state Chromecast selected state My photos selected state User's Google Photos albums selected state User's Google Photos photos state

activeStart

activeStart: string = DEF_TIME

Start time for displaying screensaver

activeStop

activeStop: string = DEF_TIME

Stop time for displaying screensaver

allDisplays

allDisplays: boolean = false

Show on all displays state

allowBackground

allowBackground: boolean = false

Run chrome in background state

allowPhotoClicks

allowPhotoClicks: boolean = true

Allow left mouse click to show original photo source state

allowSuspend

allowSuspend: boolean = false

Allow computer to sleep during active keep awake state

background

background: string = "background:linear-gradient(to bottom, #3a3a3a, #b5bdc8)"

Background style for screensaver

chromeFullscreen

chromeFullscreen: boolean = true

Don't display over full screen Chrome windows state

currentWeather

currentWeather: ICurrentWeather = Weather.DEF_WEATHER

Current weather

darkMode

darkMode: boolean = false

Dark mode for UI

detectFaces

detectFaces: boolean = false

Detect faces during "Ken Burns" effect

enabled

enabled: boolean = true

Screensaver enabled state

fullResGoogle

fullResGoogle: boolean = false

Full resolution for user's Google Photos state

googlePhotosFilter

googlePhotosFilter: object = GoogleSource.DEF_FILTER

Filter to use for users' Google Photos

Type declaration

  • contentFilter: object
    • includedContentCategories: string[]
  • mediaTypeFilter: object
    • mediaTypes: string[]

googlePhotosNoFilter

googlePhotosNoFilter: boolean = true

Don't filter user's Google Photos by categories state

idleTime

idleTime: IUnitValue = {base: 5, display: 5, unit: 0} as IUnitValue

Unit for idle time

interactive

interactive: boolean = false

Manual control of screensaver state

isAlbumMode

isAlbumMode: boolean = true

Is album mode for user's Google Photos state

isDevelopmentBuild

isDevelopmentBuild: boolean = false

Set to true for development build

keepAwake

keepAwake: boolean = false

Prevent screen/computer from sleeping state

largeTime

largeTime: boolean = false

Display time on larger font state

location

location: IWeatherLocation = Weather.DEF_LOC

Current geolocation

panAndScan

panAndScan: boolean = false

"Ken Burns" effect state

permBackground

permBackground: STATE = Permissions.STATE.notSet

Run Chrome in background optional permission

permDetectFaces

permDetectFaces: STATE = Permissions.STATE.notSet

Detect faces in photos optional permission

permPicasa

permPicasa: STATE = Permissions.STATE.notSet

Google Photos optional permission

permWeather

permWeather: STATE = Permissions.STATE.notSet

Weather API optional permission

photoSizing

photoSizing: VIEW_TYPE = VIEW_TYPE.LETTERBOX

Photo sizing menu selection

photoTransition

photoTransition: TRANS_TYPE = TRANS_TYPE.FADE

Between photo animation menu selection

showCurrentWeather

showCurrentWeather: boolean = false

Display current weather state

showLocation

showLocation: boolean = true

Show geolocation state

showPhotog

showPhotog: boolean = true

Show photographer state

showTime

showTime: TIME_FORMAT = TIME_FORMAT.HR_24

Time format for screensaver

shuffle

shuffle: boolean = true

Show photos in random order state

signedInToChrome

signedInToChrome: boolean = true

Chrome signin state

skip

skip: boolean = true

Skip photos with extreme aspect ratio state

transitionTime

transitionTime: IUnitValue = {base: 30, display: 30, unit: 0} as IUnitValue

Unit for transition time

useGoogle

useGoogle: boolean = true

User's Google Photos selected state

version

version: number = DATA_VERSION

localstorage data version

weatherTempUnit

weatherTempUnit: TEMP_UNIT = Weather.TEMP_UNIT.C

Weather temperature display unit

Generated using TypeDoc