forked from x/volcanos
opt vim
This commit is contained in:
parent
5574a1c662
commit
4ea60fc18e
@ -170,6 +170,24 @@ Volcanos("onaction", {help: "交互操作", list: [
|
|||||||
can.Update(event, [ctx.ACTION, "prev", can.Status("total")||0, can.Option("limit"), can.Option("offend")])
|
can.Update(event, [ctx.ACTION, "prev", can.Status("total")||0, can.Option("limit"), can.Option("offend")])
|
||||||
},
|
},
|
||||||
|
|
||||||
|
listTags: function(event, can, button) {
|
||||||
|
var list = []
|
||||||
|
can.core.List([
|
||||||
|
can.base, can.core, can.misc, can.page, can.user,
|
||||||
|
can.onengine, can.ondaemon,
|
||||||
|
can.onappend, can.onlayout,
|
||||||
|
can.onmotion, can.onkeypop,
|
||||||
|
], function(lib) {
|
||||||
|
can.core.Item(lib, function(key, value) { if (!lib.hasOwnProperty(key)) { return }
|
||||||
|
if (key.indexOf("_") == 0) { return }
|
||||||
|
list.push({zone: lib._name, type: typeof value, name: key, text: can.base.isObject(value)? "": (value+"").split(ice.NL)[0], file: lib._path})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
var msg = can.request(event, {_handle: true, content: can.base.Format(list)})
|
||||||
|
can.run(event, [button], function() {
|
||||||
|
can.user.toast(can, "添加成功")
|
||||||
|
})
|
||||||
|
},
|
||||||
getClipboardData: function(event, can, button) {
|
getClipboardData: function(event, can, button) {
|
||||||
function add(text) {
|
function add(text) {
|
||||||
can.run(event, can.base.Simple(ctx.ACTION, button, can.base.parseJSON(text)), function(msg) {
|
can.run(event, can.base.Simple(ctx.ACTION, button, can.base.parseJSON(text)), function(msg) {
|
||||||
|
2
proto.js
2
proto.js
@ -173,7 +173,7 @@ var Volcanos = shy("火山架", {iceberg: "/chat/", volcano: "/frame.js", args:
|
|||||||
}
|
}
|
||||||
|
|
||||||
can = can||{}
|
can = can||{}
|
||||||
var proto = {__proto__: meta, _name: name, _load: function(name, cb) { // 加载缓存
|
var proto = {__proto__: meta, _path: _can_path, _name: name, _load: function(name, cb) { // 加载缓存
|
||||||
var cache = meta.cache[name]||[]; for (list.reverse(); list.length > 0; list) {
|
var cache = meta.cache[name]||[]; for (list.reverse(); list.length > 0; list) {
|
||||||
var sub = list.pop(); sub != can && cache.push(sub)
|
var sub = list.pop(); sub != can && cache.push(sub)
|
||||||
}; meta.cache[name] = cache
|
}; meta.cache[name] = cache
|
||||||
|
Loading…
x
Reference in New Issue
Block a user