diff --git a/demo.html b/demo.html index fd3c0cb..da2d128 100644 --- a/demo.html +++ b/demo.html @@ -84,7 +84,7 @@ $(document).ready(function() { }); }); $('.cmd-sync').on('click', function(){ - $v('h2').html('pluie.org bt demo (sync on '+(new Date).getTime()+') :'); + $('h2').html('pluie.org bt demo (sync on '+(new Date).getTime()+') :'); $bt.sync('h2'); }); $('.cmd-reload').on('click', function(){ diff --git a/src/bt.js b/src/bt.js index 6cdf6d7..f255f7e 100644 --- a/src/bt.js +++ b/src/bt.js @@ -105,21 +105,21 @@ var $bt = { VERSION : 0.5, TRACE : true && !$.isNone(console), /*! @constant LS_TABS localStorage key for browsertabs list */ - LS_TABS : 'bt.tabs', + LS_TABS : 'bt.list', /*! @constant LS_CURTAB localStorage key for current browsertab */ - LS_CURTAB : 'bt.ctab', + LS_CURTAB : 'bt.current', /*! @constant LS_CMD localStorage key command to interact with other tabs */ - LS_CMD : 'bt.cmd', + LS_CMD : 'bt.event', /*! @constant CMD_SYNC internal command to perform a browser tab synchro */ CMD_SYNC : 'bt.sync', /*! @constant CMD_VAR_SET internal command to perform a browser tab var set */ - CMD_VAR_SET : 'var.set', + CMD_VAR_SET : 'bt.set', /*! @constant CMD_VAR_GET internal command to perform a browser tab var get */ - CMD_VAR_GET : 'var.get', + CMD_VAR_GET : 'bt.get', /*! @constant CMD_APPEND internal command to perform a dom append */ - CMD_APPEND : 'dom.append', + CMD_APPEND : 'bt.dom.append', /*! @constant CMD_HTML internal command to perform a dom html */ - CMD_HTML : 'dom.html', + CMD_HTML : 'bt.dom.rewrite', /*! @constant CMD_RELOAD internal command to perform a browser tab reload */ CMD_RELOAD : 'bt.reload', /*! @var vars */ diff --git a/src/svan-min.js b/src/svan-min.js index 23499c0..222030b 100644 --- a/src/svan-min.js +++ b/src/svan-min.js @@ -1 +1 @@ -/* by a-sansara - v 0.3 - https://github.com/pluie-org/svan */!function(){{var t=function(t,n){return typeof t==n},n=function(t,i){return new n.init(t,i)},i=n.isNone=function(n){return t(n,"undefined")},o=n.isStr=function(n){return t(n,"string")},e=n.isFunc=function(n){return t(n,"function")},s=n.isObj=function(n){return t(n,"object")};n.isNode=function(t){return s(t)&&!i(t.nodeType)},n.isWin=function(t){return!i(t.window)&&t.window==t}}n.prototype={regsan:function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},first:function(){return this.found?this.list[0]:null},last:function(){return this.found?this.list[this.list.length-1]:b},index:function(t){return this.found&&t>0&&t0,this};c.prototype=n.prototype,window.Svan=n,i(window.$)&&(window.$=n)}(); +/* by a-sansara - v 0.4 - https://github.com/pluie-org/svan */!function(){var t=function(t,n){return typeof t==n},n=function(t,i){return new n.init(t,i)},i=n.isNone=function(n){return t(n,"undefined")},e=n.isStr=function(n){return t(n,"string")},s=n.isFunc=function(n){return t(n,"function")},o=n.isObj=function(n){return t(n,"object")},a=n.isNode=function(t){return o(t)&&!i(t.nodeType)},c=n.isWin=function(t){return!i(t.window)&&t.window==t};n.prototype={regsan:function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},first:function(){return this.found?this.list[0]:null},last:function(){return this.found?this.list[this.list.length-1]:b},index:function(t){return this.found&&t>0&&t0,this};u.prototype=n.prototype,window.Svan=n,i(window.$)&&(window.$=n)}();