Makes the Cority layout editor easier to use by adding CSS styling and detecting metadata
On the chrome web store as CorityLayout+ (https://chrome.google.com/webstore/detail/coritylayout%20/cahocmmpljojjnbddkgflandcdbomgob)
- A. User installs extension and has browser running
background.jsis loaded and mergeschrome.storagewith default values
- B. User right clicks on extension and views options
options.htmlis opened as a new taboptions.htmlloadsoptions.jsoptions.jsloadschrome.storageinto globaloption_dataand creates<input>elements for each option, sets them to current values, and attaches a listener to each one
- C. User changes an option on the options page
options.jsdetects the input then updates and saves the currentoption_datatochrome.storage
- D. User resets to default colors
options.jssends agetDefaultOptionsmessage tobackground.jsbackground.jsretrieves default values fromget_option_defaultsand returns themoptions.jsupdatesoption_dataand the DOM elements to match the default values, then setschrome.storageto these values
- E. User resets all memory
options.jsclearschrome.storagememory
- F. User clicks extension button
background.jsdetectschrome.action.onClickedand runsscript.js- Apply formatting to the frontend
- G. User browses to url matching path in
manifest.json:content_scripts:matchescontent.jschecks if theform_autorunoption is true. If it is, then we proceed with formatting the frontend