// UserScript
// @name 8chan-overrides
// @namespace Violentmonkey Scripts
// @match https://8chan.moe//res/
// @match https://8chan.se//res/
// @match https://8chan.cc//res/
// @grant none
// @version 1.0
// @author -
// @description Prevents auto scrolling after replying
// /UserScript
thread.replyCallback = function(status, data) {
if (status === 'ok') {
} else {
alert(status + ': ' + JSON.stringify(data));
}
};
thread.replyCallback.stop = function() {
thread.replyButton.value = thread.originalButtonText;
qr.setQRReplyText(thread.originalButtonText);
thread.replyButton.disabled = false;
qr.setQRReplyEnabled(true);
};
thread.replyCallback.progress = function(info) {
if (info.lengthComputable) {
var newText = 'Uploading ' + Math.floor((info.loaded / info.total) * 100)
+ '%';
thread.replyButton.value = newText;
}
};