Merge branch 'v3'

Conflicts:
	LICENSE
	builds/appchan-x.user.js
	builds/crx/script.js
	src/Menu/Menu.coffee
This commit is contained in:
Zixaphir 2013-12-27 15:43:08 -07:00
commit 7cde7eb069
3 changed files with 36 additions and 24 deletions

View File

@ -10617,21 +10617,25 @@
},
node: function() {
if (this.isClone) {
return $.on($('.menu-button', this.nodes.info), 'click', Menu.toggle);
$.on($('.menu-button', this.nodes.info), 'click', Menu.toggle);
return;
}
return $.add(this.nodes.info, Menu.makeButton());
},
makeButton: (function() {
var frag;
frag = $.nodes([
$.tn(' '), $.el('a', {
className: 'menu-button brackets-wrap',
innerHTML: '<i></i>',
href: 'javascript:;'
})
]);
frag = null;
return function() {
var clone;
if (frag == null) {
frag = $.nodes([
$.tn(' '), $.el('a', {
className: 'menu-button brackets-wrap',
innerHTML: '<i></i>',
href: 'javascript:;'
})
]);
}
clone = frag.cloneNode(true);
$.on(clone.lastElementChild, 'click', Menu.toggle);
return clone;

View File

@ -10616,21 +10616,25 @@
},
node: function() {
if (this.isClone) {
return $.on($('.menu-button', this.nodes.info), 'click', Menu.toggle);
$.on($('.menu-button', this.nodes.info), 'click', Menu.toggle);
return;
}
return $.add(this.nodes.info, Menu.makeButton());
},
makeButton: (function() {
var frag;
frag = $.nodes([
$.tn(' '), $.el('a', {
className: 'menu-button brackets-wrap',
innerHTML: '<i></i>',
href: 'javascript:;'
})
]);
frag = null;
return function() {
var clone;
if (frag == null) {
frag = $.nodes([
$.tn(' '), $.el('a', {
className: 'menu-button brackets-wrap',
innerHTML: '<i></i>',
href: 'javascript:;'
})
]);
}
clone = frag.cloneNode(true);
$.on(clone.lastElementChild, 'click', Menu.toggle);
return clone;

View File

@ -8,18 +8,22 @@ Menu =
cb: @node
node: ->
return $.on $('.menu-button', @nodes.info), 'click', Menu.toggle if @isClone
if @isClone
$.on $('.menu-button', @nodes.info), 'click', Menu.toggle
return
$.add @nodes.info, Menu.makeButton()
makeButton: do ->
frag = $.nodes [
$.tn(' ')
$.el 'a',
className: 'menu-button brackets-wrap'
innerHTML: '<i></i>'
href: 'javascript:;'
]
frag = null
->
unless frag?
frag = $.nodes [
$.tn(' ')
$.el 'a',
className: 'menu-button brackets-wrap'
innerHTML: '<i></i>'
href: 'javascript:;'
]
clone = frag.cloneNode true
$.on clone.lastElementChild, 'click', Menu.toggle
clone