File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 541541 e . stack && errlog ( e . stack ) ;
542542 }
543543 }
544+
545+ function getQSParams ( ) {
546+ return window . location . search
547+ . substr ( 1 )
548+ . split ( '&' )
549+ . reduce ( function ( result , item ) {
550+ var parts = item . split ( '=' ) ;
551+ result [ parts [ 0 ] ] = decodeURIComponent ( parts [ 1 ] ) ;
552+ return result ;
553+ } , { } ) ;
554+ }
555+
556+ function checkUrl ( ) {
557+ var params = getQSParams ( ) ;
558+
559+ // Accept base64 data
560+ if ( params [ 'base64' ] !== undefined ) {
561+ document . getElementById ( "data" ) . value = params [ 'base64' ] ;
562+ parseBase64 ( ) ;
563+ }
564+ } ;
544565 </ script >
545566 </ head >
546567
547- < body id ="home ">
568+ < body id ="home " onload =" checkUrl() " >
548569 < a href ="https://github.com/sugendran/msgpack-visualizer "> < img style ="position: absolute; top: 0; right: 0; border: 0; " src ="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png " alt ="Fork me on GitHub "> </ a >
549570 < div id ="header ">
550571 < h1 >
You can’t perform that action at this time.
0 commit comments