mirror of
https://github.com/amark/gun.git
synced 2025-06-07 22:56:42 +00:00
meta.js ununbound
This commit is contained in:
parent
42926ec09d
commit
c0224c4d28
26
lib/meta.js
26
lib/meta.js
@ -1,4 +1,9 @@
|
||||
;(function(){
|
||||
var root;
|
||||
if(typeof window !== "undefined"){ root = window }
|
||||
if(typeof global !== "undefined"){ root = global }
|
||||
root = root || {};
|
||||
var console = root.console || {log: function(){}};
|
||||
function USE(arg, req){
|
||||
return req? require(arg) : arg.slice? USE[R(arg)] : function(mod, path){
|
||||
arg(mod = {exports: {}});
|
||||
@ -8,9 +13,9 @@
|
||||
return p.split('/').slice(-1).toString().replace('.js','');
|
||||
}
|
||||
}
|
||||
if(typeof module !== "undefined"){ var common = module }
|
||||
|
||||
/* UNBUILD */
|
||||
;USE(function(module){
|
||||
;USE(function(module){
|
||||
var noop = function(){}, u;
|
||||
$.fn.or = function(s){ return this.length ? this : $(s||'body') };
|
||||
var m = window.meta = {edit:[]};
|
||||
@ -136,9 +141,11 @@
|
||||
edit.combow = edit.combow.join(',');
|
||||
m.list(meta.edit);
|
||||
}
|
||||
})(USE, './metaCore');
|
||||
|
||||
;USE(function(module){try{
|
||||
|
||||
})(USE, './metaCore');
|
||||
;USE(function(module){
|
||||
try{
|
||||
/* UI */
|
||||
if(meta.css){ return }
|
||||
var $m = $('<div>').attr('id', 'meta');
|
||||
@ -228,8 +235,9 @@
|
||||
tag.innerHTML = tmp;
|
||||
document.body.appendChild(tag);
|
||||
}
|
||||
}catch(e){}})(USE, './metaUI');
|
||||
}catch(e){}
|
||||
|
||||
})(USE, './metaUI');
|
||||
;USE(function(module){
|
||||
// include basic text editing by default.
|
||||
var monotype = window.monotype || function(){console.log("monotype needed")};
|
||||
@ -372,10 +380,11 @@
|
||||
on: function(eve){ meta.text.editor('fontSize', 7) },
|
||||
up: function(){}
|
||||
});
|
||||
|
||||
|
||||
})(USE, './metaText');
|
||||
|
||||
|
||||
;USE(function(module){
|
||||
var m = meta, k = m.key;
|
||||
$(window).on('blur', k.wipe).on('focus', k.wipe);
|
||||
$(document).on('mousedown mousemove mouseup', function(eve){
|
||||
m.tap.eve = eve;
|
||||
@ -398,6 +407,7 @@
|
||||
});
|
||||
$(document).on('keydown', k.down).on('keyup', k.up);
|
||||
$(document).on('select contextmenu keyup mouseup', '[contenteditable=true]', m.text.on);
|
||||
})(USE, './metaEvents');
|
||||
|
||||
|
||||
})(USE, './metaEvents');
|
||||
}());
|
Loading…
x
Reference in New Issue
Block a user