diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-05-05 03:45:55 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-05-05 03:45:55 -0400 |
| commit | fb250c3b677095bf65553ab998e98e8cb6e459b8 (patch) | |
| tree | 89b68167093d38e2315afb8c99371265a8ae463b /webcam.html | |
| parent | 0e4af74255a161ecaeb31cd831c33d9698ca1e9e (diff) | |
import webcam via postmessage
Diffstat (limited to 'webcam.html')
| -rw-r--r-- | webcam.html | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/webcam.html b/webcam.html index fe0d57b..edf4ddc 100644 --- a/webcam.html +++ b/webcam.html @@ -43,6 +43,7 @@ label.cbox { min-width: 50px; } <script src="http://asdf.us/dither/js/util.js"></script> <script src="js/color_code.js"></script> <script> + var width = parseInt( width_span.innerHTML = width_el.value ) var ratio = parseFloat( ratio_el.value ) var nn = $(nn_el).prop('checked') @@ -108,6 +109,9 @@ function save (){ MircColor.fromCanvas(camera, saveText, { width: width, ratio: ratio, neighbor: nn }) function saveText(rows) { text_style.value = MircColor.ascii(rows) + if (window.self !== window.top) { + window.parent.postMessage(text_style.value, "*"); + } } } nn_el.addEventListener('change', function(){ |
