From 10e93091d7ebc87adf00b71602307889b5679e84 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Wed, 2 Oct 2013 11:38:15 +0200 Subject: [PATCH] {Post,Thread}::callbacks => {Post,Thread}.callbacks --- src/Filtering/Filter.coffee | 2 +- src/Filtering/PostHiding.coffee | 2 +- src/Filtering/Recursive.coffee | 2 +- src/Filtering/ThreadHiding.coffee | 2 +- src/General/Main.coffee | 4 ++-- src/General/Post.coffee | 2 +- src/General/Thread.coffee | 2 +- src/Images/AutoGIF.coffee | 2 +- src/Images/ImageExpand.coffee | 2 +- src/Images/ImageHover.coffee | 2 +- src/Images/RevealSpoilers.coffee | 2 +- src/Images/Sauce.coffee | 2 +- src/Linkification/Linkify.coffee | 2 +- src/Menu/Menu.coffee | 2 +- src/Miscellaneous/Anonymize.coffee | 2 +- src/Miscellaneous/Dice.coffee | 2 +- src/Miscellaneous/ExpandComment.coffee | 2 +- src/Miscellaneous/ExpandThread.coffee | 2 +- src/Miscellaneous/FileInfo.coffee | 2 +- src/Miscellaneous/Fourchan.coffee | 4 ++-- src/Miscellaneous/IDColor.coffee | 2 +- src/Miscellaneous/RelativeDates.coffee | 2 +- src/Miscellaneous/Time.coffee | 2 +- src/Monitoring/ThreadExcerpt.coffee | 2 +- src/Monitoring/ThreadStats.coffee | 2 +- src/Monitoring/ThreadUpdater.coffee | 2 +- src/Monitoring/ThreadWatcher.coffee | 2 +- src/Monitoring/Unread.coffee | 2 +- src/Posting/QR.coffee | 2 +- src/Quotelinks/QuoteBacklink.coffee | 4 ++-- src/Quotelinks/QuoteCT.coffee | 2 +- src/Quotelinks/QuoteInline.coffee | 2 +- src/Quotelinks/QuoteOP.coffee | 2 +- src/Quotelinks/QuotePreview.coffee | 2 +- src/Quotelinks/QuoteStrikeThrough.coffee | 2 +- src/Quotelinks/QuoteYou.coffee | 2 +- src/Quotelinks/Quotify.coffee | 2 +- 37 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/Filtering/Filter.coffee b/src/Filtering/Filter.coffee index 2286359c1..1f1387dba 100644 --- a/src/Filtering/Filter.coffee +++ b/src/Filtering/Filter.coffee @@ -64,7 +64,7 @@ Filter = delete @filters[key] return unless Object.keys(@filters).length - Post::callbacks.push + Post.callbacks.push name: 'Filter' cb: @node diff --git a/src/Filtering/PostHiding.coffee b/src/Filtering/PostHiding.coffee index 74bef51d8..fc6e302d3 100644 --- a/src/Filtering/PostHiding.coffee +++ b/src/Filtering/PostHiding.coffee @@ -3,7 +3,7 @@ PostHiding = return if g.VIEW is 'catalog' or !Conf['Reply Hiding'] and !Conf['Reply Hiding Link'] @db = new DataBoard 'hiddenPosts' - Post::callbacks.push + Post.callbacks.push name: 'Reply Hiding' cb: @node diff --git a/src/Filtering/Recursive.coffee b/src/Filtering/Recursive.coffee index 70cd1842c..da5496ceb 100644 --- a/src/Filtering/Recursive.coffee +++ b/src/Filtering/Recursive.coffee @@ -3,7 +3,7 @@ Recursive = init: -> return if g.VIEW is 'catalog' - Post::callbacks.push + Post.callbacks.push name: 'Recursive' cb: @node diff --git a/src/Filtering/ThreadHiding.coffee b/src/Filtering/ThreadHiding.coffee index 65fd05f0a..21bd4c211 100644 --- a/src/Filtering/ThreadHiding.coffee +++ b/src/Filtering/ThreadHiding.coffee @@ -4,7 +4,7 @@ ThreadHiding = @db = new DataBoard 'hiddenThreads' @syncCatalog() - Thread::callbacks.push + Thread.callbacks.push name: 'Thread Hiding' cb: @node diff --git a/src/General/Main.coffee b/src/General/Main.coffee index 4ba842fc2..2d7d1c3e6 100644 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -206,7 +206,7 @@ Main = callbackNodes: (klass, nodes) -> # get the nodes' length only once len = nodes.length - for callback in klass::callbacks + for callback in klass.callbacks # c.profile callback.name for i in [0...len] by 1 node = nodes[i] @@ -233,7 +233,7 @@ Main = else return obj.callback.isAddon = true - Klass::callbacks.push obj.callback + Klass.callbacks.push obj.callback handleErrors: (errors) -> unless errors instanceof Array diff --git a/src/General/Post.coffee b/src/General/Post.coffee index 0d2cbc293..27811afa5 100644 --- a/src/General/Post.coffee +++ b/src/General/Post.coffee @@ -1,5 +1,5 @@ class Post - callbacks: [] + @callbacks = [] toString: -> @ID constructor: (root, @thread, @board, that={}) -> diff --git a/src/General/Thread.coffee b/src/General/Thread.coffee index 57d82a316..1f15bf714 100644 --- a/src/General/Thread.coffee +++ b/src/General/Thread.coffee @@ -1,5 +1,5 @@ class Thread - callbacks: [] + @callbacks = [] toString: -> @ID constructor: (@ID, @board) -> diff --git a/src/Images/AutoGIF.coffee b/src/Images/AutoGIF.coffee index 3e1e45fd3..71ccc7d8e 100644 --- a/src/Images/AutoGIF.coffee +++ b/src/Images/AutoGIF.coffee @@ -2,7 +2,7 @@ AutoGIF = init: -> return if g.VIEW is 'catalog' or !Conf['Auto-GIF'] or g.BOARD.ID in ['gif', 'wsg'] - Post::callbacks.push + Post.callbacks.push name: 'Auto-GIF' cb: @node node: -> diff --git a/src/Images/ImageExpand.coffee b/src/Images/ImageExpand.coffee index a64b75458..b8e8e7b15 100644 --- a/src/Images/ImageExpand.coffee +++ b/src/Images/ImageExpand.coffee @@ -9,7 +9,7 @@ ImageExpand = $.on @EAI, 'click', ImageExpand.cb.toggleAll Header.addShortcut @EAI, 2 - Post::callbacks.push + Post.callbacks.push name: 'Image Expansion' cb: @node node: -> diff --git a/src/Images/ImageHover.coffee b/src/Images/ImageHover.coffee index 50745f51b..c2c1eac99 100644 --- a/src/Images/ImageHover.coffee +++ b/src/Images/ImageHover.coffee @@ -2,7 +2,7 @@ ImageHover = init: -> return if g.VIEW is 'catalog' or !Conf['Image Hover'] - Post::callbacks.push + Post.callbacks.push name: 'Image Hover' cb: @node node: -> diff --git a/src/Images/RevealSpoilers.coffee b/src/Images/RevealSpoilers.coffee index 2ac424c3f..52f7dffe6 100644 --- a/src/Images/RevealSpoilers.coffee +++ b/src/Images/RevealSpoilers.coffee @@ -2,7 +2,7 @@ RevealSpoilers = init: -> return if g.VIEW is 'catalog' or !Conf['Reveal Spoilers'] - Post::callbacks.push + Post.callbacks.push name: 'Reveal Spoilers' cb: @node node: -> diff --git a/src/Images/Sauce.coffee b/src/Images/Sauce.coffee index 2f0167682..10ffeff95 100644 --- a/src/Images/Sauce.coffee +++ b/src/Images/Sauce.coffee @@ -11,7 +11,7 @@ Sauce = return unless links.length @links = links @link = $.el 'a', target: '_blank' - Post::callbacks.push + Post.callbacks.push name: 'Sauce' cb: @node createSauceLink: (link) -> diff --git a/src/Linkification/Linkify.coffee b/src/Linkification/Linkify.coffee index 91247de5a..845d9b9a5 100644 --- a/src/Linkification/Linkify.coffee +++ b/src/Linkification/Linkify.coffee @@ -39,7 +39,7 @@ Linkify = ) ///g - Post::callbacks.push + Post.callbacks.push name: 'Linkify' cb: @node diff --git a/src/Menu/Menu.coffee b/src/Menu/Menu.coffee index 94ed4896d..4dd5e1eb3 100644 --- a/src/Menu/Menu.coffee +++ b/src/Menu/Menu.coffee @@ -3,7 +3,7 @@ Menu = return if g.VIEW is 'catalog' or !Conf['Menu'] @menu = new UI.Menu 'post' - Post::callbacks.push + Post.callbacks.push name: 'Menu' cb: @node diff --git a/src/Miscellaneous/Anonymize.coffee b/src/Miscellaneous/Anonymize.coffee index d5b80f99c..414c428e5 100644 --- a/src/Miscellaneous/Anonymize.coffee +++ b/src/Miscellaneous/Anonymize.coffee @@ -2,7 +2,7 @@ Anonymize = init: -> return if g.VIEW is 'catalog' or !Conf['Anonymize'] - Post::callbacks.push + Post.callbacks.push name: 'Anonymize' cb: @node node: -> diff --git a/src/Miscellaneous/Dice.coffee b/src/Miscellaneous/Dice.coffee index 7b7a3c386..d02698344 100644 --- a/src/Miscellaneous/Dice.coffee +++ b/src/Miscellaneous/Dice.coffee @@ -1,7 +1,7 @@ Dice = init: -> return if g.BOARD.ID isnt 'tg' or g.VIEW is 'catalog' or !Conf['Show Dice Roll'] - Post::callbacks.push + Post.callbacks.push name: 'Show Dice Roll' cb: @node node: -> diff --git a/src/Miscellaneous/ExpandComment.coffee b/src/Miscellaneous/ExpandComment.coffee index e292d65ad..103c891e5 100644 --- a/src/Miscellaneous/ExpandComment.coffee +++ b/src/Miscellaneous/ExpandComment.coffee @@ -2,7 +2,7 @@ ExpandComment = init: -> return if g.VIEW isnt 'index' or !Conf['Comment Expansion'] - Post::callbacks.push + Post.callbacks.push name: 'Comment Expansion' cb: @node node: -> diff --git a/src/Miscellaneous/ExpandThread.coffee b/src/Miscellaneous/ExpandThread.coffee index b4733d397..fe2305bdc 100644 --- a/src/Miscellaneous/ExpandThread.coffee +++ b/src/Miscellaneous/ExpandThread.coffee @@ -2,7 +2,7 @@ ExpandThread = init: -> return if g.VIEW isnt 'index' or !Conf['Thread Expansion'] - Thread::callbacks.push + Thread.callbacks.push name: 'Thread Expansion' cb: @node node: -> diff --git a/src/Miscellaneous/FileInfo.coffee b/src/Miscellaneous/FileInfo.coffee index 9a3aac4bd..89d694313 100644 --- a/src/Miscellaneous/FileInfo.coffee +++ b/src/Miscellaneous/FileInfo.coffee @@ -3,7 +3,7 @@ FileInfo = return if g.VIEW is 'catalog' or !Conf['File Info Formatting'] @funk = @createFunc Conf['fileInfo'] - Post::callbacks.push + Post.callbacks.push name: 'File Info Formatting' cb: @node node: -> diff --git a/src/Miscellaneous/Fourchan.coffee b/src/Miscellaneous/Fourchan.coffee index 95f418ab4..64b1f4562 100644 --- a/src/Miscellaneous/Fourchan.coffee +++ b/src/Miscellaneous/Fourchan.coffee @@ -10,7 +10,7 @@ Fourchan = pre.innerHTML = prettyPrintOne(pre.innerHTML); }, false); """ - Post::callbacks.push + Post.callbacks.push name: 'Parse /g/ code' cb: @code if board is 'sci' @@ -27,7 +27,7 @@ Fourchan = } }, false); """ - Post::callbacks.push + Post.callbacks.push name: 'Parse /sci/ math' cb: @math code: -> diff --git a/src/Miscellaneous/IDColor.coffee b/src/Miscellaneous/IDColor.coffee index def9ee3c7..1fbdd5718 100644 --- a/src/Miscellaneous/IDColor.coffee +++ b/src/Miscellaneous/IDColor.coffee @@ -3,7 +3,7 @@ IDColor = return if g.VIEW is 'catalog' or !Conf['Color User IDs'] @ids = {} - Post::callbacks.push + Post.callbacks.push name: 'Color User IDs' cb: @node diff --git a/src/Miscellaneous/RelativeDates.coffee b/src/Miscellaneous/RelativeDates.coffee index 49904bb5e..d678ecb23 100644 --- a/src/Miscellaneous/RelativeDates.coffee +++ b/src/Miscellaneous/RelativeDates.coffee @@ -9,7 +9,7 @@ RelativeDates = # Start the timeout. @flush() - Post::callbacks.push + Post.callbacks.push name: 'Relative Post Dates' cb: @node node: -> diff --git a/src/Miscellaneous/Time.coffee b/src/Miscellaneous/Time.coffee index 0f054283a..60239f627 100644 --- a/src/Miscellaneous/Time.coffee +++ b/src/Miscellaneous/Time.coffee @@ -3,7 +3,7 @@ Time = return if g.VIEW is 'catalog' or !Conf['Time Formatting'] @funk = @createFunc Conf['time'] - Post::callbacks.push + Post.callbacks.push name: 'Time Formatting' cb: @node node: -> diff --git a/src/Monitoring/ThreadExcerpt.coffee b/src/Monitoring/ThreadExcerpt.coffee index a39ade0b2..dc55c1b04 100644 --- a/src/Monitoring/ThreadExcerpt.coffee +++ b/src/Monitoring/ThreadExcerpt.coffee @@ -2,7 +2,7 @@ ThreadExcerpt = init: -> return if g.VIEW isnt 'thread' or !Conf['Thread Excerpt'] - Thread::callbacks.push + Thread.callbacks.push name: 'Thread Excerpt' cb: @node node: -> diff --git a/src/Monitoring/ThreadStats.coffee b/src/Monitoring/ThreadStats.coffee index 6f35f6224..f80154cae 100644 --- a/src/Monitoring/ThreadStats.coffee +++ b/src/Monitoring/ThreadStats.coffee @@ -9,7 +9,7 @@ ThreadStats = @fileCountEl = $ '#file-count', @dialog @pageCountEl = $ '#page-count', @dialog - Thread::callbacks.push + Thread.callbacks.push name: 'Thread Stats' cb: @node node: -> diff --git a/src/Monitoring/ThreadUpdater.coffee b/src/Monitoring/ThreadUpdater.coffee index 9b91c1c5d..677db825d 100644 --- a/src/Monitoring/ThreadUpdater.coffee +++ b/src/Monitoring/ThreadUpdater.coffee @@ -16,7 +16,7 @@ ThreadUpdater = @status = $ '#update-status', @dialog @isUpdating = Conf['Auto Update'] - Thread::callbacks.push + Thread.callbacks.push name: 'Thread Updater' cb: @node diff --git a/src/Monitoring/ThreadWatcher.coffee b/src/Monitoring/ThreadWatcher.coffee index 801890731..a682d8df0 100644 --- a/src/Monitoring/ThreadWatcher.coffee +++ b/src/Monitoring/ThreadWatcher.coffee @@ -19,7 +19,7 @@ ThreadWatcher = ThreadWatcher.fetchAllStatus() @db.save() - Thread::callbacks.push + Thread.callbacks.push name: 'Thread Watcher' cb: @node node: -> diff --git a/src/Monitoring/Unread.coffee b/src/Monitoring/Unread.coffee index 6ccdf0244..081f82c41 100644 --- a/src/Monitoring/Unread.coffee +++ b/src/Monitoring/Unread.coffee @@ -8,7 +8,7 @@ Unread = @posts = [] @postsQuotingYou = [] - Thread::callbacks.push + Thread.callbacks.push name: 'Unread' cb: @node diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index e7515d60c..c65a13b61 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -9,7 +9,7 @@ QR = $.on d, '4chanXInitFinished', @initReady - Post::callbacks.push + Post.callbacks.push name: 'Quick Reply' cb: @node diff --git a/src/Quotelinks/QuoteBacklink.coffee b/src/Quotelinks/QuoteBacklink.coffee index ba64b49e3..cb407e50e 100644 --- a/src/Quotelinks/QuoteBacklink.coffee +++ b/src/Quotelinks/QuoteBacklink.coffee @@ -16,10 +16,10 @@ QuoteBacklink = format = Conf['backlink'].replace /%id/g, "' + id + '" @funk = Function 'id', "return '#{format}'" @containers = {} - Post::callbacks.push + Post.callbacks.push name: 'Quote Backlinking Part 1' cb: @firstNode - Post::callbacks.push + Post.callbacks.push name: 'Quote Backlinking Part 2' cb: @secondNode firstNode: -> diff --git a/src/Quotelinks/QuoteCT.coffee b/src/Quotelinks/QuoteCT.coffee index 92cd9dcbc..9ba959acd 100644 --- a/src/Quotelinks/QuoteCT.coffee +++ b/src/Quotelinks/QuoteCT.coffee @@ -4,7 +4,7 @@ QuoteCT = # \u00A0 is nbsp @text = '\u00A0(Cross-thread)' - Post::callbacks.push + Post.callbacks.push name: 'Mark Cross-thread Quotes' cb: @node node: -> diff --git a/src/Quotelinks/QuoteInline.coffee b/src/Quotelinks/QuoteInline.coffee index 6a00bdba8..526bf75fc 100644 --- a/src/Quotelinks/QuoteInline.coffee +++ b/src/Quotelinks/QuoteInline.coffee @@ -2,7 +2,7 @@ QuoteInline = init: -> return if g.VIEW is 'catalog' or !Conf['Quote Inlining'] - Post::callbacks.push + Post.callbacks.push name: 'Quote Inlining' cb: @node node: -> diff --git a/src/Quotelinks/QuoteOP.coffee b/src/Quotelinks/QuoteOP.coffee index 12fec65dc..4e80520ff 100644 --- a/src/Quotelinks/QuoteOP.coffee +++ b/src/Quotelinks/QuoteOP.coffee @@ -4,7 +4,7 @@ QuoteOP = # \u00A0 is nbsp @text = '\u00A0(OP)' - Post::callbacks.push + Post.callbacks.push name: 'Mark OP Quotes' cb: @node node: -> diff --git a/src/Quotelinks/QuotePreview.coffee b/src/Quotelinks/QuotePreview.coffee index ab21dfa78..1b1694344 100644 --- a/src/Quotelinks/QuotePreview.coffee +++ b/src/Quotelinks/QuotePreview.coffee @@ -2,7 +2,7 @@ QuotePreview = init: -> return if g.VIEW is 'catalog' or !Conf['Quote Previewing'] - Post::callbacks.push + Post.callbacks.push name: 'Quote Previewing' cb: @node node: -> diff --git a/src/Quotelinks/QuoteStrikeThrough.coffee b/src/Quotelinks/QuoteStrikeThrough.coffee index 413f38d39..b24273322 100644 --- a/src/Quotelinks/QuoteStrikeThrough.coffee +++ b/src/Quotelinks/QuoteStrikeThrough.coffee @@ -2,7 +2,7 @@ QuoteStrikeThrough = init: -> return if g.VIEW is 'catalog' or !Conf['Reply Hiding'] and !Conf['Reply Hiding Link'] and !Conf['Filter'] - Post::callbacks.push + Post.callbacks.push name: 'Strike-through Quotes' cb: @node diff --git a/src/Quotelinks/QuoteYou.coffee b/src/Quotelinks/QuoteYou.coffee index 7955373d9..4f7219149 100644 --- a/src/Quotelinks/QuoteYou.coffee +++ b/src/Quotelinks/QuoteYou.coffee @@ -4,7 +4,7 @@ QuoteYou = # \u00A0 is nbsp @text = '\u00A0(You)' - Post::callbacks.push + Post.callbacks.push name: 'Mark Quotes of You' cb: @node node: -> diff --git a/src/Quotelinks/Quotify.coffee b/src/Quotelinks/Quotify.coffee index d58923487..0bcf9f998 100644 --- a/src/Quotelinks/Quotify.coffee +++ b/src/Quotelinks/Quotify.coffee @@ -2,7 +2,7 @@ Quotify = init: -> return if g.VIEW is 'catalog' or !Conf['Resurrect Quotes'] - Post::callbacks.push + Post.callbacks.push name: 'Resurrect Quotes' cb: @node node: ->