Last active
November 18, 2017 18:52
-
-
Save cypressious/5292a9de1726ab1a2fef9e14c3f919bd to your computer and use it in GitHub Desktop.
Firefox Webextension in Kotlin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version '1.0-SNAPSHOT' | |
buildscript { | |
ext.kotlin_version = '1.1.60' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | |
} | |
} | |
apply plugin: 'kotlin2js' | |
apply plugin: 'kotlin-dce-js' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version" | |
} | |
compileKotlin2Js { | |
kotlinOptions.sourceMap = true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlin.browser.document | |
fun main(args: Array<String>) { | |
document.body?.style?.border = "5px solid red" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"manifest_version": 2, | |
"name": "Kotlin Borderify", | |
"version": "1.0", | |
"description": "Adds a red border to kotlinlang.org", | |
"content_scripts": [ | |
{ | |
"matches": [ | |
"*://kotlinlang.org/*" | |
], | |
"js": [ | |
"build/classes/kotlin/main/min/kotlin.js", | |
"build/classes/kotlin/main/min/kt-borderify.js" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment