summaryrefslogtreecommitdiff
path: root/ukko.js
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2013-05-26 18:03:20 -0400
committerczaks <marcin@6irc.net>2013-05-26 18:03:20 -0400
commit9c29cec6598331589a9020e5be627260e659e977 (patch)
tree7730fd53c3f183fa65a5ab1f9c52945ddeb97e77 /ukko.js
parent9b8326473555d2419c1c62f957893eb97e6082eb (diff)
Moved ukko to a proper location
Diffstat (limited to 'ukko.js')
-rw-r--r--ukko.js37
1 files changed, 0 insertions, 37 deletions
diff --git a/ukko.js b/ukko.js
deleted file mode 100644
index baf0f78d..00000000
--- a/ukko.js
+++ /dev/null
@@ -1,37 +0,0 @@
-var cache = new Array(),
- thread = false,
- loading = false;
-$(document).ready(function() {
- $(window).on('scroll', function() {
- if($(window).scrollTop() + $(window).height() + 100 > $(document).height() && !loading && overflow.length > 0) {
- var page = '../' + overflow[0].board + '/' + overflow[0].page;
- if($.inArray(page, cache) != -1) {
- thread = $('div#thread_' + overflow[0].id);
- if(thread.length > 0) {
- thread.prepend('<h2><a href="/' + overflow[0].board + '/">/' + overflow[0].board + '/</a></h2>');
- $('div[id*="thread_"]').last().after(thread.attr('data-board', overflow[0].board).css('display', 'block'));
- overflow.shift();
- }
- } else {
- loading = true;
- $.get(page, function(data) {
- cache.push(page);
-
- $(data).find('div[id*="thread_"]').each(function() {
- $('body').prepend($(this).css('display', 'none').attr('data-board', overflow[0].board));
- });
-
- thread = $('div#thread_' + overflow[0].id + '[data-board="' + overflow[0].board + '"]');
- if(thread.length > 0) {
- thread.prepend('<h2><a href="/' + overflow[0].board + '/">/' + overflow[0].board + '/</a></h2>');
- $('div[id*="thread_"]').last().after(thread.attr('data-board', overflow[0].board).css('display', 'block'));
- overflow.shift();
- }
-
- loading = false;
- });
- }
- }
- });
-
-}); \ No newline at end of file