Skip to content

Commit 1adb5fe

Browse files
author
mika
committed
Merge branch 'release/0.7.83' into main
2 parents a37f788 + d0ad89c commit 1adb5fe

File tree

7 files changed

+23
-10
lines changed

7 files changed

+23
-10
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "maoxian-web-clipper",
3-
"version": "0.7.82",
3+
"version": "0.7.83",
44
"description": "A web extension to clip information from web page. Save it to your local machine to avoid information invalidation. Not bored registration, Not charged.",
55
"main": "",
66
"type": "module",

src/js/content/ui.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ function throwIframeError(error) {
5454
const message = [
5555
"Unexpected error accured when loading MaoXian UI (frame) " + this.element.id,
5656
error.message,
57+
error.stack,
5758
"Please force refresh current web page (Ctrl + F5) and try again. If it still not work, try restart your browser"
5859
].join(", ");
5960
Notify.error(message);
@@ -564,7 +565,7 @@ async function submitForm(msg){
564565

565566
function notifyErrorAndExit(error) {
566567
Log.error(error);
567-
Notify.error(error.message);
568+
Notify.errorWithStack(error);
568569
T.emitPageChangedEvent();
569570
ignoreFrameMsg();
570571
unbindListener();

src/js/env.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const mxAssistantRoot = [websiteRoot, 'tmp/assistant'].join('/');
77
const env = {
88
isDev: true,
99
logLevel: "debug",
10-
version: '0.7.82',
10+
version: '0.7.83',
1111
minNativeAppVersion: '0.2.8',
1212
mdnRoot: mdnRoot,
1313
websiteRoot: websiteRoot,

src/js/env.production.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const mxAssistantRoot = [websiteRoot, 'assistant'].join('/');
77
const env = {
88
isDev: false,
99
logLevel: "warn",
10-
version: '0.7.82',
10+
version: '0.7.83',
1111
minNativeAppVersion: '0.2.8',
1212
mdnRoot: mdnRoot,
1313
websiteRoot: websiteRoot,

src/js/lib/notify.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ function style(){
1414
min-width: 200px;
1515
width: auto;
1616
height: auto;
17+
max-height: 500px;
18+
overflow-y: auto;
1719
right: 10px;
1820
top: 111px;
1921
z-index: 9999999;
@@ -119,6 +121,15 @@ function danger(content) {
119121
})
120122
}
121123

124+
function errorWithStack(error) {
125+
const content = `Error: \n${error.message}\n\nStack:\n${error.stack}`;
126+
add(content, {
127+
type: 'danger',
128+
behavior: 'manualDismiss'
129+
})
130+
}
131+
132+
122133
/*
123134
* options: {
124135
* type: 'success'(default), 'danger'
@@ -219,7 +230,8 @@ function generateId(){
219230
const Notify = {
220231
getContainer: getContainer,
221232
success: success,
222-
error: danger
233+
error: danger,
234+
errorWithStack: errorWithStack,
223235
}
224236

225237
export default Notify;

src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "__MSG_extensionName__",
44
"description": "__MSG_extensionDescription__",
55
"author": "Mika",
6-
"version": "0.7.82",
6+
"version": "0.7.83",
77
"default_locale": "en",
88
"permissions": [],
99
"optional_permissions": [

src/pages/setting.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ async function resetToDefault(e) {
910910
Notify.success(I18N.t('label.reset-to-default-success'));
911911
renderSection('setting-reset-and-backup');
912912
} catch(e) {
913-
Notify.error(e.message);
913+
Notify.errorWithStack(e);
914914
}
915915
}
916916
}
@@ -942,13 +942,13 @@ function handleRestoreFilePicker(e) {
942942
renderSection('setting-reset-and-backup');
943943
},
944944
(e) => {
945-
Notify.error(e.message);
945+
Notify.errorWithStack(e);
946946
}
947947
).catch((e) => {
948-
Notify.error(e.message);
948+
Notify.errorWithStack(e);
949949
});
950950
} catch(e) {
951-
Notify.error(e.message);
951+
Notify.errorWithStack(e);
952952
}
953953
}
954954
reader.readAsText(file);

0 commit comments

Comments
 (0)