File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed
Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ ( function ( ) {
2+
3+ // Find the script element
4+ var scripts = document . getElementsByTagName ( "script" ) ;
5+ var script = scripts [ scripts . length - 1 ] ;
6+
7+ // Read the modules
8+ var modules = script . getAttribute ( "data-modules" ) ;
9+ var demoScripts = script . getAttribute ( "data-modules" ) ;
10+ var path = window . location . pathname ;
11+ var pathParts = path . split ( "/" ) ;
12+ var pathLength = pathParts . length ;
13+ if ( modules ) {
14+ modules = modules
15+ . replace ( / ^ \s + | \s + $ / g, "" )
16+ . split ( / \s + / ) ;
17+ } else {
18+ modules = [ ] ;
19+ }
20+ modules . push ( pathParts [ pathLength - 2 ] ) ;
21+ require ( modules , function ( ) {
22+ $ ( "body" ) . css ( "visibility" , "visible" ) ;
23+ eval ( $ ( script ) . html ( ) ) ;
24+ } ) ;
25+ } ) ( ) ;
Original file line number Diff line number Diff line change 11body {
22 font-family : Arial, Helvetica, sans-serif;
3+ visibility : hidden;
34}
45
56table {
Original file line number Diff line number Diff line change 1+ var requirejs = {
2+ baseUrl : "../../ui" ,
3+ paths : {
4+ jquery : "../../external/jquery/jquery"
5+ }
6+ } ;
You can’t perform that action at this time.
0 commit comments