Skip to content

Instantly share code, notes, and snippets.

@brianswisher
Last active August 28, 2017 19:31
Show Gist options
  • Save brianswisher/a45b50aea15b53ab71b88a9845bc03a6 to your computer and use it in GitHub Desktop.
Save brianswisher/a45b50aea15b53ab71b88a9845bc03a6 to your computer and use it in GitHub Desktop.
A static test drive for https://bl.ocks.org
# http://editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 120
trim_trailing_whitespace = true
[*.md]
max_line_length = 0
trim_trailing_whitespace = false
[COMMIT_EDITMSG]
max_line_length = 0
body {
font-family: 'Roboto', sans-serif;
color: #333333;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>A static test drive for https://bl.ocks.org</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700" rel="stylesheet">
<link rel="stylesheet" href="index.css">
<script src="index.js"></script>
</head>
<body>
<div id="container">Hello</div>
<script>
message('World.')
</script>
</body>
</html>
function message(text) {
const container = document.getElementById('container')
const messageNode = document.createElement('span')
messageNode.innerHTML = ` ${text}`
document.getElementById('container').appendChild(messageNode)
}
MIT License
Copyright (c) 2017 Brian Swisher
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment