From 44feaf4eb700d13b218076bc11188cd5cdeab9f4 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Fri, 8 Mar 2019 20:54:41 -0800 Subject: [PATCH] Eliminate use of onabort and event in Index.coffee. --- src/General/Index.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 8acf0e7bc..0b5540c1d 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -573,6 +573,7 @@ Index = "#{hiddenCount} hidden threads" update: (firstTime) -> + Index.req?.aborted = true Index.req?.abort() Index.notice?.close() @@ -594,13 +595,12 @@ Index = return Index.req = $.ajax "#{location.protocol}//a.4cdn.org/#{g.BOARD}/catalog.json", - onabort: Index.load onloadend: Index.load , whenModified: 'Index' $.addClass Index.button, 'fa-spin' - load: (e) -> + load: -> $.rmClass Index.button, 'fa-spin' {req, notice, nTimeout} = Index clearTimeout nTimeout if nTimeout @@ -608,7 +608,7 @@ Index = delete Index.req delete Index.notice - if e.type is 'abort' + if req.aborted req.onloadend = null notice?.close() return