Merge branch 'master' of github.com:vichan-devel/Tinyboard
This commit is contained in:
commit
afbe945d83
@ -8,6 +8,7 @@
|
|||||||
* Copyright (c) 2012 Michael Save <savetheinternet@tinyboard.org>
|
* Copyright (c) 2012 Michael Save <savetheinternet@tinyboard.org>
|
||||||
* Copyright (c) 2013-2014 Marcin Łabanowski <marcin@6irc.net>
|
* Copyright (c) 2013-2014 Marcin Łabanowski <marcin@6irc.net>
|
||||||
* Copyright (c) 2013 undido <firekid109@hotmail.com>
|
* Copyright (c) 2013 undido <firekid109@hotmail.com>
|
||||||
|
* Copyright (c) 2014 Fredrick Brennan <admin@8chan.co>
|
||||||
*
|
*
|
||||||
* Usage:
|
* Usage:
|
||||||
* $config['additional_javascript'][] = 'js/jquery.min.js';
|
* $config['additional_javascript'][] = 'js/jquery.min.js';
|
||||||
@ -27,6 +28,8 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
var poll_interval;
|
var poll_interval;
|
||||||
|
|
||||||
|
// Add an update link
|
||||||
|
$('.boardlist.bottom').prev().after("<a href='#' id='update_thread' style='padding-left:10px'>["+_("Update thread")+"] (<span id='update_secs'></span>)</a>");
|
||||||
|
|
||||||
// Grab the settings
|
// Grab the settings
|
||||||
var settings = new script_settings('auto-reload');
|
var settings = new script_settings('auto-reload');
|
||||||
@ -37,6 +40,7 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
// number of ms to wait before reloading
|
// number of ms to wait before reloading
|
||||||
var poll_interval_delay = poll_interval_mindelay_bottom;
|
var poll_interval_delay = poll_interval_mindelay_bottom;
|
||||||
|
var poll_current_time = poll_interval_delay;
|
||||||
|
|
||||||
var end_of_page = false;
|
var end_of_page = false;
|
||||||
|
|
||||||
@ -68,6 +72,14 @@ $(document).ready(function(){
|
|||||||
window_active = false;
|
window_active = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var timer_update = function() {
|
||||||
|
$('#update_secs').text(poll_current_time/1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
var decrement_timer = function() {
|
||||||
|
poll_current_time = poll_current_time - 1000;
|
||||||
|
}
|
||||||
|
|
||||||
var recheck_activated = function() {
|
var recheck_activated = function() {
|
||||||
if (new_posts && window_active &&
|
if (new_posts && window_active &&
|
||||||
$(window).scrollTop() + $(window).height() >=
|
$(window).scrollTop() + $(window).height() >=
|
||||||
@ -115,6 +127,9 @@ $(document).ready(function(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
poll_interval = setTimeout(poll, poll_interval_delay);
|
poll_interval = setTimeout(poll, poll_interval_delay);
|
||||||
|
poll_current_time = poll_interval_delay;
|
||||||
|
|
||||||
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
$(window).scroll(function() {
|
$(window).scroll(function() {
|
||||||
@ -128,9 +143,15 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
clearTimeout(poll_interval);
|
clearTimeout(poll_interval);
|
||||||
poll_interval = setTimeout(poll, poll_interval_shortdelay);
|
poll_interval = setTimeout(poll, poll_interval_shortdelay);
|
||||||
|
poll_current_time = poll_interval_shortdelay;
|
||||||
end_of_page = true;
|
end_of_page = true;
|
||||||
}).trigger('scroll');
|
}).trigger('scroll');
|
||||||
|
|
||||||
|
$('#update_thread').on('click', poll);
|
||||||
|
setInterval(timer_update, 1000);
|
||||||
|
setInterval(decrement_timer, 1000);
|
||||||
|
|
||||||
poll_interval = setTimeout(poll, poll_interval_delay);
|
poll_interval = setTimeout(poll, poll_interval_delay);
|
||||||
|
timer_update();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -58,8 +58,8 @@ onready(function(){
|
|||||||
// link links to itself or to op; ignore
|
// link links to itself or to op; ignore
|
||||||
}
|
}
|
||||||
else if($post.is(':visible') &&
|
else if($post.is(':visible') &&
|
||||||
$post.offset().top + $post.height() >= $(window).scrollTop() &&
|
$post.offset().top >= $(window).scrollTop() &&
|
||||||
$post.offset().top <= $(window).scrollTop() + $(window).height()) {
|
$post.offset().top + $post.height() <= $(window).scrollTop() + $(window).height()) {
|
||||||
// post is in view
|
// post is in view
|
||||||
$post.addClass('highlighted');
|
$post.addClass('highlighted');
|
||||||
} else {
|
} else {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
$boards = listBoards(TRUE);
|
$boards = listBoards(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$body = Element('search_form.html', Array('boards' => $boards, 'board' => isset($_GET['board']) ? $_GET['board'] : false, 'search' => isset($_GET['search']) ? str_replace('"', '"', utf8tohtml($_GET['search'])) : false));
|
$body = Element('search_form.html', Array('boards' => $boards, 'b' => isset($_GET['board']) ? $_GET['board'] : false, 'search' => isset($_GET['search']) ? str_replace('"', '"', utf8tohtml($_GET['search'])) : false));
|
||||||
|
|
||||||
if(isset($_GET['search']) && !empty($_GET['search']) && isset($_GET['board']) && in_array($_GET['board'], $boards)) {
|
if(isset($_GET['search']) && !empty($_GET['search']) && isset($_GET['board']) && in_array($_GET['board'], $boards)) {
|
||||||
$phrase = $_GET['search'];
|
$phrase = $_GET['search'];
|
||||||
|
@ -689,6 +689,7 @@ form.ban-appeal textarea {
|
|||||||
.options_tab_icon {
|
.options_tab_icon {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
color: black;
|
color: black;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.options_tab_icon.active {
|
.options_tab_icon.active {
|
||||||
color: red;
|
color: red;
|
||||||
|
@ -154,6 +154,7 @@ function highlightReply(id) {
|
|||||||
var post = document.getElementById('reply_'+id);
|
var post = document.getElementById('reply_'+id);
|
||||||
if (post)
|
if (post)
|
||||||
post.className += ' highlighted';
|
post.className += ' highlighted';
|
||||||
|
window.location.hash = id;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user