lucidd on master
Update scala 2.11.11 to 2.11.12 (compare)
lucidd on master
update versions (compare)
bundlerExtension/chromeUnpackedFast::webpack
and then be able to load the directory in target/chrome/unpacked-fast
as an unpacked extension as expected, but there are clearly some more configuring i need to do to make that work. Does that make more sense/help clarify?
Hello, I'm a scalajs newb (and not really skilled in JS either). I'm trying to create a chrome extension using scala-js-chrome
I got a general idea on how to work with the ChromeApp API and how to create windows but I would like to actually create an extension that listens to events in all the tabs. I saw how to do this in JS through CodeInjection. My problem is that, while the wrapper wraps the corresponding call "executeScript", I don't know how to pass the actual code to execute. The options available are through a string and through a filename. ( https://github.com/lucidd/scala-js-chrome/blob/master/bindings/src/main/scala/chrome/tabs/bindings/CodeInjectionOptions.scala )
In my newbiness I have no idea how to do so through scalajs
Runtime.sendMessage(message = "hi")
is giving me an error: Error in event handler for runtime.onMessage: Error: Invalid arguments to sendMessage.
at $c_Lchrome_runtime_Runtime$.sendMessage__sjs_js_UndefOr__sjs_js_Any__sjs_js_UndefOr__sjs_js_UndefOr__V
that's hard to parse
I've downloaded this example: https://github.com/kramer425/scala-js-chrome-extension-example
and modified this file: ./chrome-background-example/src/main/scala/Main.scala
with this very simple program:
import scala.scalajs.js.JSApp
object Main extends JSApp {
def main(): Unit = {
println(chrome.app.window.Window.getAll.length)
}
}
When I install the extension, the background program fails with:
main.js:1151 Uncaught TypeError: Cannot read property 'onBoundsChanged' of undefined
at $c_Lchrome_app_window_Window$.init___ (main.js:1151)
at $m_Lchrome_app_window_Window$ (main.js:1178)
at $c_LMain$.main__V (main.js:1687)
at main.js:2990
at main.js:2991
Any idea?