-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ ad5d0fc 🚀
- Loading branch information
Showing
5 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<!doctype html> | ||
<html lang="en" xmlns="http://www.w3.org/1999/html"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>KoAP - Online CoAP decoder</title> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | ||
<script type="text/javascript" src="webapp.js"></script> | ||
<link rel="stylesheet" href="styles.css"> | ||
</head> | ||
|
||
<body> | ||
<div> | ||
<span id="instructions"> | ||
Type or paste the hex encoded CoAP message to decode. | ||
See <a href="docs/index.html">KoAP reference documentation</a> for details on supported CoAP features. | ||
</span> | ||
</div> | ||
|
||
<textarea id="input" rows="8" placeholder="42 01 FE ED CA FE B5 ..."></textarea> | ||
|
||
<div> | ||
<div id="output"></div> | ||
</div> | ||
|
||
<a href="https://github.com/JuulLabs/koap"> | ||
<img | ||
style="position: absolute; top: 0; right: 0; border: 0;" | ||
src="https://github.blog/wp-content/uploads/2008/12/forkme_right_gray_6d6d6d.png?resize=149%2C149" | ||
alt="Fork me on GitHub" | ||
/> | ||
</a> | ||
|
||
<script type="text/javascript"> | ||
var previous = ""; | ||
$('#input').on('change keyup paste', function() { | ||
var current = $(this).val(); | ||
if (current == previous) return; // prevent multiple simultaneous triggers | ||
previous = current; | ||
|
||
webapp.com.juul.koap.decode(current).then((output) => { | ||
$('#output').html("<pre>" + output + "</pre>"); | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
body { | ||
background-color: #eee; | ||
margin: 2em; | ||
font-family: monospace; | ||
font-size: 16pt; | ||
text-align: center; | ||
} | ||
|
||
#instructions { | ||
display: inline-block; | ||
max-width: 750px; | ||
margin-bottom: 25px; | ||
font-size: 14pt; | ||
} | ||
|
||
#input { | ||
font-size: 18pt; | ||
width: 100%; | ||
max-width: 800px; | ||
} | ||
|
||
#output { | ||
display: inline-block; | ||
text-align: left; | ||
} | ||
|
||
h1 { | ||
font-size: 22pt; | ||
margin-bottom: 0; | ||
} | ||
|
||
/* | ||
* "Fork me on GitHub" ribbon | ||
* https://www.kirilv.com/fork-ribbon-css-builder/ | ||
*/ | ||
.ribbon { | ||
/* positioning */ | ||
position: fixed; | ||
padding: 5px 45px; | ||
width: 128px; | ||
/* top right of the page */ | ||
top: 50px; | ||
right: -50px; | ||
-webkit-transform: rotate(45deg); | ||
-moz-transform: rotate(45deg); | ||
-ms-transform: rotate(45deg); | ||
transform: rotate(45deg); | ||
/* effects with some shadow */ | ||
box-shadow: 0 0 0 3px #f6c304, 0 0 20px -3px rgba(0, 0, 0, 0.5); | ||
text-shadow: 0 0 0 #ffffff, 0 0 5px rgba(0, 0, 0, 0.3); | ||
/* looks */ | ||
background-color: #f6c304; | ||
color: #ffffff; | ||
font-size: 13px; | ||
font-family: sans-serif; | ||
text-decoration: none; | ||
font-weight: bold; | ||
/* ribbon effects */ | ||
border: 2px dotted #ffffff; | ||
/* webkit antialias fix */ | ||
-webkit-backface-visibility: hidden; | ||
letter-spacing: .5px; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/*! | ||
* The buffer module from node.js, for the browser. | ||
* | ||
* @author Feross Aboukhadijeh <https://feross.org> | ||
* @license MIT | ||
*/ | ||
|
||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ | ||
|
||
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ |
Large diffs are not rendered by default.
Oops, something went wrong.