diff --git a/frame.js b/frame.js index c31d91ef..0fd5e3f4 100644 --- a/frame.js +++ b/frame.js @@ -166,13 +166,8 @@ Volcanos(chat.ONAPPEND, { return can.base.isUndefined(value)? (value = target.innerText): (target.innerHTML = value.trim? value.trim(): value+"") }); return value } catch (e) {} }, - Action: function(key, value) { - // value && (value = can.user.trans(sub, value, null, html.INPUT)) - return can.page.SelectArgs(can, action, key, value)[0] - }, - Option: function(key, value) { - // value && (value = can.user.trans(sub, value, null, html.INPUT)); - return can.page.SelectArgs(can, option, key, value)[0] }, + Action: function(key, value) { return can.page.SelectArgs(can, action, key, value)[0] }, + Option: function(key, value) { return can.page.SelectArgs(can, option, key, value)[0] }, Update: function(event, cmds, cb, silent) { event = event||{}, sub.request(event)._caller(), event.metaKey && sub.request(event, {metaKey: ice.TRUE}) var msg = sub.request(event), list = can.core.Value(sub, "sub.db._checkbox"); can.core.Item(list, function(key, value) { msg.Option(key, value) }) sub.request(event, sub.Option()) diff --git a/plugin/local/code/inner.js b/plugin/local/code/inner.js index b26e3acc..bab7c7df 100644 --- a/plugin/local/code/inner.js +++ b/plugin/local/code/inner.js @@ -5,8 +5,10 @@ const CURRENT_FILE = "web.code.inner:currentFile", SELECT_LINE = "selectLine" const VIEW_CREATE = "tabview.view.create", VIEW_REMOVE = "tabview.view.remove", LINE_SELECT = "tabview.line.select" Volcanos(chat.ONIMPORT, { _init: function(can, msg, cb) { can.onappend.style(can, code.INNER), can.Mode(msg.Option("mode")||can.Mode()) - if (can.Mode() == ice.MSG_RESULT) { can.Conf("_width", can.base.Max(can.ConfWidth(), window.innerWidth-12)) + if (can.Mode() == ice.MSG_RESULT) { + can.Conf("_width", can.base.Max(can.ConfWidth(), window.innerWidth-12)) msg.result = msg.result||[can._output.innerHTML], can.Mode(chat.SIMPLE), can.sup.Mode(chat.SIMPLE) + can.Option(nfs.FILE, can.Conf(nfs.FILE)||can.Option(nfs.FILE)) } can.onmotion.clear(can, can._output), msg.result = msg.result||[""] var paths = can.core.Split(can.Option(nfs.PATH)); can.Option(nfs.PATH, paths[0]) @@ -579,7 +581,9 @@ Volcanos(chat.ONEXPORT, { selection: function(can, str) { var s = document.getSelection().toString(), begin = str.indexOf(s), end = begin+s.length for (var i = begin; i >= 0; i--) { if (str[i].match(/[a-zA-Z0-9_.]/)) { s = str.slice(i, end) } else { break } } return s }, - parse: function(can) { return can._msg.Option(lex.PARSE)||can.base.Ext(can.Option(nfs.FILE)) }, + parse: function(can) { + return can._msg.Option(lex.PARSE)||can.base.Ext(can.Option(nfs.FILE)) + }, split: function(can, file) { var ls = file.split(nfs.PS); if (ls.length == 1) { return [nfs.PWD, ls[0]] } if (ls[0] == ice.USR) { return [ls.slice(0, 2).join(nfs.PS)+nfs.PS, ls.slice(2).join(nfs.PS)] } return [ls.slice(0, 1).join(nfs.PS)+nfs.PS, ls.slice(1).join(nfs.PS)] diff --git a/plugin/local/wiki/word.css b/plugin/local/wiki/word.css index 560fe0ce..45d66f31 100644 --- a/plugin/local/wiki/word.css +++ b/plugin/local/wiki/word.css @@ -2,7 +2,12 @@ fieldset.word>div.output { padding:var(--plugin-padding); } fieldset.word>div.output p { margin:var(--title-margin) auto; } fieldset.word>div.output h3 { margin-top:var(--title-margin); } fieldset.word>div.output h2.story[data-type=spark][data-name=title] { text-align:center; } -fieldset.word>div.output ul { margin:20px; } +fieldset.word>div.output code { + font-style: italic; +} +fieldset.word>div.output ul { + margin:20px; font-family:var(--code-font-family); +} fieldset.word>div.output ul>li:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); cursor:pointer; } fieldset.word>div.output img { display:block; margin:auto; max-height:100%; max-width:100%; } fieldset.word>div.output div.project img { margin:unset; }