File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed
Assets/WebGLTemplates/Develop Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -21,14 +21,6 @@ if (getCookie("addTimestamp") === "false") {
2121 addTimestamp = false ;
2222}
2323
24- const urlParams = new URLSearchParams ( window . location . search ) ;
25- const debugParam = urlParams . get ( 'debug' ) ;
26- const debug = debugParam === 'true' ;
27-
28- initializeToggleButton ( debug ) ;
29- initializeDebugConsole ( ) ;
30-
31-
3224function setCookie ( cname , cvalue , exdays ) {
3325 const d = new Date ( ) ;
3426 d . setTime ( d . getTime ( ) + ( exdays * 24 * 60 * 60 * 1000 ) ) ;
@@ -609,3 +601,19 @@ function refreshTrackingDiv() {
609601 innerHtml += '</dl>' ;
610602 trackingDiv . innerHTML = innerHtml ;
611603}
604+
605+ // Polyfill for older browsers
606+ if ( ! String . prototype . replaceAll ) {
607+ String . prototype . replaceAll = function ( str , newStr ) {
608+ if ( str === '?' )
609+ str = '\\\\?' ;
610+ return this . replace ( str instanceof RegExp ? str : new RegExp ( str , 'g' ) , newStr ) ;
611+ }
612+ }
613+
614+ const urlParams = new URLSearchParams ( window . location . search ) ;
615+ const debugParam = urlParams . get ( 'debug' ) ;
616+ const debug = debugParam === 'true' ;
617+
618+ initializeToggleButton ( debug ) ;
619+ initializeDebugConsole ( ) ;
You can’t perform that action at this time.
0 commit comments