This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var orig_keydown = $("#chatinput").onkeydown; | |
$("#chatinput").onkeydown = function(e){ | |
if(e.keyCode==9){ | |
e.preventDefault(); | |
var pos = e.target.selectionStart || 0; | |
var text = e.target.value; | |
var index = text.lastIndexOf('@', pos); | |
if (index >= 0) { | |
var stub = text.substring(index + 1, pos); | |
// Search for nick beginning with stub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var interval = setInterval(function() { | |
if (document.body.scrollTop < (scrollBy(0,1),document.body.scrollTop)) { //test if body can be scrolled, tweak the number to change scroll speed | |
//Do whatever | |
} else { | |
clearInterval(interval); //stop scrolling | |
//jQuery("#nextNav").parent()[0].click(); | |
} | |
}, 10);// Tweak that number to change scroll speed |