Skip to content

Instantly share code, notes, and snippets.

@trashbyte
Last active July 3, 2017 00:04
Show Gist options
  • Save trashbyte/04089dc860b79f0553a005711a142180 to your computer and use it in GitHub Desktop.
Save trashbyte/04089dc860b79f0553a005711a142180 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Fix Picarto Auto-Scroll
// @version 0.1
// @author trashbyte
// @match https://picarto.tv/*
// @grant none
// ==/UserScript==
$(function() {
$(document.body).append($(`<script>
scroll = function() {
var con;
if (popout) {
con = $(".scrollwrapperchat").children("div").next("div");
} else {
if ($(".scrollwrapperwhisperlist").is(":visible")) {
con = $(".scrollwrapperwhisperlist").children("div").next("div");
} else {
con = $(".scrollwrapperchat").children("div").next("div");
}
}
if (con.scrollTop() + con.height() + 300 > con[0].scrollHeight) {
con.scrollTop(con[0].scrollHeight - con.height());
}
};
</script>`));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment