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,12 +10617,17 @@
}, },
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 = null;
return function() {
var clone;
if (frag == null) {
frag = $.nodes([ frag = $.nodes([
$.tn(' '), $.el('a', { $.tn(' '), $.el('a', {
className: 'menu-button brackets-wrap', className: 'menu-button brackets-wrap',
@ -10630,8 +10635,7 @@
href: 'javascript:;' href: 'javascript:;'
}) })
]); ]);
return function() { }
var clone;
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,12 +10616,17 @@
}, },
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 = null;
return function() {
var clone;
if (frag == null) {
frag = $.nodes([ frag = $.nodes([
$.tn(' '), $.el('a', { $.tn(' '), $.el('a', {
className: 'menu-button brackets-wrap', className: 'menu-button brackets-wrap',
@ -10629,8 +10634,7 @@
href: 'javascript:;' href: 'javascript:;'
}) })
]); ]);
return function() { }
var clone;
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,10 +8,15 @@ 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 = null
->
unless frag?
frag = $.nodes [ frag = $.nodes [
$.tn(' ') $.tn(' ')
$.el 'a', $.el 'a',
@ -19,7 +24,6 @@ Menu =
innerHTML: '<i></i>' innerHTML: '<i></i>'
href: 'javascript:;' href: 'javascript:;'
] ]
->
clone = frag.cloneNode true clone = frag.cloneNode true
$.on clone.lastElementChild, 'click', Menu.toggle $.on clone.lastElementChild, 'click', Menu.toggle
clone clone