Commit 738085a7 authored by antoor's avatar antoor

Add view-site button

增加浏览网站按钮
parent 46d49b23
...@@ -51,12 +51,15 @@ class ViewSite { ...@@ -51,12 +51,15 @@ class ViewSite {
toolbar.loadStruct([ toolbar.loadStruct([
{ id: 'save', type: 'button', icon: 'save', text: '保存' }, { id: 'save', type: 'button', icon: 'save', text: '保存' },
{ type: 'separator' }, { type: 'separator' },
{ id: 'view', type: 'button', icon: 'chrome', text: '浏览' },
]); ]);
toolbar.attachEvent('onClick', (id) => { toolbar.attachEvent('onClick', (id) => {
switch(id) { switch(id) {
case 'save': case 'save':
this._saveCookie(); this._saveCookie();
break; break;
case 'view':
this._loadURL(this.opts.url);
} }
}) })
return toolbar; return toolbar;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment