From 4e1f7f577b4d56d03028bc7c94710096572ec4a4 Mon Sep 17 00:00:00 2001 From: Markerov Date: Fri, 2 Jan 2015 17:13:29 +0800 Subject: [PATCH 1/4] change to use onready() --- js/catalog-search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/catalog-search.js b/js/catalog-search.js index 97121e3b..17a8edac 100644 --- a/js/catalog-search.js +++ b/js/catalog-search.js @@ -8,7 +8,7 @@ * $config['additional_javascript'][] = 'js/comment-toolbar.js'; */ if (active_page == 'catalog') { - $(document).ready(function () { + onready(function () { 'use strict'; // 'true' = enable shortcuts From 22377af0b151f902c3f72e23b665002d6af34c99 Mon Sep 17 00:00:00 2001 From: marktaiwan Date: Fri, 23 Jan 2015 00:03:37 +0800 Subject: [PATCH 2/4] fix Relative Time and Image Throttler --- js/inline-expanding.js | 2 +- js/local-time.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/inline-expanding.js b/js/inline-expanding.js index 74fe6c5a..92069689 100644 --- a/js/inline-expanding.js +++ b/js/inline-expanding.js @@ -12,7 +12,7 @@ * */ -onready(function(){ +$(document).ready(function(){ 'use strict'; var DEFAULT_MAX = 5; // default maximum image loads diff --git a/js/local-time.js b/js/local-time.js index ac67673c..a821579f 100644 --- a/js/local-time.js +++ b/js/local-time.js @@ -13,7 +13,7 @@ * */ -onready(function(){ +$(document).ready(function(){ 'use strict'; var iso8601 = function(s) { From d49118aae07a5b6853e1286e4f9ec55ad04a51ad Mon Sep 17 00:00:00 2001 From: wholelotofhs Date: Thu, 22 Jan 2015 17:11:31 -0500 Subject: [PATCH 3/4] hotfix for expand button not showing I have no idea how this problem didn't show up (like it does on the live site) when I tested the code before. --- js/hide-threads.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/hide-threads.js b/js/hide-threads.js index 783b7bec..480e7db9 100644 --- a/js/hide-threads.js +++ b/js/hide-threads.js @@ -84,7 +84,7 @@ $(document).ready(function(){ var board = post.parent().data('board'); $('[–]') - .insertAfter($(this).children('p.intro').children('a.post_no:last')) + .insertAfter(post.children('p.intro').children('a.post_no:last')) .click(function() { hidden_data[board][id] = Math.round(Date.now() / 1000); store_data(); @@ -92,7 +92,7 @@ $(document).ready(function(){ post.children('div').hide(); hide_link.hide(); $('[+]') - .insertAfter($(this).children('p.intro').children('a.post_no:last')) + .insertAfter(post.children('p.intro').children('a.post_no:last')) .click(function() { delete hidden_data[board][id]; store_data(); From 53897c29bacf49a557c698a24e5057e8fa4f5871 Mon Sep 17 00:00:00 2001 From: wholelotofhs Date: Thu, 22 Jan 2015 17:55:28 -0500 Subject: [PATCH 4/4] fix to work on thread pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Just realized that you couldn’t hide posts on a thread page. --- js/hide-threads.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/js/hide-threads.js b/js/hide-threads.js index 480e7db9..64f0a384 100644 --- a/js/hide-threads.js +++ b/js/hide-threads.js @@ -13,7 +13,7 @@ */ $(document).ready(function(){ - if (active_page != "index" && active_page != "ukko") + if (active_page != "index" && active_page != "ukko" && active_page != "thread") return; // not index if (!localStorage.hiddenthreads) @@ -83,6 +83,10 @@ $(document).ready(function(){ var id = post.children('p.intro').children('a.post_no:eq(1)').text(); var board = post.parent().data('board'); + if (!hidden_data[board]) { + hidden_data[board] = {}; // id : timestamp + } + $('[–]') .insertAfter(post.children('p.intro').children('a.post_no:last')) .click(function() { @@ -105,8 +109,8 @@ $(document).ready(function(){ if (hidden_data[board][id]) post.find('.post-hide-link').click(); } - - $('div.post.op').each(do_hide_threads); + if (active_page != "thread") + $('div.post.op').each(do_hide_threads); $('div.post.reply').each(do_hide_posts); $(document).on('new_post', function(e, post) {