aboutsummaryrefslogblamecommitdiffstats
path: root/app/scripts/platforms/extension.js
blob: f9e1d84b7af007478370426e71566979399f7c32 (plain) (tree)
1
2
3
4
5
6
7






                                          







                                  



                                                  
                        







                                                  

   


                                  
const extension = require('extensionizer')

class ExtensionPlatform {

  //
  // Public
  //
  reload () {
    extension.runtime.reload()
  }

  openWindow ({ url }) {
    extension.tabs.create({ url })
  }

  getVersion () {
    return extension.runtime.getManifest().version
  }

  getPlatformInfo (cb) {
    var info
    try {
      info = extension.runtime.getPlatformInfo(cb)
    } catch (e) {
      log.debug(e)
      info = undefined
    }
    return info
  }

}

module.exports = ExtensionPlatform