diff options
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(){ |
