File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,16 @@ async function init() {
42
42
43
43
document . title = "GS1 Syntax Engine HTML demo | Library release: " + gs1encoder . version ;
44
44
45
- document . getElementById ( "data" ) . value = "https://example.com/01/12312312312333/10/ABC123?99=TESTING" ;
45
+ var dataParam = new URL ( document . location . toString ( ) ) . searchParams . get ( 'data' ) ;
46
+
47
+ document . getElementById ( "data" ) . value = dataParam ??
48
+ "https://example.com/01/12312312312333/10/ABC123?99=TESTING" ;
46
49
47
50
load_data_values ( ) ;
48
51
52
+ if ( dataParam )
53
+ process_clicked ( ) ;
54
+
49
55
}
50
56
51
57
Original file line number Diff line number Diff line change @@ -42,10 +42,16 @@ async function init() {
42
42
43
43
document . title = "GS1 Syntax Engine HTML demo | Library release: " + gs1encoder . version ;
44
44
45
- document . getElementById ( "data" ) . value = "https://example.com/01/12312312312333/10/ABC123?99=TESTING" ;
45
+ var dataParam = new URL ( document . location . toString ( ) ) . searchParams . get ( 'data' ) ;
46
+
47
+ document . getElementById ( "data" ) . value = dataParam ??
48
+ "https://example.com/01/12312312312333/10/ABC123?99=TESTING" ;
46
49
47
50
load_data_values ( ) ;
48
51
52
+ if ( dataParam )
53
+ process_clicked ( ) ;
54
+
49
55
}
50
56
51
57
You can’t perform that action at this time.
0 commit comments