1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-02-21 13:09:41 +01:00
This commit is contained in:
8chan 2015-01-23 00:17:47 +00:00
commit 987dc2c8af
4 changed files with 12 additions and 8 deletions

View File

@ -8,7 +8,7 @@
* $config['additional_javascript'][] = 'js/comment-toolbar.js'; * $config['additional_javascript'][] = 'js/comment-toolbar.js';
*/ */
if (active_page == 'catalog') { if (active_page == 'catalog') {
$(document).ready(function () { onready(function () {
'use strict'; 'use strict';
// 'true' = enable shortcuts // 'true' = enable shortcuts

View File

@ -13,7 +13,7 @@
*/ */
$(document).ready(function(){ $(document).ready(function(){
if (active_page != "index" && active_page != "ukko") if (active_page != "index" && active_page != "ukko" && active_page != "thread")
return; // not index return; // not index
if (!localStorage.hiddenthreads) if (!localStorage.hiddenthreads)
@ -83,8 +83,12 @@ $(document).ready(function(){
var id = post.children('p.intro').children('a.post_no:eq(1)').text(); var id = post.children('p.intro').children('a.post_no:eq(1)').text();
var board = post.parent().data('board'); var board = post.parent().data('board');
if (!hidden_data[board]) {
hidden_data[board] = {}; // id : timestamp
}
$('<a class="post-hide-link" href="javascript:void(0)" title="Hide Post" style="float: right">[]</a>') $('<a class="post-hide-link" href="javascript:void(0)" title="Hide Post" style="float: right">[]</a>')
.insertAfter($(this).children('p.intro').children('a.post_no:last')) .insertAfter(post.children('p.intro').children('a.post_no:last'))
.click(function() { .click(function() {
hidden_data[board][id] = Math.round(Date.now() / 1000); hidden_data[board][id] = Math.round(Date.now() / 1000);
store_data(); store_data();
@ -92,7 +96,7 @@ $(document).ready(function(){
post.children('div').hide(); post.children('div').hide();
hide_link.hide(); hide_link.hide();
$('<a class="post-show-link" href="javascript:void(0)" title="Show Post" style="float: right">[+]</a>') $('<a class="post-show-link" href="javascript:void(0)" title="Show Post" style="float: right">[+]</a>')
.insertAfter($(this).children('p.intro').children('a.post_no:last')) .insertAfter(post.children('p.intro').children('a.post_no:last'))
.click(function() { .click(function() {
delete hidden_data[board][id]; delete hidden_data[board][id];
store_data(); store_data();
@ -105,8 +109,8 @@ $(document).ready(function(){
if (hidden_data[board][id]) if (hidden_data[board][id])
post.find('.post-hide-link').click(); post.find('.post-hide-link').click();
} }
if (active_page != "thread")
$('div.post.op').each(do_hide_threads); $('div.post.op').each(do_hide_threads);
$('div.post.reply').each(do_hide_posts); $('div.post.reply').each(do_hide_posts);
$(document).on('new_post', function(e, post) { $(document).on('new_post', function(e, post) {

View File

@ -12,7 +12,7 @@
* *
*/ */
onready(function(){ $(document).ready(function(){
'use strict'; 'use strict';
var DEFAULT_MAX = 5; // default maximum image loads var DEFAULT_MAX = 5; // default maximum image loads

View File

@ -13,7 +13,7 @@
* *
*/ */
onready(function(){ $(document).ready(function(){
'use strict'; 'use strict';
var iso8601 = function(s) { var iso8601 = function(s) {