diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3d39fe6fb..a8afd5d67 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,9 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor
### v1.11.29
+**v1.11.29.1** *(2016-03-31)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.29.1/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.29.1/builds/4chan-X-noupdate.crx "Chromium version")]
+- Remove default upvote text.
+
**v1.11.29.0** *(2016-03-31)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.29.0/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.29.0/builds/4chan-X-noupdate.crx "Chromium version")]
- Based on v1.11.28.3.
- Add upvote count and button.
diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx
index 4c81116f0..33673e613 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 194ea53e7..ca0f3af68 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.11.29.0
+// @version 1.11.29.1
// @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 01d90fbcf..67a9bd233 100644
--- a/builds/4chan-X-beta.user.js
+++ b/builds/4chan-X-beta.user.js
@@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X beta
-// @version 1.11.29.0
+// @version 1.11.29.1
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -432,7 +432,8 @@
pruneReplies: {
'Prune Replies': false,
'Max Replies': 1000
- }
+ },
+ upvoteText: ''
};
Conf = {};
@@ -444,7 +445,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.29.0',
+ VERSION: '1.11.29.1',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -7122,7 +7123,6 @@
if (!(((ref = g.VIEW) === 'thread' || ref === 'index') && Conf['Upvotes'])) {
return;
}
- this.textPosted = g.BOARD.ID === 'r9k' ? 'This.' : this.text;
return Post.callbacks.push({
name: 'Upvotes',
cb: this.node
@@ -7184,14 +7184,30 @@
if (!QR.postingIsEnabled) {
return;
}
+ if (QR.nodes) {
+ $.off(QR.nodes.com, 'input', Upvotes.setText);
+ }
QR.quote.call(this);
com = QR.nodes.com;
- text = Upvotes.textPosted + "\n";
+ text = Conf['upvoteText'] + "\n";
pos = com.selectionStart;
- com.value = com.value.slice(0, +pos + 1 || 9e9) + text + com.value.slice(pos);
+ Upvotes.context = com.value.slice(0, pos);
+ com.value = com.value.slice(0, pos) + text + com.value.slice(pos);
pos += text.length;
com.setSelectionRange(pos, pos);
- return $.event('input', null, com);
+ $.event('input', null, com);
+ Upvotes.post = $.id('selected');
+ return $.on(com, 'input', Upvotes.setText);
+ },
+ setText: function() {
+ var context;
+ context = Upvotes.context;
+ if ($.id('selected') === Upvotes.post && this.value.slice(0, context.length) === context) {
+ Conf['upvoteText'] = this.value.slice(context.length).split('\n')[0];
+ return $.set('upvoteText', Conf['upvoteText']);
+ } else {
+ return $.off(this, 'input', Upvotes.setText);
+ }
}
};
diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx
index abc8843e8..b7461c557 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 e13f3317f..25f497c58 100644
--- a/builds/4chan-X-noupdate.user.js
+++ b/builds/4chan-X-noupdate.user.js
@@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
-// @version 1.11.29.0
+// @version 1.11.29.1
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -432,7 +432,8 @@
pruneReplies: {
'Prune Replies': false,
'Max Replies': 1000
- }
+ },
+ upvoteText: ''
};
Conf = {};
@@ -444,7 +445,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.29.0',
+ VERSION: '1.11.29.1',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -7122,7 +7123,6 @@
if (!(((ref = g.VIEW) === 'thread' || ref === 'index') && Conf['Upvotes'])) {
return;
}
- this.textPosted = g.BOARD.ID === 'r9k' ? 'This.' : this.text;
return Post.callbacks.push({
name: 'Upvotes',
cb: this.node
@@ -7184,14 +7184,30 @@
if (!QR.postingIsEnabled) {
return;
}
+ if (QR.nodes) {
+ $.off(QR.nodes.com, 'input', Upvotes.setText);
+ }
QR.quote.call(this);
com = QR.nodes.com;
- text = Upvotes.textPosted + "\n";
+ text = Conf['upvoteText'] + "\n";
pos = com.selectionStart;
- com.value = com.value.slice(0, +pos + 1 || 9e9) + text + com.value.slice(pos);
+ Upvotes.context = com.value.slice(0, pos);
+ com.value = com.value.slice(0, pos) + text + com.value.slice(pos);
pos += text.length;
com.setSelectionRange(pos, pos);
- return $.event('input', null, com);
+ $.event('input', null, com);
+ Upvotes.post = $.id('selected');
+ return $.on(com, 'input', Upvotes.setText);
+ },
+ setText: function() {
+ var context;
+ context = Upvotes.context;
+ if ($.id('selected') === Upvotes.post && this.value.slice(0, context.length) === context) {
+ Conf['upvoteText'] = this.value.slice(context.length).split('\n')[0];
+ return $.set('upvoteText', Conf['upvoteText']);
+ } else {
+ return $.off(this, 'input', Upvotes.setText);
+ }
}
};
diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx
index 3eb259976..b161b9a9a 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 75e17b303..20966a648 100644
--- a/builds/4chan-X.meta.js
+++ b/builds/4chan-X.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.11.29.0
+// @version 1.11.29.1
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js
index 7605f4ffc..bebac350a 100644
--- a/builds/4chan-X.user.js
+++ b/builds/4chan-X.user.js
@@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
-// @version 1.11.29.0
+// @version 1.11.29.1
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -432,7 +432,8 @@
pruneReplies: {
'Prune Replies': false,
'Max Replies': 1000
- }
+ },
+ upvoteText: ''
};
Conf = {};
@@ -444,7 +445,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.29.0',
+ VERSION: '1.11.29.1',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -7122,7 +7123,6 @@
if (!(((ref = g.VIEW) === 'thread' || ref === 'index') && Conf['Upvotes'])) {
return;
}
- this.textPosted = g.BOARD.ID === 'r9k' ? 'This.' : this.text;
return Post.callbacks.push({
name: 'Upvotes',
cb: this.node
@@ -7184,14 +7184,30 @@
if (!QR.postingIsEnabled) {
return;
}
+ if (QR.nodes) {
+ $.off(QR.nodes.com, 'input', Upvotes.setText);
+ }
QR.quote.call(this);
com = QR.nodes.com;
- text = Upvotes.textPosted + "\n";
+ text = Conf['upvoteText'] + "\n";
pos = com.selectionStart;
- com.value = com.value.slice(0, +pos + 1 || 9e9) + text + com.value.slice(pos);
+ Upvotes.context = com.value.slice(0, pos);
+ com.value = com.value.slice(0, pos) + text + com.value.slice(pos);
pos += text.length;
com.setSelectionRange(pos, pos);
- return $.event('input', null, com);
+ $.event('input', null, com);
+ Upvotes.post = $.id('selected');
+ return $.on(com, 'input', Upvotes.setText);
+ },
+ setText: function() {
+ var context;
+ context = Upvotes.context;
+ if ($.id('selected') === Upvotes.post && this.value.slice(0, context.length) === context) {
+ Conf['upvoteText'] = this.value.slice(context.length).split('\n')[0];
+ return $.set('upvoteText', Conf['upvoteText']);
+ } else {
+ return $.off(this, 'input', Upvotes.setText);
+ }
}
};
diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip
index fae8d86ce..d04325077 100644
Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ
diff --git a/builds/updates-beta.xml b/builds/updates-beta.xml
index f165f228b..24ec1f2c6 100644
--- a/builds/updates-beta.xml
+++ b/builds/updates-beta.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/builds/updates.xml b/builds/updates.xml
index d7d10940e..c4a6dac10 100644
--- a/builds/updates.xml
+++ b/builds/updates.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/version.json b/version.json
index 0dbf834ef..60b2ed49c 100644
--- a/version.json
+++ b/version.json
@@ -1,4 +1,4 @@
{
- "version": "1.11.29.0",
- "date": "2016-03-31T11:03:12.056Z"
+ "version": "1.11.29.1",
+ "date": "2016-03-31T23:26:20.015Z"
}