From a274214c071075b93a414d46ff35b17d6d8f7c89 Mon Sep 17 00:00:00 2001 From: seaweedchan Date: Sat, 21 Sep 2013 00:05:49 -0700 Subject: [PATCH 1/8] Update post.html --- src/General/html/Build/post.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/General/html/Build/post.html b/src/General/html/Build/post.html index 395255057..d479536b1 100755 --- a/src/General/html/Build/post.html +++ b/src/General/html/Build/post.html @@ -34,7 +34,7 @@
-  #{subject}  + #{subject}  #{emailStart} #{name or ''} @@ -56,4 +56,4 @@
#{comment or ''}
#{" "} -
""" \ No newline at end of file +""" From 7c9d54792a12a75de24c79365af9bd4ee4c061d5 Mon Sep 17 00:00:00 2001 From: seaweedchan Date: Sat, 21 Sep 2013 00:09:32 -0700 Subject: [PATCH 2/8] Update Build.coffee #190 --- src/General/Build.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/General/Build.coffee b/src/General/Build.coffee index b56123ae2..434bbcd1f 100755 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -72,7 +72,7 @@ Build = emailStart = '' emailEnd = '' - subject = "#{subject or ''}" + subject = "#{if subject then (' ' + subject) else ''}" userID = if !capcode and uniqueID From d9023a6bf1808acef462c81162b10559461bd773 Mon Sep 17 00:00:00 2001 From: seaweedchan Date: Sat, 21 Sep 2013 00:15:45 -0700 Subject: [PATCH 3/8] Fix #189 --- src/Menu/DeleteLink.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Menu/DeleteLink.coffee b/src/Menu/DeleteLink.coffee index dca9e889f..1805047f8 100755 --- a/src/Menu/DeleteLink.coffee +++ b/src/Menu/DeleteLink.coffee @@ -84,7 +84,7 @@ DeleteLink = delete DeleteLink.cooldown.counting return DeleteLink.cooldown.counting = post - length = 30 + length = 60 seconds = Math.ceil (length * $.SECOND - (Date.now() - post.info.date)) / $.SECOND DeleteLink.cooldown.count post, seconds, length, node count: (post, seconds, length, node) -> From 37fde172774557034fa2d636b0963be62aa06aff Mon Sep 17 00:00:00 2001 From: Jordan Bates Date: Sat, 21 Sep 2013 10:12:25 -0700 Subject: [PATCH 4/8] Build and changelog --- CHANGELOG.md | 3 +++ LICENSE | 2 +- builds/4chan-X.user.js | 8 ++++---- builds/crx/script.js | 8 ++++---- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e2d8a948..a5d4bfbb4 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +**seaweedchan**: +- Delete cooldown update + ### v1.2.39 *2013-09-19* diff --git a/LICENSE b/LICENSE index 33978ccdc..053849be2 100755 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* 4chan X - Version 1.2.39 - 2013-09-19 +* 4chan X - Version 1.2.39 - 2013-09-21 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 648f10c60..8e5377bb4 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -22,7 +22,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.2.39 - 2013-09-19 +* 4chan X - Version 1.2.39 - 2013-09-21 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -1970,7 +1970,7 @@ emailStart = ''; emailEnd = ''; } - subject = "" + (subject || '') + ""; + subject = "" + (subject ? ' ' + subject : '') + ""; userID = !capcode && uniqueID ? (" (ID: ") + ("" + uniqueID + ") ") : ''; switch (capcode) { case 'admin': @@ -2037,7 +2037,7 @@ container = $.el('div', { id: "pc" + postID, className: "postContainer " + (isOP ? 'op' : 'reply') + "Container", - innerHTML: "" + (isOP ? '' : "
>>
") + "
" + (isOP ? fileHTML : '') + "" + (isOP ? '' : fileHTML) + "
" + (comment || '') + "
" + " " + "
" + innerHTML: "" + (isOP ? '' : "
>>
") + "
" + (isOP ? fileHTML : '') + "" + (isOP ? '' : fileHTML) + "
" + (comment || '') + "
" + " " + "
" }); _ref = $$('.quotelink', container); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -7493,7 +7493,7 @@ return; } DeleteLink.cooldown.counting = post; - length = 30; + length = 60; seconds = Math.ceil((length * $.SECOND - (Date.now() - post.info.date)) / $.SECOND); return DeleteLink.cooldown.count(post, seconds, length, node); }, diff --git a/builds/crx/script.js b/builds/crx/script.js index d6ed5b583..4eee102bc 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* 4chan X - Version 1.2.39 - 2013-09-19 +* 4chan X - Version 1.2.39 - 2013-09-21 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -1984,7 +1984,7 @@ emailStart = ''; emailEnd = ''; } - subject = "" + (subject || '') + ""; + subject = "" + (subject ? ' ' + subject : '') + ""; userID = !capcode && uniqueID ? (" (ID: ") + ("" + uniqueID + ") ") : ''; switch (capcode) { case 'admin': @@ -2051,7 +2051,7 @@ container = $.el('div', { id: "pc" + postID, className: "postContainer " + (isOP ? 'op' : 'reply') + "Container", - innerHTML: "" + (isOP ? '' : "
>>
") + "
" + (isOP ? fileHTML : '') + "" + (isOP ? '' : fileHTML) + "
" + (comment || '') + "
" + " " + "
" + innerHTML: "" + (isOP ? '' : "
>>
") + "
" + (isOP ? fileHTML : '') + "" + (isOP ? '' : fileHTML) + "
" + (comment || '') + "
" + " " + "
" }); _ref = $$('.quotelink', container); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -7478,7 +7478,7 @@ return; } DeleteLink.cooldown.counting = post; - length = 30; + length = 60; seconds = Math.ceil((length * $.SECOND - (Date.now() - post.info.date)) / $.SECOND); return DeleteLink.cooldown.count(post, seconds, length, node); }, From 93589e80efa3afc7c004445ab2fdbabdfc364248 Mon Sep 17 00:00:00 2001 From: seaweedchan Date: Sun, 22 Sep 2013 04:40:37 -0700 Subject: [PATCH 5/8] Close #187 --- builds/4chan-X.user.js | 22 +++++++++---------- builds/crx/script.js | 40 +++++++++++++++++------------------ src/Posting/QuickReply.coffee | 35 +++++++++++++++--------------- 3 files changed, 49 insertions(+), 48 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index f9ac70564..071bda8d5 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -4924,7 +4924,7 @@ } if (QR.captcha.isEnabled && /captcha|verification/i.test(el.textContent)) { QR.captcha.nodes.input.focus(); - if (Conf['Captcha Warning Notifications']) { + if (Conf['Captcha Warning Notifications'] && !d.hidden) { QR.notify(el); } else { $.addClass(QR.captcha.nodes.input, 'error'); @@ -4942,17 +4942,17 @@ notify: function(el) { var notice, notif; notice = new Notice('warning', el); - QR.notifications.push(notice); - if (!Header.areNotificationsEnabled) { - return; + if (!(Header.areNotificationsEnabled && d.hidden)) { + return QR.notifications.push(notice); + } else { + notif = new Notification(el.textContent, { + body: el.textContent, + icon: Favicon.logo + }); + return notif.onclick = function() { + return window.focus(); + }; } - notif = new Notification(el.textContent, { - body: el.textContent, - icon: Favicon.logo - }); - return notif.onclick = function() { - return window.focus(); - }; }, notifications: [], cleanNotifications: function() { diff --git a/builds/crx/script.js b/builds/crx/script.js index e5f246d47..449b2f8d2 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -4927,7 +4927,7 @@ } if (QR.captcha.isEnabled && /captcha|verification/i.test(el.textContent)) { QR.captcha.nodes.input.focus(); - if (Conf['Captcha Warning Notifications']) { + if (Conf['Captcha Warning Notifications'] && !d.hidden) { QR.notify(el); } else { $.addClass(QR.captcha.nodes.input, 'error'); @@ -4945,26 +4945,26 @@ notify: function(el) { var notice, notif; notice = new Notice('warning', el); - QR.notifications.push(notice); - if (!Header.areNotificationsEnabled) { - return; + if (!(Header.areNotificationsEnabled && d.hidden)) { + return QR.notifications.push(notice); + } else { + notif = new Notification(el.textContent, { + body: el.textContent, + icon: Favicon.logo + }); + notif.onclick = function() { + return window.focus(); + }; + notif.onclose = function() { + return notice.close(); + }; + return notif.onshow = function() { + return setTimeout(function() { + notif.onclose = null; + return notif.close(); + }, 7 * $.SECOND); + }; } - notif = new Notification(el.textContent, { - body: el.textContent, - icon: Favicon.logo - }); - notif.onclick = function() { - return window.focus(); - }; - notif.onclose = function() { - return notice.close(); - }; - return notif.onshow = function() { - return setTimeout(function() { - notif.onclose = null; - return notif.close(); - }, 7 * $.SECOND); - }; }, notifications: [], cleanNotifications: function() { diff --git a/src/Posting/QuickReply.coffee b/src/Posting/QuickReply.coffee index b90187844..cc8b96d88 100755 --- a/src/Posting/QuickReply.coffee +++ b/src/Posting/QuickReply.coffee @@ -141,7 +141,7 @@ QR = if QR.captcha.isEnabled and /captcha|verification/i.test el.textContent # Focus the captcha input on captcha error. QR.captcha.nodes.input.focus() - if Conf['Captcha Warning Notifications'] + if Conf['Captcha Warning Notifications'] and !d.hidden QR.notify el else $.addClass QR.captcha.nodes.input, 'error' @@ -153,22 +153,23 @@ QR = notify: (el) -> notice = new Notice 'warning', el - QR.notifications.push notice - return unless Header.areNotificationsEnabled - notif = new Notification el.textContent, - body: el.textContent - icon: Favicon.logo - notif.onclick = -> window.focus() - <% if (type === 'crx') { %> - # Firefox automatically closes notifications - # so we can't control the onclose properly. - notif.onclose = -> notice.close() - notif.onshow = -> - setTimeout -> - notif.onclose = null - notif.close() - , 7 * $.SECOND - <% } %> + unless Header.areNotificationsEnabled and d.hidden + QR.notifications.push notice + else + notif = new Notification el.textContent, + body: el.textContent + icon: Favicon.logo + notif.onclick = -> window.focus() + <% if (type === 'crx') { %> + # Firefox automatically closes notifications + # so we can't control the onclose properly. + notif.onclose = -> notice.close() + notif.onshow = -> + setTimeout -> + notif.onclose = null + notif.close() + , 7 * $.SECOND + <% } %> notifications: [] cleanNotifications: -> From c6d5c0c4630c252a950304ffd153b33e9cc41fa3 Mon Sep 17 00:00:00 2001 From: seaweedchan Date: Sun, 22 Sep 2013 04:45:33 -0700 Subject: [PATCH 6/8] Release 4chan X v1.2.40. --- CHANGELOG.md | 5 +++++ LICENSE | 2 +- builds/4chan-X.meta.js | 2 +- builds/4chan-X.user.js | 6 +++--- builds/crx/manifest.json | 2 +- builds/crx/script.js | 4 ++-- latest.js | 2 +- package.json | 2 +- 8 files changed, 15 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5815033f8..037be8b44 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,13 @@ +### v1.2.40 +*2013-09-22* + **MayhemYDG**: - /pol/ flag selector **seaweedchan**: - Delete cooldown update +- Small bug fixes +- Don't show warnings AND desktop notifications at the same time, and prefer QR warnings unless the document is hidden ### v1.2.39 *2013-09-19* diff --git a/LICENSE b/LICENSE index b36ebceef..c57dc1fd3 100755 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* 4chan X - Version 1.2.39 - 2013-09-22 +* 4chan X - Version 1.2.40 - 2013-09-22 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js index 784ee051c..7e600a6cc 100755 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.2.39 +// @version 1.2.40 // @minGMVer 1.13 // @minFFVer 22 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 071bda8d5..9ab0eb512 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.2.39 +// @version 1.2.40 // @minGMVer 1.13 // @minFFVer 22 // @namespace 4chan-X @@ -22,7 +22,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.2.39 - 2013-09-22 +* 4chan X - Version 1.2.40 - 2013-09-22 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -332,7 +332,7 @@ doc = d.documentElement; g = { - VERSION: '1.2.39', + VERSION: '1.2.40', NAMESPACE: '4chan X.', boards: {}, threads: {}, diff --git a/builds/crx/manifest.json b/builds/crx/manifest.json index f92542820..3d76e9b2c 100755 --- a/builds/crx/manifest.json +++ b/builds/crx/manifest.json @@ -1,6 +1,6 @@ { "name": "4chan X", - "version": "1.2.39", + "version": "1.2.40", "manifest_version": 2, "description": "Cross-browser userscript for maximum lurking on 4chan.", "icons": { diff --git a/builds/crx/script.js b/builds/crx/script.js index 449b2f8d2..884469908 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* 4chan X - Version 1.2.39 - 2013-09-22 +* 4chan X - Version 1.2.40 - 2013-09-22 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -311,7 +311,7 @@ doc = d.documentElement; g = { - VERSION: '1.2.39', + VERSION: '1.2.40', NAMESPACE: '4chan X.', boards: {}, threads: {}, diff --git a/latest.js b/latest.js index b0e06d9a9..ef2c78dc0 100755 --- a/latest.js +++ b/latest.js @@ -1 +1 @@ -postMessage({version:'1.2.39'},'*') +postMessage({version:'1.2.40'},'*') diff --git a/package.json b/package.json index 5beac892b..5c5ebad98 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "4chan-X", - "version": "1.2.39", + "version": "1.2.40", "description": "Cross-browser userscript for maximum lurking on 4chan.", "meta": { "name": "4chan X", From 6cab2cfca7956f48288dc4b55e1a6e8b6c4436dc Mon Sep 17 00:00:00 2001 From: seaweedchan Date: Thu, 3 Oct 2013 16:47:45 -0700 Subject: [PATCH 7/8] Fix #194 --- CHANGELOG.md | 3 +++ LICENSE | 2 +- builds/4chan-X.user.js | 6 +++++- builds/crx/script.js | 6 +++++- src/Posting/QuickReply.coffee | 3 +++ 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 037be8b44..6a4798069 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +**MayhemYDG**: +- Minor Chrome 30 fix + ### v1.2.40 *2013-09-22* diff --git a/LICENSE b/LICENSE index c57dc1fd3..043dcdefe 100755 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* 4chan X - Version 1.2.40 - 2013-09-22 +* 4chan X - Version 1.2.40 - 2013-10-03 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 9ab0eb512..b88bf4a72 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -22,7 +22,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.2.40 - 2013-09-22 +* 4chan X - Version 1.2.40 - 2013-10-03 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -6188,6 +6188,10 @@ threadID: threadID, postID: postID }); + $.event('QRPostSuccessful_', { + threadID: threadID, + postID: postID + }); postsCount = QR.posts.length - 1; QR.cooldown.auto = postsCount && isReply; if (QR.cooldown.auto && QR.captcha.isEnabled && (captchasCount = QR.captcha.captchas.length) < 3 && captchasCount < postsCount) { diff --git a/builds/crx/script.js b/builds/crx/script.js index 884469908..4d7d2872a 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* 4chan X - Version 1.2.40 - 2013-09-22 +* 4chan X - Version 1.2.40 - 2013-10-03 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -6175,6 +6175,10 @@ threadID: threadID, postID: postID }); + $.event('QRPostSuccessful_', { + threadID: threadID, + postID: postID + }); postsCount = QR.posts.length - 1; QR.cooldown.auto = postsCount && isReply; if (QR.cooldown.auto && QR.captcha.isEnabled && (captchasCount = QR.captcha.captchas.length) < 3 && captchasCount < postsCount) { diff --git a/src/Posting/QuickReply.coffee b/src/Posting/QuickReply.coffee index cc8b96d88..1d84a4e9b 100755 --- a/src/Posting/QuickReply.coffee +++ b/src/Posting/QuickReply.coffee @@ -1216,12 +1216,15 @@ QR = ThreadUpdater.postID = postID + + # Post/upload confirmed as successful. $.event 'QRPostSuccessful', { board: g.BOARD threadID postID } + $.event 'QRPostSuccessful_', {threadID, postID} # Enable auto-posting if we have stuff left to post, disable it otherwise. postsCount = QR.posts.length - 1 From 26a0c27ac304d70bc296de9294b7fd4bc6e52048 Mon Sep 17 00:00:00 2001 From: seaweedchan Date: Thu, 3 Oct 2013 16:49:16 -0700 Subject: [PATCH 8/8] Release 4chan X v1.2.41. --- CHANGELOG.md | 3 +++ LICENSE | 2 +- builds/4chan-X.meta.js | 2 +- builds/4chan-X.user.js | 6 +++--- builds/crx/manifest.json | 2 +- builds/crx/script.js | 4 ++-- latest.js | 2 +- package.json | 2 +- 8 files changed, 13 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a4798069..40cc0ac66 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### v1.2.41 +*2013-10-03* + **MayhemYDG**: - Minor Chrome 30 fix diff --git a/LICENSE b/LICENSE index 043dcdefe..3cdc55935 100755 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* 4chan X - Version 1.2.40 - 2013-10-03 +* 4chan X - Version 1.2.41 - 2013-10-03 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js index 7e600a6cc..3c8c07303 100755 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.2.40 +// @version 1.2.41 // @minGMVer 1.13 // @minFFVer 22 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index b88bf4a72..0689e3e56 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.2.40 +// @version 1.2.41 // @minGMVer 1.13 // @minFFVer 22 // @namespace 4chan-X @@ -22,7 +22,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.2.40 - 2013-10-03 +* 4chan X - Version 1.2.41 - 2013-10-03 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -332,7 +332,7 @@ doc = d.documentElement; g = { - VERSION: '1.2.40', + VERSION: '1.2.41', NAMESPACE: '4chan X.', boards: {}, threads: {}, diff --git a/builds/crx/manifest.json b/builds/crx/manifest.json index 3d76e9b2c..a7adb15ec 100755 --- a/builds/crx/manifest.json +++ b/builds/crx/manifest.json @@ -1,6 +1,6 @@ { "name": "4chan X", - "version": "1.2.40", + "version": "1.2.41", "manifest_version": 2, "description": "Cross-browser userscript for maximum lurking on 4chan.", "icons": { diff --git a/builds/crx/script.js b/builds/crx/script.js index 4d7d2872a..b57db553a 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* 4chan X - Version 1.2.40 - 2013-10-03 +* 4chan X - Version 1.2.41 - 2013-10-03 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -311,7 +311,7 @@ doc = d.documentElement; g = { - VERSION: '1.2.40', + VERSION: '1.2.41', NAMESPACE: '4chan X.', boards: {}, threads: {}, diff --git a/latest.js b/latest.js index ef2c78dc0..2fa58a119 100755 --- a/latest.js +++ b/latest.js @@ -1 +1 @@ -postMessage({version:'1.2.40'},'*') +postMessage({version:'1.2.41'},'*') diff --git a/package.json b/package.json index 5c5ebad98..b8a296391 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "4chan-X", - "version": "1.2.40", + "version": "1.2.41", "description": "Cross-browser userscript for maximum lurking on 4chan.", "meta": { "name": "4chan X",