forked from GithubBackups/tinyib
parent
a3a8b8db28
commit
7f1310b7e6
12
js/tinyib.js
12
js/tinyib.js
@ -115,6 +115,8 @@ function autoRefresh() {
|
|||||||
Object.keys(data).forEach(function (key) {
|
Object.keys(data).forEach(function (key) {
|
||||||
posts.append(data[key]);
|
posts.append(data[key]);
|
||||||
|
|
||||||
|
setPostAttributes('#reply' + key);
|
||||||
|
|
||||||
autoRefreshPostID = key;
|
autoRefreshPostID = key;
|
||||||
newRepliesCount++;
|
newRepliesCount++;
|
||||||
});
|
});
|
||||||
@ -200,10 +202,7 @@ $(window).blur(function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
setPostAttributes(document, false);
|
setPostAttributes(document);
|
||||||
$('div:not(div div)').each(function () {
|
|
||||||
setPostAttributes(this, true);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function insertAfter(newElement, targetElement) {
|
function insertAfter(newElement, targetElement) {
|
||||||
@ -218,7 +217,7 @@ $(document).mousemove( function(e) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var downloaded_posts = [];
|
var downloaded_posts = [];
|
||||||
function setPostAttributes(element, setLastReply) {
|
function setPostAttributes(element) {
|
||||||
var base_url = './imgboard.php?';
|
var base_url = './imgboard.php?';
|
||||||
if (window.location.href.includes('/res/')) {
|
if (window.location.href.includes('/res/')) {
|
||||||
base_url = '../imgboard.php?res&';
|
base_url = '../imgboard.php?res&';
|
||||||
@ -238,9 +237,6 @@ function setPostAttributes(element, setLastReply) {
|
|||||||
|
|
||||||
if ($(this).html() == 'No.') {
|
if ($(this).html() == 'No.') {
|
||||||
$(element).attr('postID', m[1]).addClass('post');
|
$(element).attr('postID', m[1]).addClass('post');
|
||||||
if (setLastReply) {
|
|
||||||
lastreply = element;
|
|
||||||
}
|
|
||||||
} else if ($(this).attr('refID') == undefined) {
|
} else if ($(this).attr('refID') == undefined) {
|
||||||
var m2 = $(this).html().match(/^\>\;\>\;[0-9]+/i);
|
var m2 = $(this).html().match(/^\>\;\>\;[0-9]+/i);
|
||||||
if (m2 == null) {
|
if (m2 == null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user