Downgraded zxing so we dont need to hackingly import BigInt when using safari.
This commit is contained in:
		@@ -13,7 +13,7 @@
 | 
				
			|||||||
  "license": "ISC",
 | 
					  "license": "ISC",
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "@babel/polyfill": "~7.2",
 | 
					    "@babel/polyfill": "~7.2",
 | 
				
			||||||
    "@zxing/library": "^0.16.0",
 | 
					    "@zxing/library": "^0.15.2",
 | 
				
			||||||
    "body-parser": "^1.19.0",
 | 
					    "body-parser": "^1.19.0",
 | 
				
			||||||
    "chart.js": "^2.9.3",
 | 
					    "chart.js": "^2.9.3",
 | 
				
			||||||
    "clean-webpack-plugin": "^3.0.0",
 | 
					    "clean-webpack-plugin": "^3.0.0",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -50,32 +50,6 @@
 | 
				
			|||||||
      content="black-translucent"
 | 
					      content="black-translucent"
 | 
				
			||||||
    />
 | 
					    />
 | 
				
			||||||
    <meta name="apple-mobile-web-app-capable" content="yes" />
 | 
					    <meta name="apple-mobile-web-app-capable" content="yes" />
 | 
				
			||||||
 | 
					 | 
				
			||||||
    <!-- Super hacky safari bigint import -->
 | 
					 | 
				
			||||||
    <script type="application/javascript">
 | 
					 | 
				
			||||||
      const loadBigInt = function(callbackfn) {
 | 
					 | 
				
			||||||
        var newScript = document.createElement("script");
 | 
					 | 
				
			||||||
        newScript.type = "text/javascript";
 | 
					 | 
				
			||||||
        newScript.setAttribute("src", "https://peterolson.github.io/BigInteger.js/BigInteger.min.js");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        if(newScript.readyState) {
 | 
					 | 
				
			||||||
          console.log("newScript is ready")
 | 
					 | 
				
			||||||
          newScript.onreadystatechange = function() {
 | 
					 | 
				
			||||||
            if(/loaded|complete/.test(newScript.readyState)) callbackfn();
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
          newScript.addEventListener("load", callbackfn, false);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        document.documentElement.firstChild.appendChild(newScript);
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      if (!navigator.userAgent.includes("Chrome") && !navigator.userAgent.includes("Firefox")) {
 | 
					 | 
				
			||||||
        loadBigInt(function() {
 | 
					 | 
				
			||||||
          console.log("callback from loadBigInt")
 | 
					 | 
				
			||||||
          BigInt = bigInt;
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    </script>
 | 
					 | 
				
			||||||
  </head>
 | 
					  </head>
 | 
				
			||||||
  <body>
 | 
					  <body>
 | 
				
			||||||
    <div id="app"></div>
 | 
					    <div id="app"></div>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user