-
-
Notifications
You must be signed in to change notification settings - Fork 881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Context module #1052
Add Context module #1052
Conversation
} | ||
}, | ||
setDefaultContext: function() { | ||
$(".bylink").each(function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@honestbleeps think it's worth using RESUtils.forEachChunked?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, anything running on all comments should use chunking or UI will freeze on large pages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, this function is only called on inbox. so max .. 100? but it wouldn't hurt to chunk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah my bad.. max 100 is probably fine to leave as-is
On Tue, May 13, 2014 at 4:39 PM, Andy Tuba notifications@github.com wrote:
In lib/modules/context.js:
}
value >= 0) {if ((RESUtils.pageType() === 'inbox') && !isNaN(this.options.defaultContext.value) && this.options.defaultContext.
this.setDefaultContext();
}
}
- },
- addViewFullContext: function() {
if(location.search !== "?context=10000") {
var pInfobar = document.querySelector(".infobar:not(#searchexpando) p");
if(pInfobar) {
pInfobar.innerHTML += ' <a href="?context=10000">view the full context</a> →';
}
}
- },
- setDefaultContext: function() {
$(".bylink").each(function() {
well, this function is only called on inbox. so max .. 100? but it
wouldn't hurt to chunk—
Reply to this email directly or view it on GitHubhttps://github.com//pull/1052/files#r12610307
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(note for posterity) plus it's just changing the href attribute, so not serious DOM manipulation / repaints
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(note for posterity) only 1ms for 100 context link
Fix #437
Fix #291