diff --git a/README.md b/README.md index 984120fc..5bb40adc 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,8 @@ Thanks to:
Dário Freire, John Williamson, Robin Bron, -Elie Makhoul +Elie Makhoul, +Mike Staub

- Join others in sponsoring code: https://www.patreon.com/gunDB ! @@ -193,7 +194,7 @@ var Gun = require('gun/gun'); If you also need to install SEA for user auth and crypto, also install some of its dependencies like this: -`npm install text-encoding node-webcrypto-ossl --save` +`npm install text-encoding @peculiar/webcrypto --save` You will need to require it too (it will be automatically added to the Gun object): diff --git a/lib/meta.js b/lib/meta.js index 6cb610ac..f484a87b 100644 --- a/lib/meta.js +++ b/lib/meta.js @@ -15,7 +15,9 @@ } if(typeof module !== "undefined"){ var common = module } + /* UNBUILD */ ;USE(function(module){ + var noop = function(){}, u; $.fn.or = function(s){ return this.length ? this : $(s||'body') }; var m = window.meta = {edit:[]}; @@ -141,11 +143,12 @@ edit.combow = edit.combow.join(','); m.list(meta.edit); } + + })(USE, './metaCore'); ;USE(function(module){ try{ /* UI */ - if(meta.css){ return } var $m = $('
').attr('id', 'meta'); $m.append($('').html('☰').addClass('meta-start')); $m.append($('
').addClass('meta-menu meta-none').append('
    ')); @@ -231,9 +234,11 @@ }); var tag = document.createElement('style'); tag.innerHTML = tmp; - document.body.appendChild(tag); + $m.append(tag) } }catch(e){} + + })(USE, './metaUI'); ;USE(function(module){ // include basic text editing by default. @@ -377,6 +382,8 @@ on: function(eve){ meta.text.editor('fontSize', 7) }, up: function(){} }); + + })(USE, './metaText'); ;USE(function(module){ var m = meta, k = m.key; @@ -394,10 +401,10 @@ }); $(document).on('touchstart', '#meta .meta-start', function(eve){ m.tap.stun = true }); $(document).on('click', '#meta .meta-menu li', function(eve){ - eve.fake = eve.which = $(this).data().combo.slice(-1)[0].charCodeAt(0); + var combo = $(this).data().combo; + eve.fake = eve.which = combo && combo.slice(-1)[0].charCodeAt(0); eve.tap = true; - k.down(eve); - //k.up(eve); + k.down(eve); k.up(eve); return; if(m.tap.stun){ return m.tap.stun = false } if(!(eve.fake = eve.which = (($(this).text().match(/[A-Z]/)||{})[0]||'').toUpperCase().charCodeAt(0))){ return } @@ -407,5 +414,7 @@ }); $(document).on('keydown', k.down).on('keyup', k.up); $(document).on('select contextmenu keyup mouseup', '[contenteditable=true]', m.text.on); + + })(USE, './metaEvents'); -}()); +}()); \ No newline at end of file