Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion client/js/shout.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ $(function() {
});
});

chat.on("click", ".messages", function() {
chat.on("click", ".messages, .show-more", function() {
setTimeout(function() {
var text = "";
if (window.getSelection) {
Expand Down Expand Up @@ -815,6 +815,24 @@ $(function() {
}
});

Mousetrap.bind([
"pageup",
"pagedown"
], function(e, keys) {
var el = $(".active > .chat");
switch (keys) {
case "pageup":
var offsetUp = el.scrollTop() - 24 * 3;
el.finish().animate({scrollTop: offsetUp}, "fast" , "linear");
break;

case "pagedown":
var offsetDown = el.scrollTop() + 24 * 3;
el.finish().animate({scrollTop: offsetDown}, "fast" , "linear");
break;
}
});

setInterval(function() {
chat.find(".chan:not(.active)").each(function() {
var chan = $(this);
Expand Down