From cb92ee048303a6d9065c2e7b9dd4f9532152db34 Mon Sep 17 00:00:00 2001 From: James Campos Date: Tue, 23 Sep 2014 19:52:06 -0700 Subject: [PATCH 01/34] inline --- js/inline.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 js/inline.js diff --git a/js/inline.js b/js/inline.js new file mode 100644 index 00000000..1130c68b --- /dev/null +++ b/js/inline.js @@ -0,0 +1,34 @@ +;(function() { + $('.body a').click(inline) + + $('head').append( + '') +})() + +function inline(e) { + e.preventDefault() + var postNum = parseInt(this.textContent.slice(2)) + + var cloneID = 'inline_' + postNum + var $clone = $('#' + cloneID) + if ($clone.length) + return $clone.remove() + + var OP = location.pathname.match(/(\d+).html/)[1] + var selector = postNum === OP + ? '.op .body' + : '#reply_' + postNum + ' .body' + + $clone = $(selector).clone(true) + $clone.attr({ + className: 'inline', + id: cloneID + }) + $clone.insertAfter(this) +} From 3de119e41750c065cebffefc216e56d339bbbc1c Mon Sep 17 00:00:00 2001 From: James Campos Date: Tue, 23 Sep 2014 21:25:34 -0700 Subject: [PATCH 02/34] maybe support cross thread inlining --- js/inline.js | 62 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 23 deletions(-) diff --git a/js/inline.js b/js/inline.js index 1130c68b..6b373dce 100644 --- a/js/inline.js +++ b/js/inline.js @@ -1,5 +1,40 @@ ;(function() { - $('.body a').click(inline) + var inline = function(e) { + e.preventDefault() + + var postNum = this.textContent.slice(2) + + var $clone = $('#inline_' + postNum) + if ($clone.length) + return $clone.remove() + + var OP = location.pathname.match(/(\d+).html/)[1] + var selector = postNum === OP + ? '.op .body' + : '#reply_' + postNum + ' .body' + + var link = { + postNum: postNum, + node: this + } + var $target = $(selector) + if ($target.length) + add(link, $target) + else + $.get(this.pathname, function(data) { + var $target = $(data).find(selector) + add(link, $target) + }) + } + + var add = function(link, $target) { + var $clone = $target.clone(true) + $clone.attr({ + "class": 'inline', + id: 'inline_' + link.postNum + }) + $clone.insertAfter(link.node) + } $('head').append( '') + + $('.body a').click(inline) + })() - -function inline(e) { - e.preventDefault() - var postNum = parseInt(this.textContent.slice(2)) - - var cloneID = 'inline_' + postNum - var $clone = $('#' + cloneID) - if ($clone.length) - return $clone.remove() - - var OP = location.pathname.match(/(\d+).html/)[1] - var selector = postNum === OP - ? '.op .body' - : '#reply_' + postNum + ' .body' - - $clone = $(selector).clone(true) - $clone.attr({ - className: 'inline', - id: cloneID - }) - $clone.insertAfter(this) -} From 274ac0965a6085c009fccbde1e427746d8ff4501 Mon Sep 17 00:00:00 2001 From: James Campos Date: Tue, 23 Sep 2014 21:40:32 -0700 Subject: [PATCH 03/34] get op from input value --- js/inline.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/inline.js b/js/inline.js index 6b373dce..863aefbb 100644 --- a/js/inline.js +++ b/js/inline.js @@ -8,7 +8,7 @@ if ($clone.length) return $clone.remove() - var OP = location.pathname.match(/(\d+).html/)[1] + var OP = $('input[name="thread"]').val() var selector = postNum === OP ? '.op .body' : '#reply_' + postNum + ' .body' From 67d3449998cda1a981a841fce989f59936aaa8d1 Mon Sep 17 00:00:00 2001 From: James Campos Date: Wed, 24 Sep 2014 12:17:30 -0700 Subject: [PATCH 04/34] fix cross-thread inlining --- js/inline.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/js/inline.js b/js/inline.js index 863aefbb..6334e60e 100644 --- a/js/inline.js +++ b/js/inline.js @@ -8,8 +8,8 @@ if ($clone.length) return $clone.remove() - var OP = $('input[name="thread"]').val() - var selector = postNum === OP + var postOP = this.pathname.match(/(\d+).html/)[1] + var selector = postNum === postOP ? '.op .body' : '#reply_' + postNum + ' .body' @@ -17,9 +17,12 @@ postNum: postNum, node: this } - var $target = $(selector) - if ($target.length) + + var OP = $('input[name="thread"]').val() + if (OP === postOP) { + var $target = $(selector) add(link, $target) + } else $.get(this.pathname, function(data) { var $target = $(data).find(selector) From 51a74bbd73f82418370176a9bb6190fb3c1b9da4 Mon Sep 17 00:00:00 2001 From: James Campos Date: Wed, 24 Sep 2014 12:37:25 -0700 Subject: [PATCH 05/34] fix selector --- js/inline.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/inline.js b/js/inline.js index 6334e60e..e93df2b6 100644 --- a/js/inline.js +++ b/js/inline.js @@ -20,6 +20,8 @@ var OP = $('input[name="thread"]').val() if (OP === postOP) { + // XXX WTF the post hover script adds fetched threads to the DOM + selector = '#thread_' + OP + ' ' + selector var $target = $(selector) add(link, $target) } From 970ff0d61911b4054cc0214de1db2deabe738cae Mon Sep 17 00:00:00 2001 From: James Campos Date: Wed, 24 Sep 2014 12:49:18 -0700 Subject: [PATCH 06/34] this is how you cache --- js/inline.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/js/inline.js b/js/inline.js index e93df2b6..8a2b6614 100644 --- a/js/inline.js +++ b/js/inline.js @@ -1,4 +1,6 @@ ;(function() { + var cache = {} + var inline = function(e) { e.preventDefault() @@ -23,13 +25,21 @@ // XXX WTF the post hover script adds fetched threads to the DOM selector = '#thread_' + OP + ' ' + selector var $target = $(selector) - add(link, $target) + return add(link, $target) } - else - $.get(this.pathname, function(data) { - var $target = $(data).find(selector) - add(link, $target) - }) + + var url = this.pathname + var data = cache[url] + if (data) { + var $target = $(data).find(selector) + return add(link, $target) + } + + $.get(url, function(data) { + cache[url] = data + var $target = $(data).find(selector) + add(link, $target) + }) } var add = function(link, $target) { From 91ab8eeae663ac5bda1206a95894f2b6d24ab5b2 Mon Sep 17 00:00:00 2001 From: James Campos Date: Thu, 25 Sep 2014 09:58:44 -0700 Subject: [PATCH 07/34] disable highlightReply --- js/inline.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/inline.js b/js/inline.js index 8a2b6614..728a887a 100644 --- a/js/inline.js +++ b/js/inline.js @@ -60,6 +60,8 @@ '}' + '') - $('.body a').click(inline) + $('.body a') + .attr('onclick', null)// disable highlightReply. so hacky + .click(inline) })() From ee4716b0481cfb2495eab931b3cac115e7f5d912 Mon Sep 17 00:00:00 2001 From: James Campos Date: Thu, 25 Sep 2014 10:11:33 -0700 Subject: [PATCH 08/34] work for backlinks --- js/inline.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/js/inline.js b/js/inline.js index 728a887a..df91c8a9 100644 --- a/js/inline.js +++ b/js/inline.js @@ -4,9 +4,10 @@ var inline = function(e) { e.preventDefault() + var $root = $(this).closest('.post') var postNum = this.textContent.slice(2) - var $clone = $('#inline_' + postNum) + var $clone = $root.find('#inline_' + postNum) if ($clone.length) return $clone.remove() @@ -15,9 +16,13 @@ ? '.op .body' : '#reply_' + postNum + ' .body' + var node = this.className + ? $root.find('.body').first().children().first() + : this.nextSibling + var link = { - postNum: postNum, - node: this + node: node, + postNum: postNum } var OP = $('input[name="thread"]').val() @@ -48,7 +53,7 @@ "class": 'inline', id: 'inline_' + link.postNum }) - $clone.insertAfter(link.node) + $clone.insertBefore(link.node) } $('head').append( @@ -60,7 +65,7 @@ '}' + '') - $('.body a') + $('.body a, .mentioned a') .attr('onclick', null)// disable highlightReply. so hacky .click(inline) From 26e343d02affb6291226baec587123f6a61e236a Mon Sep 17 00:00:00 2001 From: James Campos Date: Fri, 3 Oct 2014 09:17:19 -0700 Subject: [PATCH 09/34] fix --- js/inline.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/inline.js b/js/inline.js index df91c8a9..ff897ca3 100644 --- a/js/inline.js +++ b/js/inline.js @@ -17,7 +17,8 @@ : '#reply_' + postNum + ' .body' var node = this.className - ? $root.find('.body').first().children().first() + // XXX post hover element is added to the quoting post + ? $root.find('> .body, > .inline').first() : this.nextSibling var link = { @@ -27,7 +28,7 @@ var OP = $('input[name="thread"]').val() if (OP === postOP) { - // XXX WTF the post hover script adds fetched threads to the DOM + // XXX post hover adds fetched threads to the DOM selector = '#thread_' + OP + ' ' + selector var $target = $(selector) return add(link, $target) @@ -66,7 +67,6 @@ '') $('.body a, .mentioned a') - .attr('onclick', null)// disable highlightReply. so hacky + .attr('onclick', null)// XXX disable highlightReply .click(inline) - })() From 8d91efc560015411fa2545b151607aba4f91cca7 Mon Sep 17 00:00:00 2001 From: James Campos Date: Fri, 3 Oct 2014 09:53:11 -0700 Subject: [PATCH 10/34] grab the whole post --- js/inline.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/js/inline.js b/js/inline.js index ff897ca3..55389f36 100644 --- a/js/inline.js +++ b/js/inline.js @@ -14,7 +14,7 @@ var postOP = this.pathname.match(/(\d+).html/)[1] var selector = postNum === postOP ? '.op .body' - : '#reply_' + postNum + ' .body' + : '#reply_' + postNum var node = this.className // XXX post hover element is added to the quoting post @@ -51,7 +51,7 @@ var add = function(link, $target) { var $clone = $target.clone(true) $clone.attr({ - "class": 'inline', + "class": 'inline post', id: 'inline_' + link.postNum }) $clone.insertBefore(link.node) @@ -59,11 +59,8 @@ $('head').append( '') $('.body a, .mentioned a') From bb193e93e2925f5ec71756e34f65534a34d67f77 Mon Sep 17 00:00:00 2001 From: James Campos Date: Fri, 3 Oct 2014 10:00:44 -0700 Subject: [PATCH 11/34] fix for image posts --- js/inline.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/inline.js b/js/inline.js index 55389f36..fd445a7a 100644 --- a/js/inline.js +++ b/js/inline.js @@ -18,7 +18,7 @@ var node = this.className // XXX post hover element is added to the quoting post - ? $root.find('> .body, > .inline').first() + ? $root.find('> .files, > .inline').first() : this.nextSibling var link = { From aea23e99b6b650f152bbddac47c2e18310949565 Mon Sep 17 00:00:00 2001 From: James Campos Date: Fri, 3 Oct 2014 10:03:31 -0700 Subject: [PATCH 12/34] less invasive css fix --- js/inline.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/inline.js b/js/inline.js index fd445a7a..3eac588e 100644 --- a/js/inline.js +++ b/js/inline.js @@ -59,8 +59,7 @@ $('head').append( '') $('.body a, .mentioned a') From b1a59116735f3e82225141da52c99175220d90bd Mon Sep 17 00:00:00 2001 From: James Campos Date: Fri, 3 Oct 2014 13:05:45 -0700 Subject: [PATCH 13/34] fix when quote is last element --- js/inline.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/js/inline.js b/js/inline.js index 3eac588e..26b13f91 100644 --- a/js/inline.js +++ b/js/inline.js @@ -17,9 +17,8 @@ : '#reply_' + postNum var node = this.className - // XXX post hover element is added to the quoting post - ? $root.find('> .files, > .inline').first() - : this.nextSibling + ? $root.find('> .intro') + : this var link = { node: node, @@ -54,7 +53,7 @@ "class": 'inline post', id: 'inline_' + link.postNum }) - $clone.insertBefore(link.node) + $clone.insertAfter(link.node) } $('head').append( From 9ea5ff610e38f3c390cb19bec86ee5b1ab57d187 Mon Sep 17 00:00:00 2001 From: James Campos Date: Fri, 3 Oct 2014 13:08:50 -0700 Subject: [PATCH 14/34] bypass (OP) text --- js/inline.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/inline.js b/js/inline.js index 26b13f91..0ea7f233 100644 --- a/js/inline.js +++ b/js/inline.js @@ -18,7 +18,7 @@ var node = this.className ? $root.find('> .intro') - : this + : $(this) var link = { node: node, @@ -29,6 +29,8 @@ if (OP === postOP) { // XXX post hover adds fetched threads to the DOM selector = '#thread_' + OP + ' ' + selector + // XXX bypass the `(OP)` text + link.node = link.node.next() var $target = $(selector) return add(link, $target) } From 3c98319e52bb1b902c726a435a3c77c927492925 Mon Sep 17 00:00:00 2001 From: James Campos Date: Fri, 3 Oct 2014 13:28:52 -0700 Subject: [PATCH 15/34] front page fixes --- js/inline.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/js/inline.js b/js/inline.js index 0ea7f233..622d40b3 100644 --- a/js/inline.js +++ b/js/inline.js @@ -25,14 +25,16 @@ postNum: postNum } - var OP = $('input[name="thread"]').val() - if (OP === postOP) { + var srcOP = $root.closest('[id^=thread]').attr('id').match(/\d+/)[0] + if (srcOP === postOP) { // XXX post hover adds fetched threads to the DOM - selector = '#thread_' + OP + ' ' + selector + selector = '#thread_' + srcOP + ' ' + selector // XXX bypass the `(OP)` text link.node = link.node.next() + var $target = $(selector) - return add(link, $target) + if ($target.length) + return add(link, $target) } var url = this.pathname @@ -53,7 +55,8 @@ var $clone = $target.clone(true) $clone.attr({ "class": 'inline post', - id: 'inline_' + link.postNum + id: 'inline_' + link.postNum, + style: null// XXX remove post hover styling }) $clone.insertAfter(link.node) } From 3ce156a0d0a6e451b6ecb048f4b14f8a7db057b2 Mon Sep 17 00:00:00 2001 From: James Campos Date: Fri, 3 Oct 2014 13:32:41 -0700 Subject: [PATCH 16/34] rename --- js/inline.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/js/inline.js b/js/inline.js index 622d40b3..fb50684b 100644 --- a/js/inline.js +++ b/js/inline.js @@ -5,16 +5,16 @@ e.preventDefault() var $root = $(this).closest('.post') - var postNum = this.textContent.slice(2) + var targetNum = this.textContent.slice(2) - var $clone = $root.find('#inline_' + postNum) + var $clone = $root.find('#inline_' + targetNum) if ($clone.length) return $clone.remove() - var postOP = this.pathname.match(/(\d+).html/)[1] - var selector = postNum === postOP + var targetOP = this.pathname.match(/(\d+).html/)[1] + var selector = targetNum === targetOP ? '.op .body' - : '#reply_' + postNum + : '#reply_' + targetNum var node = this.className ? $root.find('> .intro') @@ -22,11 +22,11 @@ var link = { node: node, - postNum: postNum + targetNum: targetNum } var srcOP = $root.closest('[id^=thread]').attr('id').match(/\d+/)[0] - if (srcOP === postOP) { + if (srcOP === targetOP) { // XXX post hover adds fetched threads to the DOM selector = '#thread_' + srcOP + ' ' + selector // XXX bypass the `(OP)` text @@ -55,7 +55,7 @@ var $clone = $target.clone(true) $clone.attr({ "class": 'inline post', - id: 'inline_' + link.postNum, + id: 'inline_' + link.targetNum, style: null// XXX remove post hover styling }) $clone.insertAfter(link.node) From 2f85073d281bc9cc6d8a09c5607f9a182c81004e Mon Sep 17 00:00:00 2001 From: James Campos Date: Fri, 3 Oct 2014 13:40:05 -0700 Subject: [PATCH 17/34] fix front page backlink --- js/inline.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/js/inline.js b/js/inline.js index fb50684b..2b5200fc 100644 --- a/js/inline.js +++ b/js/inline.js @@ -11,21 +11,26 @@ if ($clone.length) return $clone.remove() - var targetOP = this.pathname.match(/(\d+).html/)[1] - var selector = targetNum === targetOP - ? '.op .body' - : '#reply_' + targetNum + var srcOP = $root.closest('[id^=thread]').attr('id').match(/\d+/)[0] - var node = this.className - ? $root.find('> .intro') - : $(this) + var node, targetOP + if (this.className) {// backlink + node = $root.find('> .intro') + targetOP = srcOP + } else { + node = $(this) + targetOP = this.pathname.match(/(\d+).html/)[1] + } var link = { node: node, targetNum: targetNum } - var srcOP = $root.closest('[id^=thread]').attr('id').match(/\d+/)[0] + var selector = targetNum === targetOP + ? '.op .body' + : '#reply_' + targetNum + if (srcOP === targetOP) { // XXX post hover adds fetched threads to the DOM selector = '#thread_' + srcOP + ' ' + selector From 9dce04ebc82072978cdcfaae28caa9b6e2f09a5b Mon Sep 17 00:00:00 2001 From: James Campos Date: Fri, 3 Oct 2014 13:41:54 -0700 Subject: [PATCH 18/34] remove inlined posts for new inlined posts --- js/inline.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/inline.js b/js/inline.js index 2b5200fc..a0b80649 100644 --- a/js/inline.js +++ b/js/inline.js @@ -58,6 +58,7 @@ var add = function(link, $target) { var $clone = $target.clone(true) + $clone.find('.inline').remove() $clone.attr({ "class": 'inline post', id: 'inline_' + link.targetNum, From 702e20753a8cc2f879ae294427ce00ae1763f335 Mon Sep 17 00:00:00 2001 From: James Campos Date: Sat, 4 Oct 2014 06:48:29 -0700 Subject: [PATCH 19/34] clearfix --- js/inline.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/inline.js b/js/inline.js index a0b80649..0b7a47a0 100644 --- a/js/inline.js +++ b/js/inline.js @@ -69,7 +69,11 @@ $('head').append( '') $('.body a, .mentioned a') From 262f525e75a74909b41e2fe6b10072b1af1feb72 Mon Sep 17 00:00:00 2001 From: James Campos Date: Sat, 4 Oct 2014 08:16:01 -0700 Subject: [PATCH 20/34] fix --- js/inline.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/inline.js b/js/inline.js index 0b7a47a0..b83a5ae6 100644 --- a/js/inline.js +++ b/js/inline.js @@ -34,8 +34,10 @@ if (srcOP === targetOP) { // XXX post hover adds fetched threads to the DOM selector = '#thread_' + srcOP + ' ' + selector - // XXX bypass the `(OP)` text - link.node = link.node.next() + + // bypass `(OP)` + if (targetNum === targetOP) + link.node = link.node.next() var $target = $(selector) if ($target.length) From daa30a12de74764d9944e53bf63ce9a7dda5860d Mon Sep 17 00:00:00 2001 From: James Campos Date: Sun, 5 Oct 2014 07:19:14 -0700 Subject: [PATCH 21/34] better op selector, don't attach to links --- js/inline.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/js/inline.js b/js/inline.js index b83a5ae6..9232fa63 100644 --- a/js/inline.js +++ b/js/inline.js @@ -28,16 +28,12 @@ } var selector = targetNum === targetOP - ? '.op .body' + ? '#op_' + srcOP : '#reply_' + targetNum if (srcOP === targetOP) { - // XXX post hover adds fetched threads to the DOM - selector = '#thread_' + srcOP + ' ' + selector - - // bypass `(OP)` if (targetNum === targetOP) - link.node = link.node.next() + link.node = link.node.next()// bypass `(OP)` var $target = $(selector) if ($target.length) @@ -78,7 +74,8 @@ '}' + '') - $('.body a, .mentioned a') + // don't attach to outbound links + $('.body a:not([rel]), .mentioned a') .attr('onclick', null)// XXX disable highlightReply .click(inline) })() From 1e04f29485583cd1b85276b2fbfeb47f51473e30 Mon Sep 17 00:00:00 2001 From: James Campos Date: Sun, 5 Oct 2014 15:51:22 -0700 Subject: [PATCH 22/34] extract caching --- js/inline.js | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/js/inline.js b/js/inline.js index 9232fa63..bcbf156f 100644 --- a/js/inline.js +++ b/js/inline.js @@ -1,5 +1,18 @@ ;(function() { - var cache = {} + var App = { + cache: {}, + get: function(url, cb) { + var $page = App.cache[url] + if ($page) + return cb($page) + + $.get(url, function(data) { + var $page = $(data) + App.cache[url] = $page + cb($page) + }) + } + } var inline = function(e) { e.preventDefault() @@ -40,16 +53,8 @@ return add(link, $target) } - var url = this.pathname - var data = cache[url] - if (data) { - var $target = $(data).find(selector) - return add(link, $target) - } - - $.get(url, function(data) { - cache[url] = data - var $target = $(data).find(selector) + App.get(this.pathname, function($page) { + var $target = $page.find(selector) add(link, $target) }) } From f1b89a5302dbb5016b3ac02b68b1111c99e25dd5 Mon Sep 17 00:00:00 2001 From: James Campos Date: Sun, 5 Oct 2014 16:20:25 -0700 Subject: [PATCH 23/34] optional --- js/inline.js | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/js/inline.js b/js/inline.js index bcbf156f..5399e871 100644 --- a/js/inline.js +++ b/js/inline.js @@ -11,6 +11,37 @@ App.cache[url] = $page cb($page) }) + }, + options: { + add: function(key, description, tab) { + tab || (tab = 'general') + + var checked = App.options.get(key) + var $el = $( + '
' + + '' + + '
') + + $el + .find('input') + .prop('checked', checked) + .on('change', App.options.check(key)) + + window.Options.extend_tab(tab, $el) + }, + get: function(key) { + if (localStorage[key]) + return JSON.parse(localStorage[key]) + }, + check: function(key) { + return function(e) { + var val = this.checked + localStorage[key] = JSON.stringify(val) + } + } } } @@ -70,6 +101,11 @@ $clone.insertAfter(link.node) } + App.options.add('inline', 'Inline quoted posts') + + if (!App.options.get('inline')) + return + $('head').append( '') // don't attach to outbound links - $('.body a:not([rel]), .mentioned a') - .attr('onclick', null)// XXX disable highlightReply - .click(inline) + + if (App.options.get('useBacklinks')) { + $('.body a:not([rel]), .mentioned a') + .attr('onclick', null)// XXX disable highlightReply + .click(inline) + } }) From b7e9007ad445d9da30059bac1ea782fbfdc42d62 Mon Sep 17 00:00:00 2001 From: 8chan Date: Mon, 6 Oct 2014 18:42:07 -0700 Subject: [PATCH 30/34] This makes the options appear at the bottom for some reason --- js/inline.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/inline.js b/js/inline.js index c1aed4dd..e3dcc988 100644 --- a/js/inline.js +++ b/js/inline.js @@ -1,4 +1,4 @@ -onready(function() { +$(document).ready(function() { var App = { cache: {}, get: function(url, cb) { @@ -142,4 +142,4 @@ onready(function() { .attr('onclick', null)// XXX disable highlightReply .click(inline) } -}) +}); From 582c77a9350a6a06c4704ee15adaacba57aeea23 Mon Sep 17 00:00:00 2001 From: 8chan Date: Mon, 6 Oct 2014 19:02:39 -0700 Subject: [PATCH 31/34] Fix name and order --- js/inline.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/inline.js b/js/inline.js index e3dcc988..796c48a1 100644 --- a/js/inline.js +++ b/js/inline.js @@ -123,8 +123,8 @@ $(document).ready(function() { $clone.insertAfter(link.node) } + App.options.add('useInlining', 'Enable inlining') App.options.add('hidePost', 'Hide inlined backlinked posts') - App.options.add('useBacklinks', 'Enable backlinks') $('head').append( '