From bac22e4e5c2092c73bf9e024d675f997e5829170 Mon Sep 17 00:00:00 2001 From: "Aaron (wutno)" Date: Sun, 23 Feb 2014 12:12:51 -0500 Subject: [PATCH 01/18] installgentoo.net is no more. See you space cowboy... --- json/archives.json | 9 --------- 1 file changed, 9 deletions(-) diff --git a/json/archives.json b/json/archives.json index 0a8e29d4e..33237359a 100644 --- a/json/archives.json +++ b/json/archives.json @@ -52,15 +52,6 @@ "software": "foolfuuka", "boards": ["d", "i"], "files": ["d", "i"] -}, { - "uid": 7, - "name": "Install Gentoo", - "domain": "archive.installgentoo.net", - "http": false, - "https": true, - "software": "fuuka", - "boards": ["diy", "g", "sci"], - "files": [] }, { "uid": 8, "name": "Rebecca Black Tech", From 835f65623d477dd7157db669081cc631bd48bd44 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Mon, 24 Feb 2014 03:40:01 +0100 Subject: [PATCH 02/18] Fix #1476. --- css/style.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/css/style.css b/css/style.css index 852f37b59..860d71cf7 100644 --- a/css/style.css +++ b/css/style.css @@ -114,6 +114,7 @@ a[href="javascript:;"] { #header { right: 0; left: 0; + pointer-events: none; } #header.top { top: 0; @@ -127,6 +128,7 @@ a[href="javascript:;"] { padding: 3px; position: relative; transition: all .1s .05s ease-in-out; + pointer-events: initial; } #header.top #header-bar { border-bottom-width: 1px; @@ -195,6 +197,7 @@ a[href="javascript:;"] { #notifications { height: 0; text-align: center; + pointer-events: initial; } #header.bottom #notifications { position: fixed; From 397e936765df11c30bad2033f275ad4e9d7b3f45 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Mon, 24 Feb 2014 15:27:00 +0100 Subject: [PATCH 03/18] Wait for the pagelist to be replaced before removing .index-loading. --- src/General/Index.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/General/Index.coffee b/src/General/Index.coffee index ee0e54614..0e7b87a2f 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -108,9 +108,9 @@ Index = for navLink in $$ '.navLinks' $.rm navLink $.before $.id('delform'), [Index.navLinks, $.x 'child::form/preceding-sibling::hr[1]'] - $.rmClass doc, 'index-loading' $.asap (-> $('.pagelist') or d.readyState isnt 'loading'), -> - $.replace $('.pagelist'), Index.pagelist + $.replace pagelist, Index.pagelist if pagelist = $ '.pagelist' + $.rmClass doc, 'index-loading' menu: init: -> return if g.VIEW isnt 'index' or !Conf['Menu'] or g.BOARD.ID is 'f' From e9929e5d5db42c5c8842ca43c170c08e4418caa6 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Mon, 24 Feb 2014 18:48:56 +0100 Subject: [PATCH 04/18] Make the post hiding buttons the same color as the side arrows. --- css/burichan.css | 6 ++++++ css/futaba.css | 6 ++++++ css/photon.css | 6 ++++++ css/tomorrow.css | 6 ++++++ css/yotsuba-b.css | 6 ++++++ css/yotsuba.css | 6 ++++++ 6 files changed, 36 insertions(+) diff --git a/css/burichan.css b/css/burichan.css index 6d3958aea..eced176a6 100644 --- a/css/burichan.css +++ b/css/burichan.css @@ -30,6 +30,12 @@ background-color: rgba(255, 255, 255, .14); } +/* Post Hiding */ +:root.burichan .hide-post-button, +:root.burichan .show-post-button { + color: #000; +} + /* QR */ :root.burichan #qr select { color: #34345C; diff --git a/css/futaba.css b/css/futaba.css index 9eccd158a..d672e464b 100644 --- a/css/futaba.css +++ b/css/futaba.css @@ -30,6 +30,12 @@ background-color: rgba(255, 255, 255, .14); } +/* Post Hiding */ +:root.futaba .hide-post-button, +:root.futaba .show-post-button { + color: #800000; +} + /* QR */ :root.futaba #qr select { color: #00E; diff --git a/css/photon.css b/css/photon.css index 1f1be5401..a41c46c87 100644 --- a/css/photon.css +++ b/css/photon.css @@ -30,6 +30,12 @@ background-color: rgba(255, 255, 255, .14); } +/* Post Hiding */ +:root.photon .hide-post-button, +:root.photon .show-post-button { + color: #333 !important; +} + /* QR */ :root.photon #qr select { color: #F60; diff --git a/css/tomorrow.css b/css/tomorrow.css index 453c18589..b11093d80 100644 --- a/css/tomorrow.css +++ b/css/tomorrow.css @@ -30,6 +30,12 @@ background-color: rgba(0, 0, 0, .14); } +/* Post Hiding */ +:root.tomorrow .hide-post-button, +:root.tomorrow .show-post-button { + color: #C5C8C6 !important; +} + /* QR */ :root.tomorrow #qr select { color: #81A2BE; diff --git a/css/yotsuba-b.css b/css/yotsuba-b.css index 8dadd440a..e01164549 100644 --- a/css/yotsuba-b.css +++ b/css/yotsuba-b.css @@ -30,6 +30,12 @@ background-color: rgba(255, 255, 255, .14); } +/* Post Hiding */ +:root.yotsuba-b .hide-post-button, +:root.yotsuba-b .show-post-button { + color: #B7C5D9; +} + /* QR */ :root.yotsuba-b #qr select { color: #34345C; diff --git a/css/yotsuba.css b/css/yotsuba.css index 80731f3f1..bc42ccaa7 100644 --- a/css/yotsuba.css +++ b/css/yotsuba.css @@ -30,6 +30,12 @@ background-color: rgba(255, 255, 255, .14); } +/* Post Hiding */ +:root.yotsuba .hide-post-button, +:root.yotsuba .show-post-button { + color: #E0BFB7; +} + /* QR */ :root.yotsuba #qr select { color: #00E; From 5c6c0b7bd7784fd5f432684367d907b1807ac9fd Mon Sep 17 00:00:00 2001 From: Mayhem Date: Mon, 24 Feb 2014 19:48:18 +0100 Subject: [PATCH 05/18] Use FontAwesome for the announcement hiding button. --- css/style.css | 1 + src/Miscellaneous/PSAHiding.coffee | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/css/style.css b/css/style.css index 860d71cf7..84a85c41c 100644 --- a/css/style.css +++ b/css/style.css @@ -515,6 +515,7 @@ a[href="javascript:;"] { } a.hide-announcement { float: left; + font-size: 14px; } /* Unread */ diff --git a/src/Miscellaneous/PSAHiding.coffee b/src/Miscellaneous/PSAHiding.coffee index 0b1ad0a6b..a69e2ab22 100644 --- a/src/Miscellaneous/PSAHiding.coffee +++ b/src/Miscellaneous/PSAHiding.coffee @@ -24,7 +24,7 @@ PSAHiding = $.on entry.el, 'click', PSAHiding.toggle PSAHiding.btn = btn = $.el 'a', - innerHTML: '[ - ]' + innerHTML: '' title: 'Hide announcement.' className: 'hide-announcement' href: 'javascript:;' From c3fd98551afcaf7fae19542891f5bc862379b94d Mon Sep 17 00:00:00 2001 From: Mayhem Date: Mon, 24 Feb 2014 20:33:58 +0100 Subject: [PATCH 06/18] Less s. --- src/Filtering/PostHiding.coffee | 6 ++---- src/Miscellaneous/PSAHiding.coffee | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Filtering/PostHiding.coffee b/src/Filtering/PostHiding.coffee index 094f315f3..50e92615a 100644 --- a/src/Filtering/PostHiding.coffee +++ b/src/Filtering/PostHiding.coffee @@ -2,12 +2,10 @@ PostHiding = init: -> @db = new DataBoard 'hiddenPosts' @hideButton = $.el 'a', - className: 'hide-post-button' - innerHTML: '' + className: 'hide-post-button fa fa-minus-square-o' href: 'javascript:;' @showButton = $.el 'a', - className: 'show-post-button' - innerHTML: '' + className: 'show-post-button fa fa-plus-square-o' href: 'javascript:;' Post.callbacks.push diff --git a/src/Miscellaneous/PSAHiding.coffee b/src/Miscellaneous/PSAHiding.coffee index a69e2ab22..2c083ac2f 100644 --- a/src/Miscellaneous/PSAHiding.coffee +++ b/src/Miscellaneous/PSAHiding.coffee @@ -24,9 +24,8 @@ PSAHiding = $.on entry.el, 'click', PSAHiding.toggle PSAHiding.btn = btn = $.el 'a', - innerHTML: '' + className: 'hide-announcement fa fa-minus-square-o' title: 'Hide announcement.' - className: 'hide-announcement' href: 'javascript:;' $.on btn, 'click', PSAHiding.toggle From c6fc3428aa5473f16af4f1293365e2e149c36433 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Mon, 24 Feb 2014 21:48:35 +0100 Subject: [PATCH 07/18] $.delete needs to take into account $.localKeys. --- lib/$.coffee | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/$.coffee b/lib/$.coffee index 939c1577e..74cb1fda6 100644 --- a/lib/$.coffee +++ b/lib/$.coffee @@ -236,10 +236,17 @@ do -> $.delete = (keys) -> if typeof keys is 'string' keys = [keys] + local = [] + sync = [] for key in keys - delete items.local[key] - delete items.sync[key] - chrome.storage.sync.remove keys + if key in $.localKeys + local.push key + delete items.local[key] + else + sync.push key + delete items.sync[key] + chrome.storage.local.remove local + chrome.storage.sync.remove sync $.get = (key, val, cb) -> if typeof cb is 'function' From ac8e05dd226c5e3bf6ecdbcce6be6bd6ddf39032 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Mon, 24 Feb 2014 23:56:30 +0100 Subject: [PATCH 08/18] Simplify import/export of settings. Also clear all stored data before importing. --- html/General/Settings-section-Main.html | 11 ++++------ src/General/Settings.coffee | 29 ++++++++++--------------- 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/html/General/Settings-section-Main.html b/html/General/Settings-section-Main.html index 3af2be8c4..c2d7f086c 100644 --- a/html/General/Settings-section-Main.html +++ b/html/General/Settings-section-Main.html @@ -1,7 +1,4 @@ -
- - - - -
-

+ + + + diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index 64c9c0801..b73d9341a 100644 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -138,34 +138,29 @@ Settings = $.get Conf, (Conf) -> # XXX don't export archives. delete Conf['archives'] - Settings.downloadExport {version: g.VERSION, date: Date.now(), Conf} - downloadExport: (data) -> + Settings.downloadExport 'Settings', {version: g.VERSION, date: Date.now(), Conf} + downloadExport: (title, data) -> a = $.el 'a', - download: "<%= meta.name %> v#{g.VERSION}-#{data.date}.json" + download: "<%= meta.name %> v#{g.VERSION} #{title}.#{data.date}.json" href: "data:application/json;base64,#{btoa unescape encodeURIComponent JSON.stringify data, null, 2}" - <% if (type === 'userscript') { %> - p = $ '.imp-exp-result', Settings.dialog - $.rmAll p - $.add p, a - <% } %> + <% if (type === 'userscript') { %>$.add d.body, a<% } %> a.click() + <% if (type === 'userscript') { %>$.rm a<% } %> import: -> - $('input', @parentNode).click() + $('input[type=file]', @parentNode).click() onImport: -> return unless file = @files[0] - output = @parentNode.nextElementSibling - unless confirm 'Your current settings will be entirely overwritten, are you sure?' - output.textContent = 'Import aborted.' - return + return unless confirm 'Your current settings will be entirely overwritten, are you sure?' reader = new FileReader() reader.onload = (e) -> try Settings.loadSettings JSON.parse e.target.result - if confirm 'Import successful. Reload now?' - window.location.reload() catch err - output.textContent = 'Import failed due to an error.' + alert 'Import failed due to an error.' c.error err.stack + return + if confirm 'Import successful. Reload now?' + window.location.reload() reader.readAsText file loadSettings: (data) -> version = data.version.split '.' @@ -243,7 +238,7 @@ Settings = if data.Conf['WatchedThreads'] data.Conf['watchedThreads'] = boards: ThreadWatcher.convert data.Conf['WatchedThreads'] delete data.Conf['WatchedThreads'] - $.set data.Conf + $.clear -> $.set data.Conf reset: -> if confirm 'Your current settings will be entirely wiped, are you sure?' $.clear -> window.location.reload() if confirm 'Reset successful. Reload now?' From 4daab2b16004d1856ffa2862a4d89f2fc9772cf3 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 25 Feb 2014 01:02:00 +0100 Subject: [PATCH 09/18] Remove the
below settings nav. It's not displayed in a flex container. --- css/style.css | 2 +- html/General/Settings.html | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/css/style.css b/css/style.css index 84a85c41c..e04a08af5 100644 --- a/css/style.css +++ b/css/style.css @@ -276,7 +276,7 @@ a[href="javascript:;"] { } #fourchanx-settings > nav { display: flex; - padding: 2px 2px 0; + padding: 2px 2px .5em; } #fourchanx-settings > nav a { text-decoration: underline; diff --git a/html/General/Settings.html b/html/General/Settings.html index f4de786a9..f2f2ae111 100644 --- a/html/General/Settings.html +++ b/html/General/Settings.html @@ -11,6 +11,5 @@ -
From fba0571efb61224df46236b4feefe311fa4267a0 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 25 Feb 2014 04:25:29 +0100 Subject: [PATCH 10/18] rm dead code --- src/Miscellaneous/RelativeDates.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Miscellaneous/RelativeDates.coffee b/src/Miscellaneous/RelativeDates.coffee index 810c7bceb..76a16d522 100644 --- a/src/Miscellaneous/RelativeDates.coffee +++ b/src/Miscellaneous/RelativeDates.coffee @@ -9,7 +9,7 @@ RelativeDates = when 'thread' return unless Conf['Relative Post Dates'] @flush() - $.on d, 'visibilitychange ThreadUpdate', @flush if g.VIEW is 'thread' + $.on d, 'visibilitychange ThreadUpdate', @flush else return From 12ee5257f93516a6ff55a492a431471dc8939d8f Mon Sep 17 00:00:00 2001 From: Mayhem Date: Thu, 27 Feb 2014 00:36:30 +0100 Subject: [PATCH 11/18] warosu archives /diy/ and /sci/. --- json/archives.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json/archives.json b/json/archives.json index 33237359a..51b0262e7 100644 --- a/json/archives.json +++ b/json/archives.json @@ -77,8 +77,8 @@ "http": false, "https": true, "software": "fuuka", - "boards": ["3", "biz", "cgl", "ck", "fa", "ic", "jp", "lit", "tg", "vr"], - "files": ["3", "biz", "cgl", "ck", "fa", "ic", "jp", "lit", "tg", "vr"] + "boards": ["3", "biz", "cgl", "ck", "diy", "fa", "ic", "jp", "lit", "sci", "tg", "vr"], + "files": ["3", "biz", "cgl", "ck", "diy", "fa", "ic", "jp", "lit", "sci", "tg", "vr"] }, { "uid": 15, "name": "fgts", From 88db2d582c16f5f9c2228975c5d609b005588b71 Mon Sep 17 00:00:00 2001 From: Enzo Moretti Date: Thu, 27 Feb 2014 10:37:35 +0100 Subject: [PATCH 12/18] Adding diy/sci to Foolz --- json/archives.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/json/archives.json b/json/archives.json index 51b0262e7..2fa79ad90 100644 --- a/json/archives.json +++ b/json/archives.json @@ -5,8 +5,8 @@ "http": true, "https": true, "software": "foolfuuka", - "boards": ["a", "biz", "co", "gd", "jp", "m", "sp", "tg", "tv", "v", "vg", "vp", "vr", "wsg"], - "files": ["a", "biz", "gd", "jp", "m", "tg", "vg", "vp", "vr", "wsg"] + "boards": ["a", "biz", "co", "diy", "gd", "jp", "m", "sci", "sp", "tg", "tv", "v", "vg", "vp", "vr", "wsg"], + "files": ["a", "biz", "gd", "diy", "jp", "m", "sci", "tg", "vg", "vp", "vr", "wsg"] }, { "uid": 1, "name": "NSFW Foolz", @@ -114,6 +114,6 @@ "https": true, "withCredentials": true, "software": "foolfuuka", - "boards": ["a", "biz", "co", "d", "gd", "jp", "m", "mlp", "s4s", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"], - "files": ["a", "biz", "d", "gd", "jp", "m", "s4s", "tg", "u", "vg", "vp", "vr", "wsg"] + "boards": ["a", "biz", "co", "d", "diy", "gd", "jp", "m", "mlp", "s4s", "sci", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"], + "files": ["a", "biz", "d", "diy", "gd", "jp", "m", "s4s", "sci", "tg", "u", "vg", "vp", "vr", "wsg"] }] From 5581281c2ee85dd11c6dc5b704ea4870d3c143d2 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Thu, 27 Feb 2014 15:00:41 +0100 Subject: [PATCH 13/18] Update deps. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 398399618..00d4be137 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "grunt-contrib-copy": "~0.5.0", "grunt-contrib-watch": "~0.5.3", "grunt-shell": "~0.6.4", - "load-grunt-tasks": "~0.3.0" + "load-grunt-tasks": "~0.4.0" }, "repository": { "type": "git", From 2924711db415c22e8078b6bcd0c95bb7f17d93d1 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Thu, 27 Feb 2014 17:42:52 +0100 Subject: [PATCH 14/18] Get rid of Index.nodes, -1 Get.threadFromRoot call. --- src/General/Index.coffee | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 0e7b87a2f..562ebc2b9 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -485,12 +485,10 @@ Index = thread.collect() return buildThreads: -> - Index.nodes = [] - threads = [] - posts = [] + threads = [] + posts = [] for threadData, i in Index.liveThreadData threadRoot = Build.thread g.BOARD, threadData - Index.nodes.push threadRoot if thread = g.BOARD.threads[threadData.no] thread.setPage i // Index.threadsNumPerPage thread.setCount 'post', threadData.replies + 1, threadData.bumplimit @@ -577,7 +575,7 @@ Index = when 'filecount' sortedThreadIDs = [Index.liveThreadData...].sort((a, b) -> b.images - a.images).map (data) -> data.no Index.sortedThreads = sortedThreadIDs - .map (threadID) -> Get.threadFromRoot Index.nodes[Index.liveThreadIDs.indexOf threadID] + .map (threadID) -> g.BOARD.threads[threadID] .filter (thread) -> thread.isHidden is Index.showHiddenThreads if Index.isSearching Index.sortedThreads = Index.querySearch(Index.searchInput.value) or Index.sortedThreads From a853bd5e8e511731c011a8fe2a15801444297e79 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Thu, 27 Feb 2014 17:54:14 +0100 Subject: [PATCH 15/18] Make hiding threads on all threads index mode faster. #1484 --- src/Filtering/PostHiding.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Filtering/PostHiding.coffee b/src/Filtering/PostHiding.coffee index 50e92615a..4a92f8ec9 100644 --- a/src/Filtering/PostHiding.coffee +++ b/src/Filtering/PostHiding.coffee @@ -58,6 +58,11 @@ PostHiding = PostHiding.saveHiddenState post return if post.isReply Index.updateHideLabel() + if Conf['Index Mode'] is 'all pages' # ssllooooww + root = post.nodes.root.parentNode + $.rm root.nextElementSibling + $.rm root + return Index.sort() Index.buildIndex() From 59f2ca6a5128bfadb8c3472c9e081d2b46d7e970 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Thu, 27 Feb 2014 19:02:32 +0100 Subject: [PATCH 16/18] rm as many id attributes in posts as possible. Add root.dataset.fullID, simplify Get.postFromRoot(). Also figured Menu.toggle() could be simplified since stub of threads do not exist anymore. --- src/General/Build.coffee | 14 +++++++------- src/General/Get.coffee | 8 ++------ src/General/Header.coffee | 2 +- src/General/Post.coffee | 7 +++++-- src/Menu/Menu.coffee | 11 +---------- src/Monitoring/ThreadUpdater.coffee | 6 +++--- src/Monitoring/ThreadWatcher.coffee | 2 +- src/Quotelinks/QuoteInline.coffee | 2 +- 8 files changed, 21 insertions(+), 31 deletions(-) diff --git a/src/General/Build.coffee b/src/General/Build.coffee index 12a5d38e8..e1bfa9bae 100644 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -116,11 +116,11 @@ Build = if file?.isDeleted fileHTML = if isOP - "
" + + "
" + "" + "
" else - "
" + + "
" + "" + "
" else if file @@ -154,7 +154,7 @@ Build = filename = a.innerHTML.replace /'/g, ''' fileDims = if file.name[-3..] is 'pdf' then 'PDF' else "#{file.width}x#{file.height}" - fileInfo = "
File: #{file.timestamp}" + + fileInfo = "
File: #{file.timestamp}" + "-(#{fileSize}, #{fileDims}#{ if file.isSpoiler '' @@ -162,7 +162,7 @@ Build = ", #{shortFilename}" }" + ")
" - fileHTML = "
#{fileInfo}#{imgSrc}
" + fileHTML = "
#{fileInfo}#{imgSrc}
" else fileHTML = '' @@ -186,7 +186,7 @@ Build = id: "pc#{postID}" className: "postContainer #{if isOP then 'op' else 'reply'}Container" innerHTML: \ - (if isOP then '' else "
>>
") + + (if isOP then '' else "
>>
") + "
" + + "' diff --git a/src/General/Get.coffee b/src/General/Get.coffee index afcdbc6e2..82eccdabb 100644 --- a/src/General/Get.coffee +++ b/src/General/Get.coffee @@ -12,12 +12,8 @@ Get = threadFromNode: (node) -> Get.threadFromRoot $.x 'ancestor::div[@class="thread"]', node postFromRoot: (root) -> - link = $ 'a[title="Highlight this post"]', root - boardID = link.pathname.split('/')[1] - postID = link.hash[2..] - index = root.dataset.clone - post = g.posts["#{boardID}.#{postID}"] - if index then post.clones[index] else post + post = g.posts[root.dataset.fullID] + if index = root.dataset.clone then post.clones[index] else post postFromNode: (node) -> Get.postFromRoot $.x 'ancestor::div[contains(@class,"postContainer")][1]', node contextFromNode: (node) -> diff --git a/src/General/Header.coffee b/src/General/Header.coffee index 74eb9648a..9f072a555 100644 --- a/src/General/Header.coffee +++ b/src/General/Header.coffee @@ -266,7 +266,7 @@ Header = hashScroll: -> hash = @location.hash[1..] return unless /^p\d+$/.test(hash) and post = $.id hash - return if (Get.postFromRoot post).isHidden + return if (Get.postFromNode post).isHidden Header.scrollTo post scrollTo: (root, down, needed) -> if down diff --git a/src/General/Post.coffee b/src/General/Post.coffee index 7591ed653..f2db77261 100644 --- a/src/General/Post.coffee +++ b/src/General/Post.coffee @@ -6,9 +6,10 @@ class Post @ID = +root.id[2..] @fullID = "#{@board}.#{@ID}" - @cleanup root if that.isOriginalMarkup post = $ '.post', root info = $ '.postInfo', post + @cleanup root, post if that.isOriginalMarkup + root.dataset.fullID = @fullID @nodes = root: root post: post @@ -146,9 +147,11 @@ class Post if @file.isImage = /(jpg|png|gif)$/i.test @file.name @file.dimensions = fileText.textContent.match(/\d+x\d+/)[0] - cleanup: (root) -> + cleanup: (root, post) -> for node in $$ '.mobile', root $.rm node + for node in $$ '[id]', post + node.removeAttribute 'id' for node in $$ '.desktop', root $.rmClass node, 'desktop' return diff --git a/src/Menu/Menu.coffee b/src/Menu/Menu.coffee index 5803ed0ed..537d87e07 100644 --- a/src/Menu/Menu.coffee +++ b/src/Menu/Menu.coffee @@ -30,13 +30,4 @@ Menu = clone toggle: (e) -> - try - # Posts, inlined posts, hidden replies. - post = Get.postFromNode @ - catch - post = if fullID = @parentNode.parentNode.dataset.fullID - g.threads[fullID].OP - else - # Hidden threads. - Get.threadFromNode(@).OP - Menu.menu.toggle e, @, post + Menu.menu.toggle e, @, Get.postFromNode @ diff --git a/src/Monitoring/ThreadUpdater.coffee b/src/Monitoring/ThreadUpdater.coffee index 784c4738f..39dc11170 100644 --- a/src/Monitoring/ThreadUpdater.coffee +++ b/src/Monitoring/ThreadUpdater.coffee @@ -26,9 +26,9 @@ ThreadUpdater = cb: @node node: -> - ThreadUpdater.thread = @ - ThreadUpdater.root = @OP.nodes.root.parentNode - ThreadUpdater.lastPost = +ThreadUpdater.root.lastElementChild.id.match(/\d+/)[0] + ThreadUpdater.thread = @ + ThreadUpdater.root = @OP.nodes.root.parentNode + ThreadUpdater.lastPost = +Object.keys(@posts).sort()[-1..][0] for input in $$ 'input', ThreadUpdater.dialog if input.type is 'checkbox' diff --git a/src/Monitoring/ThreadWatcher.coffee b/src/Monitoring/ThreadWatcher.coffee index ab570ebb0..da939918c 100644 --- a/src/Monitoring/ThreadWatcher.coffee +++ b/src/Monitoring/ThreadWatcher.coffee @@ -60,7 +60,7 @@ ThreadWatcher = ThreadWatcher.refresh() $.event 'CloseMenu' toggle: -> - ThreadWatcher.toggle Get.postFromNode(@).thread + ThreadWatcher.toggle Get.threadFromNode @ rm: -> [boardID, threadID] = @parentNode.dataset.fullID.split '.' ThreadWatcher.rm boardID, +threadID diff --git a/src/Quotelinks/QuoteInline.coffee b/src/Quotelinks/QuoteInline.coffee index b61aa5af3..15510cdc8 100644 --- a/src/Quotelinks/QuoteInline.coffee +++ b/src/Quotelinks/QuoteInline.coffee @@ -17,7 +17,7 @@ QuoteInline = if $.hasClass @, 'inlined' QuoteInline.rm @, boardID, threadID, postID, context else - return if $.x "ancestor::div[@id='p#{postID}']", @ + return if $.x "ancestor::div[@id='pc#{postID}']", @ QuoteInline.add @, boardID, threadID, postID, context @classList.toggle 'inlined' From d01aea0391ff198b986e31a39ef88afacaf18f9a Mon Sep 17 00:00:00 2001 From: Haha Warosu Date: Fri, 28 Feb 2014 11:03:41 -0800 Subject: [PATCH 17/18] warosu archives /g/ --- json/archives.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json/archives.json b/json/archives.json index 2fa79ad90..eac393ce5 100644 --- a/json/archives.json +++ b/json/archives.json @@ -77,8 +77,8 @@ "http": false, "https": true, "software": "fuuka", - "boards": ["3", "biz", "cgl", "ck", "diy", "fa", "ic", "jp", "lit", "sci", "tg", "vr"], - "files": ["3", "biz", "cgl", "ck", "diy", "fa", "ic", "jp", "lit", "sci", "tg", "vr"] + "boards": ["3", "biz", "cgl", "ck", "diy", "fa", "g", "ic", "jp", "lit", "sci", "tg", "vr"], + "files": ["3", "biz", "cgl", "ck", "diy", "fa", "g", "ic", "jp", "lit", "sci", "tg", "vr"] }, { "uid": 15, "name": "fgts", From 992848ae86b646bc77d7b0cd1e79e64801a5616e Mon Sep 17 00:00:00 2001 From: Haha Warosu Date: Fri, 28 Feb 2014 11:09:53 -0800 Subject: [PATCH 18/18] 'files' means full images --- json/archives.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json/archives.json b/json/archives.json index eac393ce5..705a749b1 100644 --- a/json/archives.json +++ b/json/archives.json @@ -78,7 +78,7 @@ "https": true, "software": "fuuka", "boards": ["3", "biz", "cgl", "ck", "diy", "fa", "g", "ic", "jp", "lit", "sci", "tg", "vr"], - "files": ["3", "biz", "cgl", "ck", "diy", "fa", "g", "ic", "jp", "lit", "sci", "tg", "vr"] + "files": ["3", "biz", "cgl", "ck", "diy", "fa", "ic", "jp", "lit", "sci", "tg", "vr"] }, { "uid": 15, "name": "fgts",