File tree 3 files changed +39
-0
lines changed
_static/aws-ux-shortbread
3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ ( function ( w ) {
2
+ w . URLSearchParams = w . URLSearchParams || function ( searchString ) {
3
+ var self = this ;
4
+ self . searchString = searchString ;
5
+ self . get = function ( name ) {
6
+ var results = new RegExp ( '[\?&]' + name + '=([^&#]*)' ) . exec ( self . searchString ) ;
7
+ if ( results === null ) {
8
+ return null ;
9
+ }
10
+ else {
11
+ return decodeURI ( results [ 1 ] ) || 0 ;
12
+ }
13
+ } ;
14
+ }
15
+ } ) ( window ) ;
16
+
17
+ const queryString = window . location . search ;
18
+ const urlParams = new URLSearchParams ( queryString ) ;
19
+ const lang = urlParams . get ( 'lang' )
20
+ window . onload = function ( ) {
21
+ var domainName = window . location . hostname ;
22
+
23
+ // remove an instance of shortbread if already exists
24
+ var existingShortbreadEl = document . getElementById ( "awsccc-sb-ux-c" ) ;
25
+ existingShortbreadEl && existingShortbreadEl . remove ( ) ;
26
+
27
+ var shortbread = AWSCShortbread ( {
28
+ domain : domainName ,
29
+ language : lang ,
30
+ //queryGeolocation: function (geolocatedIn) { geolocatedIn("EU") },
31
+ } ) ;
32
+
33
+ shortbread . checkForCookieConsent ( ) ;
34
+ }
Original file line number Diff line number Diff line change 71
71
# For Adobe Analytics
72
72
html_js_files = [
73
73
"https://a0.awsstatic.com/s_code/js/3.0/awshome_s_code.js" ,
74
+ "aws-ux-shortbread/index.js" ,
75
+ "aws-ux-shortbread/init.js" ,
74
76
]
75
77
76
78
html_context = {"css_files" : ["_static/theme_overrides.css" ]}
You can’t perform that action at this time.
0 commit comments