diff --git a/CHANGELOG.md b/CHANGELOG.md
index 97193c9c9..6be55e519 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,12 @@
-Sometimes the changelog has notes (not comprehensive) acknowledging people's work. This does not mean the changes are their fault, only that their code was used. All changes to the script are chosen by and the fault of the maintainer (ccd0).
+### v1.13.14
+
+**v1.13.14.0** *(2017-10-23)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.14.0/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.14.0/builds/4chan-X-noupdate.crx)]
+- Based on v1.13.13.1.
+- (saxamaphone69) Implement `Bottom Backlinks` option to place backlinks below the post content rather than above it. #101
+
### v1.13.13
**v1.13.13.1** *(2017-10-18)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.13.1/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.13.1/builds/4chan-X-noupdate.crx)]
diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx
index 0147c8599..fda567638 100644
Binary files a/builds/4chan-X-beta.crx and b/builds/4chan-X-beta.crx differ
diff --git a/builds/4chan-X-beta.meta.js b/builds/4chan-X-beta.meta.js
index f53693147..52d6aa7a2 100644
--- a/builds/4chan-X-beta.meta.js
+++ b/builds/4chan-X-beta.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X beta
-// @version 1.13.13.1
+// @version 1.13.14.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X-beta.user.js b/builds/4chan-X-beta.user.js
index cb08a077a..9d2576462 100644
--- a/builds/4chan-X-beta.user.js
+++ b/builds/4chan-X-beta.user.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X beta
-// @version 1.13.13.1
+// @version 1.13.14.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -159,7 +159,7 @@ docSet = function() {
};
g = {
- VERSION: '1.13.13.1',
+ VERSION: '1.13.14.0',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -332,6 +332,7 @@ Config = (function() {
'Quote Links': {
'Quote Backlinks': [true, 'Add quote backlinks.'],
'OP Backlinks': [true, 'Add backlinks to the OP.', 1],
+ 'Bottom Backlinks': [false, 'Place backlinks at the bottom of posts.', 1],
'Quote Inlining': [true, 'Inline quoted post on click.'],
'Inline Cross-thread Quotes Only': [false, 'Don\'t inline quote links when the posts are visible in the thread.', 1],
'Quote Hash Navigation': [false, 'Include an extra link after quotes for autoscrolling to quoted posts.', 1],
@@ -2416,6 +2417,13 @@ span.hide-announcement {\n\
.postNum + .container::before {\n\
content: \" \";\n\
}\n\
+:root.bottom-backlinks .container {\n\
+ display: block;\n\
+ clear: both;\n\
+}\n\
+:root.bottom-backlinks .backlink {\n\
+ font-size: 90%;\n\
+}\n\
.inline {\n\
border: 1px solid;\n\
display: table;\n\
@@ -6359,11 +6367,11 @@ Post = (function() {
configurable: true,
enumerable: true,
get: function() {
- return info.getElementsByClassName('backlink');
+ return post.getElementsByClassName('backlink');
}
});
} else {
- nodes.backlinks = info.getElementsByClassName('backlink');
+ nodes.backlinks = post.getElementsByClassName('backlink');
}
return nodes;
};
@@ -23566,6 +23574,9 @@ QuoteBacklink = (function() {
if (((ref = g.VIEW) !== 'index' && ref !== 'thread') || !Conf['Quote Backlinks']) {
return;
}
+ if ((this.bottomBacklinks = Conf['Bottom Backlinks'])) {
+ $.addClass(doc, 'bottom-backlinks');
+ }
Callbacks.Post.push({
name: 'Quote Backlinking Part 1',
cb: this.firstNode
@@ -23636,7 +23647,11 @@ QuoteBacklink = (function() {
}
container = QuoteBacklink.getContainer(this.fullID);
this.nodes.backlinkContainer = container;
- return $.add(this.nodes.info, container);
+ if (QuoteBacklink.bottomBacklinks) {
+ return $.add(this.nodes.post, container);
+ } else {
+ return $.add(this.nodes.info, container);
+ }
},
getContainer: function(id) {
var base;
@@ -23773,7 +23788,7 @@ QuoteInline = (function() {
},
findRoot: function(quotelink, isBacklink) {
if (isBacklink) {
- return quotelink.parentNode.parentNode;
+ return $.x('ancestor::*[parent::*[contains(@class,"post")]][1]', quotelink);
} else {
return $.x('ancestor-or-self::*[parent::blockquote][1]', quotelink);
}
diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx
index ca80b42ff..146758206 100644
Binary files a/builds/4chan-X-noupdate.crx and b/builds/4chan-X-noupdate.crx differ
diff --git a/builds/4chan-X-noupdate.user.js b/builds/4chan-X-noupdate.user.js
index d83ead8fa..9c0e99aab 100644
--- a/builds/4chan-X-noupdate.user.js
+++ b/builds/4chan-X-noupdate.user.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.13.13.1
+// @version 1.13.14.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -159,7 +159,7 @@ docSet = function() {
};
g = {
- VERSION: '1.13.13.1',
+ VERSION: '1.13.14.0',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -332,6 +332,7 @@ Config = (function() {
'Quote Links': {
'Quote Backlinks': [true, 'Add quote backlinks.'],
'OP Backlinks': [true, 'Add backlinks to the OP.', 1],
+ 'Bottom Backlinks': [false, 'Place backlinks at the bottom of posts.', 1],
'Quote Inlining': [true, 'Inline quoted post on click.'],
'Inline Cross-thread Quotes Only': [false, 'Don\'t inline quote links when the posts are visible in the thread.', 1],
'Quote Hash Navigation': [false, 'Include an extra link after quotes for autoscrolling to quoted posts.', 1],
@@ -2416,6 +2417,13 @@ span.hide-announcement {\n\
.postNum + .container::before {\n\
content: \" \";\n\
}\n\
+:root.bottom-backlinks .container {\n\
+ display: block;\n\
+ clear: both;\n\
+}\n\
+:root.bottom-backlinks .backlink {\n\
+ font-size: 90%;\n\
+}\n\
.inline {\n\
border: 1px solid;\n\
display: table;\n\
@@ -6359,11 +6367,11 @@ Post = (function() {
configurable: true,
enumerable: true,
get: function() {
- return info.getElementsByClassName('backlink');
+ return post.getElementsByClassName('backlink');
}
});
} else {
- nodes.backlinks = info.getElementsByClassName('backlink');
+ nodes.backlinks = post.getElementsByClassName('backlink');
}
return nodes;
};
@@ -23566,6 +23574,9 @@ QuoteBacklink = (function() {
if (((ref = g.VIEW) !== 'index' && ref !== 'thread') || !Conf['Quote Backlinks']) {
return;
}
+ if ((this.bottomBacklinks = Conf['Bottom Backlinks'])) {
+ $.addClass(doc, 'bottom-backlinks');
+ }
Callbacks.Post.push({
name: 'Quote Backlinking Part 1',
cb: this.firstNode
@@ -23636,7 +23647,11 @@ QuoteBacklink = (function() {
}
container = QuoteBacklink.getContainer(this.fullID);
this.nodes.backlinkContainer = container;
- return $.add(this.nodes.info, container);
+ if (QuoteBacklink.bottomBacklinks) {
+ return $.add(this.nodes.post, container);
+ } else {
+ return $.add(this.nodes.info, container);
+ }
},
getContainer: function(id) {
var base;
@@ -23773,7 +23788,7 @@ QuoteInline = (function() {
},
findRoot: function(quotelink, isBacklink) {
if (isBacklink) {
- return quotelink.parentNode.parentNode;
+ return $.x('ancestor::*[parent::*[contains(@class,"post")]][1]', quotelink);
} else {
return $.x('ancestor-or-self::*[parent::blockquote][1]', quotelink);
}
diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx
index 399fd4a63..3afcd9faf 100644
Binary files a/builds/4chan-X.crx and b/builds/4chan-X.crx differ
diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js
index bf827b6f9..6ccfbc0df 100644
--- a/builds/4chan-X.meta.js
+++ b/builds/4chan-X.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.13.13.1
+// @version 1.13.14.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js
index 4aa2e60d2..b0df94ee6 100644
--- a/builds/4chan-X.user.js
+++ b/builds/4chan-X.user.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.13.13.1
+// @version 1.13.14.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -159,7 +159,7 @@ docSet = function() {
};
g = {
- VERSION: '1.13.13.1',
+ VERSION: '1.13.14.0',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -332,6 +332,7 @@ Config = (function() {
'Quote Links': {
'Quote Backlinks': [true, 'Add quote backlinks.'],
'OP Backlinks': [true, 'Add backlinks to the OP.', 1],
+ 'Bottom Backlinks': [false, 'Place backlinks at the bottom of posts.', 1],
'Quote Inlining': [true, 'Inline quoted post on click.'],
'Inline Cross-thread Quotes Only': [false, 'Don\'t inline quote links when the posts are visible in the thread.', 1],
'Quote Hash Navigation': [false, 'Include an extra link after quotes for autoscrolling to quoted posts.', 1],
@@ -2416,6 +2417,13 @@ span.hide-announcement {\n\
.postNum + .container::before {\n\
content: \" \";\n\
}\n\
+:root.bottom-backlinks .container {\n\
+ display: block;\n\
+ clear: both;\n\
+}\n\
+:root.bottom-backlinks .backlink {\n\
+ font-size: 90%;\n\
+}\n\
.inline {\n\
border: 1px solid;\n\
display: table;\n\
@@ -6359,11 +6367,11 @@ Post = (function() {
configurable: true,
enumerable: true,
get: function() {
- return info.getElementsByClassName('backlink');
+ return post.getElementsByClassName('backlink');
}
});
} else {
- nodes.backlinks = info.getElementsByClassName('backlink');
+ nodes.backlinks = post.getElementsByClassName('backlink');
}
return nodes;
};
@@ -23566,6 +23574,9 @@ QuoteBacklink = (function() {
if (((ref = g.VIEW) !== 'index' && ref !== 'thread') || !Conf['Quote Backlinks']) {
return;
}
+ if ((this.bottomBacklinks = Conf['Bottom Backlinks'])) {
+ $.addClass(doc, 'bottom-backlinks');
+ }
Callbacks.Post.push({
name: 'Quote Backlinking Part 1',
cb: this.firstNode
@@ -23636,7 +23647,11 @@ QuoteBacklink = (function() {
}
container = QuoteBacklink.getContainer(this.fullID);
this.nodes.backlinkContainer = container;
- return $.add(this.nodes.info, container);
+ if (QuoteBacklink.bottomBacklinks) {
+ return $.add(this.nodes.post, container);
+ } else {
+ return $.add(this.nodes.info, container);
+ }
},
getContainer: function(id) {
var base;
@@ -23773,7 +23788,7 @@ QuoteInline = (function() {
},
findRoot: function(quotelink, isBacklink) {
if (isBacklink) {
- return quotelink.parentNode.parentNode;
+ return $.x('ancestor::*[parent::*[contains(@class,"post")]][1]', quotelink);
} else {
return $.x('ancestor-or-self::*[parent::blockquote][1]', quotelink);
}
diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip
index 01fbe8f0f..88e10f773 100644
Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ
diff --git a/builds/updates-beta.json b/builds/updates-beta.json
index 1b30746e5..9ca5fabf3 100644
--- a/builds/updates-beta.json
+++ b/builds/updates-beta.json
@@ -3,7 +3,7 @@
"4chan-x@4chan-x.net": {
"updates": [
{
- "version": "1.13.13.1",
+ "version": "1.13.14.0",
"update_link": "https://www.4chan-x.net/builds/4chan-X-beta.crx"
}
]
diff --git a/builds/updates-beta.xml b/builds/updates-beta.xml
index a804975f4..520dc4b0e 100644
--- a/builds/updates-beta.xml
+++ b/builds/updates-beta.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/builds/updates.json b/builds/updates.json
index 2c13b5f6d..11e0b737a 100644
--- a/builds/updates.json
+++ b/builds/updates.json
@@ -3,7 +3,7 @@
"4chan-x@4chan-x.net": {
"updates": [
{
- "version": "1.13.13.1",
+ "version": "1.13.14.0",
"update_link": "https://www.4chan-x.net/builds/4chan-X.crx"
}
]
diff --git a/builds/updates.xml b/builds/updates.xml
index 45fc66a99..7efd62031 100644
--- a/builds/updates.xml
+++ b/builds/updates.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/version.json b/version.json
index 9c2f7a2bd..2d9760fa9 100644
--- a/version.json
+++ b/version.json
@@ -1,4 +1,4 @@
{
- "version": "1.13.13.1",
- "date": "2017-10-18T03:50:27.794Z"
+ "version": "1.13.14.0",
+ "date": "2017-10-23T05:34:40.367Z"
}
\ No newline at end of file