File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -539,5 +539,12 @@ window.app = createApp({
539539 '@context' : this . doc [ '@context' ]
540540 } ;
541541 setEditorValue ( this . contextEditor , this . contextDoc ) ;
542+ } ,
543+ gatherHash ( ) {
544+ const url = new URL ( window . location ) ;
545+ const hash = new URLSearchParams ( url . hash . slice ( 1 ) ) ;
546+ this . doc = JSON . parse ( hash . get ( 'json-ld' ) || { } ) ;
547+ setEditorValue ( this . mainEditor , this . doc ) ;
548+ this . outputTab = hash . get ( 'startTab' ) . slice ( 4 ) ;
542549 }
543550} ) . mount ( ) ;
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ <h2 class="ui massive header">JSON-LD Playground</h2>
2929 < code > Shift+Tab</ code > ) to navigate out of the editor.</ p >
3030</ div >
3131
32- < div class ="ui container " v-scope v-effect ="setOutputTab() ">
32+ < div class ="ui container " v-scope v-effect ="setOutputTab() " @vue:mounted =" gatherHash() " >
3333 < div class ="ui buttons ">
3434 < button class ="ui large basic right pointing label "> Examples</ button >
3535 < button id ="btn-person " class ="ui button "
You can’t perform that action at this time.
0 commit comments