• Sean Hammond's avatar
    Add hostPageSetting() method (not used yet) · 5a2181e3
    Sean Hammond authored
    Add a new `annotator.config.settingsFrom#hostPageSetting(settingName)`
    method that encapsulates a bunch of logic in one method:
    
    - It always returns null if the client is from a browser extension.
      Browser extensions don't read settings from the host page.
    - If the host page's `window.hypothesisConfig()` function returned a
      value for the requested setting, `hostPageSetting(settingName)` returns
      that value.
    - If `hypothesisConfig()` doesn't return the setting it looks for it in
      `js-hypothesis-config` scripts in the host page
    - If the setting isn't defined in either place it returns `undefined`.
    5a2181e3
Name
Last commit
Last update
..
annotator Loading commit data...
boot Loading commit data...
images/icons Loading commit data...
shared Loading commit data...
sidebar Loading commit data...
styles Loading commit data...
karma.config.js Loading commit data...
tsconfig.json Loading commit data...