diff --git a/Makefile b/Makefile index 2b3dc5306..3cf5ab534 100644 --- a/Makefile +++ b/Makefile @@ -36,8 +36,7 @@ sources_Config := \ sources_API := \ src/General/$$.coffee \ src/General/$$$$.coffee \ - src/General/CrossOrigin.coffee \ - src/Images/ImageCommon.coffee + src/General/CrossOrigin.coffee sources_classes := $(call sort_dir,classes) @@ -47,16 +46,9 @@ sources_General := \ ,$(call sort_dir,General)) $(foreach d, \ - Archive Filtering \ + Archive Filtering Images Linkification Menu Miscellaneous Monitoring Posting Quotelinks \ ,$(eval sources_$(d) := $(call sort_dir,$(d)))) -sources_Images := \ - $(filter-out %/ImageCommon.coffee,$(call sort_dir,Images)) - -$(foreach d, \ - Linkification Menu Miscellaneous Monitoring Posting Quotelinks \ -S ,$(eval sources_$(d) := $(call sort_dir,$(d)))) - sources_Main := \ src/General/Main.coffee diff --git a/src/Images/ImageCommon.coffee b/src/Images/ImageCommon.coffee index a5adc925a..c8d421543 100644 --- a/src/Images/ImageCommon.coffee +++ b/src/Images/ImageCommon.coffee @@ -50,20 +50,8 @@ ImageCommon = clearTimeout timeoutID if delay? cb URL - <% if (type === 'crx') { %> - $.ajax post.file.url, - onloadend: -> - if @status is 200 - URL = post.file.url - else - post.kill true if @status is 404 - redirect() - , - type: 'head' - <% } else { %> - # XXX CORS for i.4cdn.org WHEN? $.ajax "//a.4cdn.org/#{post.board}/thread/#{post.thread}.json", onload: -> - post.kill() if @status is 404 + post.kill !post.isClone if @status is 404 return redirect() if @status isnt 200 for postObj in @response.posts break if postObj.no is post.ID @@ -75,7 +63,6 @@ ImageCommon = redirect() else URL = post.file.url - <% } %> # Add controls, but not until the mouse is moved over the video. addControls: (video) -> diff --git a/src/classes/Post.coffee b/src/classes/Post.coffee index 9598f8c76..ebd7a2f5e 100644 --- a/src/classes/Post.coffee +++ b/src/classes/Post.coffee @@ -207,18 +207,18 @@ class Post kill: (file) -> if file - return if @file.isDead + return if @isDead or @file.isDead @file.isDead = true $.addClass @nodes.root, 'deleted-file' else return if @isDead @isDead = true + $.rmClass @nodes.root, 'deleted-file' $.addClass @nodes.root, 'deleted-post' - unless strong = $ 'strong.warning', @nodes.info + unless (strong = $ 'strong.warning', @nodes.info) strong = $.el 'strong', - className: 'warning' - textContent: if @isReply then '[Deleted]' else '[Dead]' + className: 'warning' $.after $('input', @nodes.info), strong strong.textContent = if file then '[File deleted]' else '[Deleted]'