Skip to content

Commit b3e7331

Browse files
committed
change the console. error output to alert
1 parent f43fe4b commit b3e7331

File tree

32 files changed

+49
-46
lines changed

32 files changed

+49
-46
lines changed

1.hello-world/1.hello-world.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<body>
1313
Loading...
14-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.1/dist/dbr.js"></script>
14+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.0/dist/dbr.js"></script>
1515
<script>
1616
/** LICENSE ALERT - README
1717
* To use the library, you need to first specify a license key using the API "license" as shown below.
@@ -22,7 +22,7 @@
2222
/**
2323
* You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=github&product=dbr&package=js to get your own trial license good for 30 days.
2424
* Note that if you downloaded this sample from Dynamsoft while logged in, the above license key may already be your own 30-day trial license.
25-
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.1&utm_source=github#specify-the-license or contact support@dynamsoft.com.
25+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.0&utm_source=github#specify-the-license or contact support@dynamsoft.com.
2626
* LICENSE ALERT - THE END
2727
*/
2828

@@ -54,6 +54,7 @@
5454
*/
5555
await scanner.show();
5656
} catch (ex) {
57+
alert(ex);
5758
throw ex;
5859
}
5960
};

1.hello-world/10.read-video-pwa/helloworld-pwa.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<body>
1414
<h1 style="font-size: 1.5em;">Hello World for PWA</h1>
1515
Loading...
16-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.1/dist/dbr.js"></script>
16+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.0/dist/dbr.js"></script>
1717
<script>
1818
/** LICENSE ALERT - README
1919
* To use the library, you need to first specify a license key using the API "license" as shown below.
@@ -24,7 +24,7 @@ <h1 style="font-size: 1.5em;">Hello World for PWA</h1>
2424
/**
2525
* You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=github&product=dbr&package=js to get your own trial license good for 30 days.
2626
* Note that if you downloaded this sample from Dynamsoft while logged in, the above license key may already be your own 30-day trial license.
27-
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.1&utm_source=github#specify-the-license or contact support@dynamsoft.com.
27+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.0&utm_source=github#specify-the-license or contact support@dynamsoft.com.
2828
* LICENSE ALERT - THE END
2929
*/
3030

1.hello-world/11.read-video-requirejs.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ <h1 style="font-size: 1.5em;">Hello World for RequireJS</h1>
1313
Loading...
1414
<script src="https://cdn.jsdelivr.net/npm/requirejs@2.3.6/require.js"></script>
1515
<script>
16-
requirejs(['https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.1/dist/dbr.js'], function({
16+
requirejs(['https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.0/dist/dbr.js'], function({
1717
BarcodeReader,
1818
BarcodeScanner
1919
}) {
@@ -26,11 +26,11 @@ <h1 style="font-size: 1.5em;">Hello World for RequireJS</h1>
2626
/**
2727
* You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=github&product=dbr&package=js to get your own trial license good for 30 days.
2828
* Note that if you downloaded this sample from Dynamsoft while logged in, the above license key may already be your own 30-day trial license.
29-
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.1&utm_source=github#specify-the-license or contact support@dynamsoft.com.
29+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.0&utm_source=github#specify-the-license or contact support@dynamsoft.com.
3030
* LICENSE ALERT - THE END
3131
*/
3232

33-
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.1/dist/";
33+
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.0/dist/";
3434
let pScanner = null;
3535
window.onload = async function() {
3636
try {

1.hello-world/12.read-video-es6.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<h1 style="font-size: 1.5em;">Hello World for ES6</h1>
1414
Loading...
1515
<script type="module">
16-
import { BarcodeReader, BarcodeScanner } from 'https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.1/dist/dbr.mjs';
16+
import { BarcodeReader, BarcodeScanner } from 'https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.0/dist/dbr.mjs';
1717
/** LICENSE ALERT - README
1818
* To use the library, you need to first specify a license key using the API "license" as shown below.
1919
*/
@@ -23,11 +23,11 @@ <h1 style="font-size: 1.5em;">Hello World for ES6</h1>
2323
/**
2424
* You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=github&product=dbr&package=js to get your own trial license good for 30 days.
2525
* Note that if you downloaded this sample from Dynamsoft while logged in, the above license key may already be your own 30-day trial license.
26-
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.1&utm_source=github#specify-the-license or contact support@dynamsoft.com.
26+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.0&utm_source=github#specify-the-license or contact support@dynamsoft.com.
2727
* LICENSE ALERT - THE END
2828
*/
2929

30-
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.1/dist/";
30+
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.0/dist/";
3131

3232
let pScanner = null;
3333
window.onload = async () => {

1.hello-world/2.read-an-image.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ <h1 style="font-size: 1.5em;">Read Barcode from Images</h1>
2929
border: solid 1px gray;
3030
}
3131
</style>
32-
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.1/dist/dbr.js"></script>
32+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.0/dist/dbr.js"></script>
3333
<script>
3434
/** LICENSE ALERT - README
3535
* To use the library, you need to first specify a license key using the API "license" as shown below.
@@ -40,7 +40,7 @@ <h1 style="font-size: 1.5em;">Read Barcode from Images</h1>
4040
/**
4141
* You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=github&product=dbr&package=js to get your own trial license good for 30 days.
4242
* Note that if you downloaded this sample from Dynamsoft while logged in, the above license key may already be your own 30-day trial license.
43-
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.1&utm_source=github#specify-the-license or contact support@dynamsoft.com.
43+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.0&utm_source=github#specify-the-license or contact support@dynamsoft.com.
4444
* LICENSE ALERT - THE END
4545
*/
4646

@@ -56,6 +56,7 @@ <h1 style="font-size: 1.5em;">Read Barcode from Images</h1>
5656
} catch (ex) {
5757
document.getElementById('p-loading').innerText = ex;
5858
document.getElementById('ipt-file').disabled = true;
59+
alert(ex);
5960
throw ex;
6061
}
6162
})();
@@ -100,6 +101,7 @@ <h1 style="font-size: 1.5em;">Read Barcode from Images</h1>
100101
divResults.appendChild(document.createElement('hr'));
101102
divResults.scrollTop = divResults.scrollHeight;
102103
} catch (ex) {
104+
alert(ex);
103105
throw ex;
104106
} finally {
105107
pReading.style.display = 'none';

1.hello-world/3.read-video-angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@angular/platform-browser": "~11.2.5",
2020
"@angular/platform-browser-dynamic": "~11.2.5",
2121
"@angular/router": "~11.2.5",
22-
"dynamsoft-javascript-barcode": "9.0.1",
22+
"dynamsoft-javascript-barcode": "9.0.0",
2323
"rxjs": "~6.6.0",
2424
"tslib": "^2.0.0",
2525
"zone.js": "~0.11.3"

1.hello-world/3.read-video-angular/src/app/barcode-scanner/barcode-scanner.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class VideoDecodeComponent implements OnInit {
2222
};
2323
await scanner.open();
2424
} catch (ex) {
25-
console.error(ex);
25+
alert(ex);
2626
}
2727
}
2828
async ngOnDestroy() {

1.hello-world/3.read-video-angular/src/app/dbr.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ BarcodeReader.license = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
99
/**
1010
* You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=github&product=dbr&package=js to get your own trial license good for 30 days.
1111
* Note that if you downloaded this sample from Dynamsoft while logged in, the above license key may already be your own 30-day trial license.
12-
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.1&utm_source=github#specify-the-license or contact support@dynamsoft.com.
12+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.0.0&utm_source=github#specify-the-license or contact support@dynamsoft.com.
1313
* LICENSE ALERT - THE END
1414
*/
1515

16-
BarcodeReader.engineResourcePath = 'https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.1/dist/';
16+
BarcodeReader.engineResourcePath = 'https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.0/dist/';

1.hello-world/3.read-video-angular/src/app/img-decode/img-decode.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class ImgDecodeComponent implements OnInit {
2020
}
2121
if(!results.length){ alert('No barcode found'); }
2222
} catch (ex) {
23-
console.error(ex);
23+
alert(ex);
2424
}
2525
e.target.value = '';
2626
}

1.hello-world/4.read-video-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"@testing-library/jest-dom": "^5.11.4",
88
"@testing-library/react": "^11.1.0",
99
"@testing-library/user-event": "^12.1.10",
10-
"dynamsoft-javascript-barcode": "9.0.1",
10+
"dynamsoft-javascript-barcode": "9.0.0",
1111
"react": "^17.0.1",
1212
"react-dom": "^17.0.1",
1313
"react-scripts": "4.0.3",

0 commit comments

Comments
 (0)