lucidd/scala-js-chrome

some samples how to create a plugin but not app?

Sergey80 opened this issue · 2 comments

some samples how to create a plugin but not app?

to generate something similar to:

{
  ...
  "browser_action": {
    "default_icon": "icon.png",
    "default_popup": "popup.html",
    "default_title": "Click here!"
  },
  ...
}

to get an icon in the toolbar and get a popup by click on it.

In the src i see there is:

  object Type {
    val NORMAL: Type = "normal"
    val POPUP: Type = "popup"  // i guess I may use this somehow?
    val PANEL: Type = "panel"
    val APP: Type = "app"
  }

https://developer.chrome.com/extensions/browserAction#method-setPopup ?

trait Manifest {
  val name: String
  val version: String
  val manifestVersion: Int
  val shortName: Option[String]
  val defaultLocale: Option[String]
  val description: Option[String]
  val offlineEnabled: Boolean
  val permissions: Set[Permission]
  val icons: Map[Int, String]
  val minimumChromeVersion: Option[String]
}

trait ExtensionManifest extends Manifest {
  val background: Background
}

no browserAction?

the browserAction is currently not mapped to the manifest datatype. There are a lot of options that are still missing form there. As a manual fallback you can set chromeGenerateManifest to point to a normal chrome manifest file and it will pick this instead of generating one.

ok. I just thought I missing something.