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

View File

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

View File

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