From f3026041b4a5ec051f4cda563646cec454bf6ca3 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Tue, 13 May 2014 17:19:09 -0700 Subject: [PATCH] slight change to UI.dialog to make searching for vulnerabilities easier --- src/General/UI.coffee | 4 ++-- src/Monitoring/ThreadStats.coffee | 4 ++-- src/Monitoring/ThreadUpdater.coffee | 2 +- src/Monitoring/ThreadWatcher.coffee | 2 +- src/Posting/QR.coffee | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/General/UI.coffee b/src/General/UI.coffee index 7657d9831..361e2fa17 100755 --- a/src/General/UI.coffee +++ b/src/General/UI.coffee @@ -1,9 +1,9 @@ UI = do -> - dialog = (id, position, html) -> + dialog = (id, position, properties) -> el = $.el 'div', className: 'dialog' - innerHTML: html id: id + $.extend el, properties el.style.cssText = position $.get "#{id}.position", position, (item) -> el.style.cssText = item["#{id}.position"] diff --git a/src/Monitoring/ThreadStats.coffee b/src/Monitoring/ThreadStats.coffee index 09468fa83..cb10382e9 100755 --- a/src/Monitoring/ThreadStats.coffee +++ b/src/Monitoring/ThreadStats.coffee @@ -4,14 +4,14 @@ ThreadStats = if Conf['Updater and Stats in Header'] @dialog = sc = $.el 'span', - innerHTML: "0 / 0#{if Conf["Page Count in Stats"] then " / 0" else ""}" + innerHTML: "0 / 0#{if Conf['Page Count in Stats'] then ' / 0' else ''}" id: 'thread-stats' title: 'Post Count / File Count' + (if Conf["Page Count in Stats"] then " / Page Count" else "") $.ready -> Header.addShortcut sc else @dialog = sc = UI.dialog 'thread-stats', 'bottom: 0px; right: 0px;', - "
0 / 0#{if Conf["Page Count in Stats"] then " / 0" else ""}
" + innerHTML: "
0 / 0#{if Conf['Page Count in Stats'] then ' / 0' else ''}
" $.ready => $.add d.body, sc diff --git a/src/Monitoring/ThreadUpdater.coffee b/src/Monitoring/ThreadUpdater.coffee index 5dbc6f0bc..2ee57ba76 100755 --- a/src/Monitoring/ThreadUpdater.coffee +++ b/src/Monitoring/ThreadUpdater.coffee @@ -10,7 +10,7 @@ ThreadUpdater = Header.addShortcut sc else @dialog = sc = UI.dialog 'updater', 'bottom: 0px; left: 0px;', - "
" + innerHTML: '
' $.addClass doc, 'float' $.ready => $.addClass doc, 'float' diff --git a/src/Monitoring/ThreadWatcher.coffee b/src/Monitoring/ThreadWatcher.coffee index 022a6aece..537114790 100755 --- a/src/Monitoring/ThreadWatcher.coffee +++ b/src/Monitoring/ThreadWatcher.coffee @@ -10,7 +10,7 @@ ThreadWatcher = className: 'disabled fa fa-eye' @db = new DataBoard 'watchedThreads', @refresh, true - @dialog = UI.dialog 'thread-watcher', 'top: 50px; left: 0px;', <%= importHTML('Monitoring/ThreadWatcher') %> + @dialog = UI.dialog 'thread-watcher', 'top: 50px; left: 0px;', innerHTML: <%= importHTML('Monitoring/ThreadWatcher') %> @status = $ '#watcher-status', @dialog @list = @dialog.lastElementChild diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 8c215b6a6..3de97c975 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -458,7 +458,7 @@ QR = dialog: -> QR.nodes = nodes = - el: dialog = UI.dialog 'qr', 'top:0;right:0;', <%= importHTML('Features/QuickReply') %> + el: dialog = UI.dialog 'qr', 'top:0;right:0;', innerHTML: <%= importHTML('Features/QuickReply') %> setNode = (name, query) -> nodes[name] = $ query, dialog