mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-29 08:48:18 -05:00
Only create multi categorize bubble for subscribe buttons upon hover.
This prevents creating a ton of bubble views on pages with lots of subscribe buttons like /reddits/mine.
This commit is contained in:
@@ -366,12 +366,21 @@ r.multi.MultiAddNoticeBubble = r.ui.Bubble.extend({
|
||||
})
|
||||
|
||||
r.multi.SubscribeButton = Backbone.View.extend({
|
||||
initialize: function() {
|
||||
events: {
|
||||
'mouseenter': 'createBubble'
|
||||
},
|
||||
|
||||
createBubble: function() {
|
||||
if (this.bubble) {
|
||||
return
|
||||
}
|
||||
|
||||
this.bubble = new r.multi.MultiSubscribeBubble({
|
||||
parent: this.$el,
|
||||
group: this.options.bubbleGroup,
|
||||
srName: String(this.$el.data('sr_name'))
|
||||
})
|
||||
this.bubble.queueShow()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user