Skip to content

Commit

Permalink
use asDynamic for both reading and writing
Browse files Browse the repository at this point in the history
  • Loading branch information
cypressious committed Nov 25, 2017
1 parent 7cd66d8 commit ea62664
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions content_script/src/main/kotlin/content_script.kt
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import org.w3c.dom.HTMLElement
import org.w3c.dom.asList
import org.w3c.dom.get
import kotlin.browser.document
import kotlin.browser.window

fun main(args: Array<String>) {
if (window["hasRun"] == true) {
if (window.asDynamic().hasRun == true) {
return
}
window.asDynamic()["hasRun"] = true
window.asDynamic().hasRun = true

browser.runtime.onMessage.addListener { message ->
if (message.command === "beastify") {
Expand Down

0 comments on commit ea62664

Please sign in to comment.