From 03d59b159acf5e4d43e9ffa26947780de1d28e5b Mon Sep 17 00:00:00 2001 From: catarak Date: Mon, 15 Aug 2016 11:51:11 -0400 Subject: [PATCH] add accessibility linting beep to webpack loader and remove base64 string --- client/modules/IDE/components/Editor.js | 4 ++-- client/sounds/audioAlert.mp3 | Bin 0 -> 3928 bytes webpack.config.dev.js | 2 +- webpack.config.prod.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 client/sounds/audioAlert.mp3 diff --git a/client/modules/IDE/components/Editor.js b/client/modules/IDE/components/Editor.js index 4e4d6e5d..d4b6c72e 100644 --- a/client/modules/IDE/components/Editor.js +++ b/client/modules/IDE/components/Editor.js @@ -18,14 +18,14 @@ import { CSSLint } from 'csslint'; window.CSSLint = CSSLint; import { HTMLHint } from 'htmlhint'; window.HTMLHint = HTMLHint; +const beepUrl = require('../../../sounds/audioAlert.mp3'); import { debounce } from 'throttle-debounce'; class Editor extends React.Component { componentDidMount() { - // TODO: replace with wav file and loader - this.beep = new Audio('data:audio/wav;base64,//uQRAAAAWMSLwUIYAAsYkXgoQwAEaYLWfkWgAI0wWs/ItAAAGDgYtAgAyN+QWaAAihwMWm4G8QQRDiMcCBcH3Cc+CDv/7xA4Tvh9Rz/y8QADBwMWgQAZG/ILNAARQ4GLTcDeIIIhxGOBAuD7hOfBB3/94gcJ3w+o5/5eIAIAAAVwWgQAVQ2ORaIQwEMAJiDg95G4nQL7mQVWI6GwRcfsZAcsKkJvxgxEjzFUgfHoSQ9Qq7KNwqHwuB13MA4a1q/DmBrHgPcmjiGoh//EwC5nGPEmS4RcfkVKOhJf+WOgoxJclFz3kgn//dBA+ya1GhurNn8zb//9NNutNuhz31f////9vt///z+IdAEAAAK4LQIAKobHItEIYCGAExBwe8jcToF9zIKrEdDYIuP2MgOWFSE34wYiR5iqQPj0JIeoVdlG4VD4XA67mAcNa1fhzA1jwHuTRxDUQ//iYBczjHiTJcIuPyKlHQkv/LHQUYkuSi57yQT//uggfZNajQ3V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/pD6ElLqSX+rUmOQNpJFa/r+sa4e/pBlAABoAAAAA3CUgShLdGIxsY7AUABPRrgCABdDuQ5GC7DqPQCgbbJUAoRSUj+NIEig0YfyWUho1VBBBA//uQZB4ABZx5zfMakeAAAAmwAAAAF5F3P0w9GtAAACfAAAAAwLhMDmAYWMgVEG1U0FIGCBgXBXAtfMH10000EEEEEECUBYln03TTTdNBDZopopYvrTTdNa325mImNg3TTPV9q3pmY0xoO6bv3r00y+IDGid/9aaaZTGMuj9mpu9Mpio1dXrr5HERTZSmqU36A3CumzN/9Robv/Xx4v9ijkSRSNLQhAWumap82WRSBUqXStV/YcS+XVLnSS+WLDroqArFkMEsAS+eWmrUzrO0oEmE40RlMZ5+ODIkAyKAGUwZ3mVKmcamcJnMW26MRPgUw6j+LkhyHGVGYjSUUKNpuJUQoOIAyDvEyG8S5yfK6dhZc0Tx1KI/gviKL6qvvFs1+bWtaz58uUNnryq6kt5RzOCkPWlVqVX2a/EEBUdU1KrXLf40GoiiFXK///qpoiDXrOgqDR38JB0bw7SoL+ZB9o1RCkQjQ2CBYZKd/+VJxZRRZlqSkKiws0WFxUyCwsKiMy7hUVFhIaCrNQsKkTIsLivwKKigsj8XYlwt/WKi2N4d//uQRCSAAjURNIHpMZBGYiaQPSYyAAABLAAAAAAAACWAAAAApUF/Mg+0aohSIRobBAsMlO//Kk4soosy1JSFRYWaLC4qZBYWFRGZdwqKiwkNBVmoWFSJkWFxX4FFRQWR+LsS4W/rFRb/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////VEFHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAU291bmRib3kuZGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMjAwNGh0dHA6Ly93d3cuc291bmRib3kuZGUAAAAAAAAAACU='); // eslint-disable-line + this.beep = new Audio(beepUrl); this._cm = CodeMirror(this.refs.container, { // eslint-disable-line theme: 'p5-widget', value: this.props.file.content, diff --git a/client/sounds/audioAlert.mp3 b/client/sounds/audioAlert.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..3e80538123d95b918ebaf8edfcf5ba04dafbb334 GIT binary patch literal 3928 zcmeH~XIN87_rPyL*#HqjuR`cZGgJjsN&v~yt28B$(4<9ain=67ks?KEL@5yw5mZnt z2olOJp@SgG@}g2*kOct|0m=Ns?)rcD@_yTo@9(+KojK>uojG&PnR#Y#<~r;U3mCVH zgM}8WvJZmToFk&ciGC61HHrR^i@6h)rRHR*wJ{i7$i>~=oh74LG9e-?%s)H|3W|y% z86G?s8yl+`x%W@3y&bD1@<)egY-lhEa&dOHU}^bSS{vV(06l$8U5us{W_RcxfNh5# z)&E+$2Zsl;KC-%j5D>)M0SWKHb`QaON#4W5y>#tiZ7*OCyT-6=Ca`SQ$LtC}Q20^d z?SQc}ehB|xf^8HL;`;W2Be12 z5oAF!#E5U~uv_M`f2WzpR^mPDaK zyeH=G{XO6BgEt0f;pQVO-$F7-!iN9ydR)soSlF36`FqRajc`^guicgnaT8awr5mn0 z;#~I^-`rpRa8SU_CQ{1oo`eG7k1gy>)sG*(Zf7pQurAUVyl{K&q^sW7Ud zM^*c5>DW>I-n<=iXDqTb>&r8S=e}H;Ew4R?Lm*CQ;0GHzwRZ_CZ<@pJNLI*h} zQ?A$N&o{VWTixrmm88%%nYA^PaKP-qhiQMce&-|Rxd<1J@R%wv&YGcWWT?P&%3|yC znjBxB?Ra@OJKS}-Cs=AaCI(g+GfY$a51tdF{Q2+84 z{xOE$u4}Im#-!y4z)GBOV4Es9>1OIs0cxYtWN#!?kxTsJKPh2FQVvrsWSGAWwkRBU zP0IqQo)cileDFb`Q#`P$Fx>!~_zTux>nG4#I+L_PND*dyVC%csmgqD{A_wWtu-}nN z(;e)}nG`DsHVE&$e~KZEvsVxP*1lY(>;Kxd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BBU?GH+$vIMytGS^ ze0_EvvYBn<#H<`oB$u5oZ$ifa%1jytHFqDhMDhpUh$TRosx5-?D;qZ*KCKYden9@L3I7@&JBA+p1P>)6 z+2J|bsG=wdIdc?;ys63{Dz(PY&j#|57t1a;K?skw)L!9g5nFLA|CVX(aIPQaZ19VI z88qD^D+l*U7f&rhux-tDPFYHrpmtPgRYSe{>?%U^&~C{hcMh;kCT>7^>m!}dhg)DcSl{l@n>J?e}mR4k~=ROt>5$aly*yHb}*@Lv7~et)>grr_zpQETPwwKSk!0DB5pT17y_WP`Ha6`_KP8&wfhvOJW!Z-&A9UgTnXo*G4`Uym$wr0B*L!o!XfRIG zG_jrZSo;(+<-sw_i`rrd@+Ak&75FluGbq&xy1UE!6Par@X@D6)BV`QPIp;(;D;QQE}7#DiGE@2S25d3TvCz@g1 zu_CPFBy!lVC$>ReH4r!LtfS+!a;_sqG{=JXde~v?XdzgoEE(c1?*sv$^@X=FH7NE<{v}X{+BZYmRD4!{E`sOG z8JGD~UdLk>dmVV#@S&qtdXUOR^?j6w`XV9*c@meMJ!*0seOUyA#Wc7IyDPkn2>1N< zEQn9DpjW(UjhQYXvsjY>Mrh$Q` tp6mbk7d-&BO^9=RYo$g%#~-}{k+r2$Of8U;1`N#e*4)-s0^?#($%5DGv literal 0 HcmV?d00001 diff --git a/webpack.config.dev.js b/webpack.config.dev.js index 6a0a9fe8..0073341a 100644 --- a/webpack.config.dev.js +++ b/webpack.config.dev.js @@ -36,7 +36,7 @@ module.exports = { loaders: ['style', 'css', 'sass'] }, { - test: /\.svg$/, + test: /\.(svg|mp3)$/, loader: 'file' } ], diff --git a/webpack.config.prod.js b/webpack.config.prod.js index 58f477f5..c90f0a5a 100644 --- a/webpack.config.prod.js +++ b/webpack.config.prod.js @@ -37,7 +37,7 @@ module.exports = { loader: 'babel' }, { - test: /\.svg$/, + test: /\.(svg|mp3)$/, loader: 'file' } ]