diff --git a/src/General/Build.coffee b/src/General/Build.coffee index 946ca1f3d..6ecd74d87 100755 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -42,14 +42,14 @@ Build = name: data.filename + data.ext timestamp: "#{data.tim}#{data.ext}" url: if boardID is 'f' - "//i.4cdn.org/#{boardID}/src/#{data.filename}#{data.ext}" + "//i.4cdn.org/#{boardID}/#{data.filename}#{data.ext}" else - "//i.4cdn.org/#{boardID}/src/#{data.tim}#{data.ext}" + "//i.4cdn.org/#{boardID}/#{data.tim}#{data.ext}" height: data.h width: data.w MD5: data.md5 size: data.fsize - turl: "//#{Build.thumbRotate()}.t.4cdn.org/#{boardID}/thumb/#{data.tim}s.jpg" + turl: "//#{Build.thumbRotate()}.t.4cdn.org/#{boardID}/#{data.tim}s.jpg" theight: data.tn_h twidth: data.tn_w isSpoiler: !!data.spoiler @@ -188,7 +188,7 @@ Build = pageIcon = '' if isOP and g.VIEW is 'index' - replyLink = "   [Reply]" + replyLink = "   [Reply]" else replyLink = '' @@ -200,7 +200,7 @@ Build = for quote in $$ '.quotelink', container href = quote.getAttribute 'href' continue if href[0] is '/' # Cross-board quote, or board link - quote.href = "/#{boardID}/res/#{href}" # Fix pathnames + quote.href = "/#{boardID}/thread/#{href}" # Fix pathnames container @@ -212,7 +212,7 @@ Build = $.el 'a', className: 'summary' textContent: text.join ' ' - href: "/#{boardID}/res/#{threadID}" + href: "/#{boardID}/thread/#{threadID}" thread: (board, data, full) -> Build.spoilerRange[board] = data.custom_spoiler diff --git a/src/General/Get.coffee b/src/General/Get.coffee index 7b74973ee..14d6b4331 100755 --- a/src/General/Get.coffee +++ b/src/General/Get.coffee @@ -74,7 +74,7 @@ Get = root.textContent = "Loading post No.#{postID}..." if threadID - $.cache "//a.4cdn.org/#{boardID}/res/#{threadID}.json", -> + $.cache "//a.4cdn.org/#{boardID}/thread/#{threadID}.json", -> Get.fetchedPost @, boardID, threadID, postID, root, context else if url = Redirect.to 'post', {boardID, postID} $.cache url, @@ -203,7 +203,7 @@ Get = width: data.media.media_w MD5: data.media.media_hash size: data.media.media_size - turl: data.media.thumb_link or "//t.4cdn.org/#{boardID}/thumb/#{data.media.preview_orig}" + turl: data.media.thumb_link or "//t.4cdn.org/#{boardID}/#{data.media.preview_orig}" theight: data.media.preview_h twidth: data.media.preview_w isSpoiler: data.media.spoiler is '1' diff --git a/src/General/Navigate.coffee b/src/General/Navigate.coffee index e179707c5..164ce63fc 100644 --- a/src/General/Navigate.coffee +++ b/src/General/Navigate.coffee @@ -222,7 +222,7 @@ Navigate = else Navigate.updateSFW Favicon.SFW {load} = Navigate - Navigate.req = $.ajax "//a.4cdn.org/#{boardID}/res/#{threadID}.json", + Navigate.req = $.ajax "//a.4cdn.org/#{boardID}/thread/#{threadID}.json", onabort: load onloadend: load diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index f276ea0cf..a80d27757 100755 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -394,7 +394,7 @@ Settings = data = isReply: true file: - URL: '//i.4cdn.org/g/src/1334437723720.jpg' + URL: '//i.4cdn.org/g/1334437723720.jpg' name: 'd9bb2efc98dd0df141a94399ff5880b7.jpg' size: '276 KB' sizeInBytes: 276 * 1024 diff --git a/src/General/html/Build/post.html b/src/General/html/Build/post.html index 1773310e9..5fabd2f5a 100755 --- a/src/General/html/Build/post.html +++ b/src/General/html/Build/post.html @@ -18,12 +18,12 @@ #{" "} #{date}#{' '} - No. + No. #{postID} #{pageIcon + sticky + closed + replyLink} diff --git a/src/General/lib/post.class b/src/General/lib/post.class index 8b264a3f9..a42c49129 100755 --- a/src/General/lib/post.class +++ b/src/General/lib/post.class @@ -129,7 +129,7 @@ class Post @file.thumbURL = if that.isArchived thumb.src else - "#{location.protocol}//t.4cdn.org/#{@board}/thumb/#{@file.URL.match(/(\d+)\./)[1]}s.jpg" + "#{location.protocol}//t.4cdn.org/#{@board}/#{@file.URL.match(/(\d+)\./)[1]}s.jpg" @file.isImage = /(jpg|png|gif)$/i.test @file.URL @file.isVideo = /webm$/i.test @file.URL if @file.isImage or @file.isVideo diff --git a/src/Images/Gallery.coffee b/src/Images/Gallery.coffee index 369aaf496..a8eb0a7c2 100644 --- a/src/Images/Gallery.coffee +++ b/src/Images/Gallery.coffee @@ -207,7 +207,7 @@ Gallery = return # XXX CORS for i.4cdn.org WHEN? - $.ajax "//a.4cdn.org/#{post.board}/res/#{post.thread}.json", onload: -> + $.ajax "//a.4cdn.org/#{post.board}/thread/#{post.thread}.json", onload: -> return if @status isnt 200 i = 0 {posts} = @response diff --git a/src/Images/ImageExpand.coffee b/src/Images/ImageExpand.coffee index f6ebc0515..cf10579b7 100755 --- a/src/Images/ImageExpand.coffee +++ b/src/Images/ImageExpand.coffee @@ -224,7 +224,7 @@ ImageExpand = type: 'head' <% } else { %> # XXX CORS for i.4cdn.org WHEN? - $.ajax "//a.4cdn.org/#{post.board}/res/#{post.thread}.json", onload: -> + $.ajax "//a.4cdn.org/#{post.board}/thread/#{post.thread}.json", onload: -> return if @status isnt 200 for postObj in @response.posts break if postObj.no is post.ID diff --git a/src/Images/ImageHover.coffee b/src/Images/ImageHover.coffee index 2df4fdcc9..9fd59d066 100755 --- a/src/Images/ImageHover.coffee +++ b/src/Images/ImageHover.coffee @@ -70,7 +70,7 @@ ImageHover = type: 'head' <% } else { %> # XXX CORS for i.4cdn.org WHEN? - $.ajax "//a.4cdn.org/#{post.board}/res/#{post.thread}.json", onload: -> + $.ajax "//a.4cdn.org/#{post.board}/thread/#{post.thread}.json", onload: -> return if @status isnt 200 for postObj in @response.posts break if postObj.no is post.ID diff --git a/src/Miscellaneous/ExpandComment.coffee b/src/Miscellaneous/ExpandComment.coffee index b6f624de9..a3c1c7362 100755 --- a/src/Miscellaneous/ExpandComment.coffee +++ b/src/Miscellaneous/ExpandComment.coffee @@ -52,7 +52,7 @@ ExpandComment = for quote in $$ '.quotelink', clone href = quote.getAttribute 'href' continue if href[0] is '/' # Cross-board quote, or board link - quote.href = "/#{post.board}/res/#{href}" # Fix pathnames + quote.href = "/#{post.board}/thread/#{href}" # Fix pathnames post.nodes.shortComment = comment $.replace comment, clone post.nodes.comment = post.nodes.longComment = clone diff --git a/src/Miscellaneous/ExpandThread.coffee b/src/Miscellaneous/ExpandThread.coffee index 30ad6d305..ef2693d33 100755 --- a/src/Miscellaneous/ExpandThread.coffee +++ b/src/Miscellaneous/ExpandThread.coffee @@ -48,7 +48,7 @@ ExpandThread = expand: (thread, a, threadRoot) -> ExpandThread.statuses[thread] = status = {} a.textContent = ExpandThread.text '...', a.textContent.match(/\d+/g)... - status.req = $.cache "//a.4cdn.org/#{thread.board}/res/#{thread}.json", -> + status.req = $.cache "//a.4cdn.org/#{thread.board}/thread/#{thread}.json", -> delete status.req ExpandThread.parse @, thread, a contract: (thread, a, threadRoot) -> diff --git a/src/Miscellaneous/InfiniScroll.coffee b/src/Miscellaneous/InfiniScroll.coffee index cd37c6692..e80e7d32e 100644 --- a/src/Miscellaneous/InfiniScroll.coffee +++ b/src/Miscellaneous/InfiniScroll.coffee @@ -48,19 +48,19 @@ InfiniScroll = posts.push op replylink = $.el 'a', - href: "res/#{threadID}" + href: "thread/#{threadID}" className: 'replylink' textContent: 'Reply' postlink = $.el 'div', className: "postLink mobile" - innerHTML: """View Thread""" + innerHTML: """View Thread""" if omitted_posts posts.push $.el 'span', className: 'summary desktop' innerHTML: """ - #{omitted_posts} posts #{if omitted_images then "and " + omitted_images + " image replies"} omitted. Click here to view. + #{omitted_posts} posts #{if omitted_images then "and " + omitted_images + " image replies"} omitted. Click here to view. """ $.prepend postlink, $.el 'span', diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index ebff9eb57..e8d77f653 100755 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -217,7 +217,7 @@ Keybinds = open: (thread, tab) -> return if g.VIEW isnt 'index' - url = "/#{thread.board}/res/#{thread}" + url = "/#{thread.board}/thread/#{thread}" if tab $.open url else diff --git a/src/Monitoring/ThreadUpdater.coffee b/src/Monitoring/ThreadUpdater.coffee index 3e553895b..5dbc6f0bc 100755 --- a/src/Monitoring/ThreadUpdater.coffee +++ b/src/Monitoring/ThreadUpdater.coffee @@ -243,7 +243,7 @@ ThreadUpdater = else ThreadUpdater.set 'timer', 'Update' ThreadUpdater.req?.abort() - url = "//a.4cdn.org/#{ThreadUpdater.thread.board}/res/#{ThreadUpdater.thread}.json" + url = "//a.4cdn.org/#{ThreadUpdater.thread.board}/thread/#{ThreadUpdater.thread}.json" ThreadUpdater.req = $.ajax url, onloadend: ThreadUpdater.cb.load, whenModified: true diff --git a/src/Monitoring/ThreadWatcher.coffee b/src/Monitoring/ThreadWatcher.coffee index 35b4ce447..022a6aece 100755 --- a/src/Monitoring/ThreadWatcher.coffee +++ b/src/Monitoring/ThreadWatcher.coffee @@ -123,7 +123,7 @@ ThreadWatcher = return if data.isDead {fetchCount} = ThreadWatcher fetchCount.fetching++ - $.ajax "//a.4cdn.org/#{boardID}/res/#{threadID}.json", + $.ajax "//a.4cdn.org/#{boardID}/thread/#{threadID}.json", onloadend: -> fetchCount.fetched++ if fetchCount.fetched is fetchCount.fetching @@ -161,7 +161,7 @@ ThreadWatcher = if data.isDead href = Redirect.to 'thread', {boardID, threadID} link = $.el 'a', - href: href or "/#{boardID}/res/#{threadID}" + href: href or "/#{boardID}/thread/#{threadID}" textContent: data.excerpt title: data.excerpt diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 35d986610..55b051cc2 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -795,9 +795,9 @@ QR = QR.cooldown.set {req, post, isReply, threadID} URL = if threadID is postID # new thread - "/#{g.BOARD}/res/#{threadID}" + "/#{g.BOARD}/thread/#{threadID}" else if g.VIEW is 'index' and !QR.cooldown.auto and Conf['Open Post in New Tab'] # replying from the index - "/#{g.BOARD}/res/#{threadID}#p#{postID}" + "/#{g.BOARD}/thread/#{threadID}#p#{postID}" if URL if Conf['Open Post in New Tab'] $.open URL diff --git a/src/Quotelinks/QuoteBacklink.coffee b/src/Quotelinks/QuoteBacklink.coffee index 334965ab1..c033482b1 100755 --- a/src/Quotelinks/QuoteBacklink.coffee +++ b/src/Quotelinks/QuoteBacklink.coffee @@ -26,7 +26,7 @@ QuoteBacklink = return if @isClone or !@quotes.length markYours = Conf['Quick Reply'] and Conf['Mark Quotes of You'] and QR.db.get {boardID: @board.ID, threadID: @thread.ID, postID: @ID} a = $.el 'a', - href: "/#{@board}/res/#{@thread}#p#{@}" + href: "/#{@board}/thread/#{@thread}#p#{@}" className: if @isHidden then 'filtered backlink' else 'backlink' textContent: (QuoteBacklink.funk @ID) + (if markYours then '\u00A0(You)' else '') for quote in @quotes diff --git a/src/Quotelinks/Quotify.coffee b/src/Quotelinks/Quotify.coffee index efccdcd83..1acfe0378 100755 --- a/src/Quotelinks/Quotify.coffee +++ b/src/Quotelinks/Quotify.coffee @@ -45,13 +45,13 @@ Quotify = # Don't (Dead) when quotifying in an archived post, # and we know the post still exists. a = $.el 'a', - href: "/#{boardID}/res/#{post.thread}#p#{postID}" + href: "/#{boardID}/thread/#{post.thread}#p#{postID}" className: 'quotelink' textContent: quote else # Replace the .deadlink span if we can redirect. a = $.el 'a', - href: "/#{boardID}/res/#{post.thread}#p#{postID}" + href: "/#{boardID}/thread/#{post.thread}#p#{postID}" className: 'quotelink deadlink' target: '_blank' textContent: "#{quote}\u00A0(Dead)"