@@ -156,7 +156,7 @@ function pasteID() {
156156function setElementText ( element , text ) {
157157 // For IE<10.
158158 if ( $ ( 'div#oldienotice' ) . is ( ":visible" ) ) {
159- // IE<10 do not support white-space:pre-wrap; so we have to do this BIG UGLY STINKING THING.
159+ // IE<10 does not support white-space:pre-wrap; so we have to do this BIG UGLY STINKING THING.
160160 element . text ( text . replace ( / \n / ig, '{BIG_UGLY_STINKING_THING__OH_GOD_I_HATE_IE}' ) ) ;
161161 element . html ( element . text ( ) . replace ( / { B I G _ U G L Y _ S T I N K I N G _ T H I N G _ _ O H _ G O D _ I _ H A T E _ I E } / ig, "\r\n<br>" ) ) ;
162162 }
@@ -317,6 +317,7 @@ function send_comment(parentid) {
317317 } ) ;
318318 }
319319
320+
320321/**
321322 * Send a new paste to server
322323 */
@@ -325,7 +326,17 @@ function send_data() {
325326 if ( $ ( 'textarea#message' ) . val ( ) . length == 0 ) {
326327 return ;
327328 }
329+
330+ // If sjcl has not collected enough entropy yet, display a message.
331+ if ( ! sjcl . random . isReady ( ) )
332+ {
333+ showStatus ( 'Sending paste (Please move your mouse for more entropy)...' , spin = true ) ;
334+ sjcl . random . addEventListener ( 'seeded' , function ( ) { send_data ( ) ; } ) ;
335+ return ;
336+ }
337+
328338 showStatus ( 'Sending paste...' , spin = true ) ;
339+
329340 var randomkey = sjcl . codec . base64 . fromBits ( sjcl . random . randomWords ( 8 , 0 ) , 0 ) ;
330341 var cipherdata = zeroCipher ( randomkey , $ ( 'textarea#message' ) . val ( ) ) ;
331342 var data_to_send = { data : cipherdata ,
0 commit comments