quote all the attributes
This commit is contained in:
parent
05014b7f13
commit
cb828fa9c4
@ -135,7 +135,7 @@ Header =
|
|||||||
fourchannav = $.id 'boardNavDesktop'
|
fourchannav = $.id 'boardNavDesktop'
|
||||||
Header.boardList = boardList = $.el 'span',
|
Header.boardList = boardList = $.el 'span',
|
||||||
id: 'board-list'
|
id: 'board-list'
|
||||||
innerHTML: "<span id=custom-board-list></span><span id=full-board-list hidden><span class='hide-board-list-container brackets-wrap'><a href=javascript:; class='hide-board-list-button'> - </a></span> #{fourchannav.innerHTML}</span>"
|
innerHTML: "<span id='custom-board-list'></span><span id='full-board-list' hidden><span class='hide-board-list-container brackets-wrap'><a href='javascript:;' class='hide-board-list-button'> - </a></span> #{fourchannav.innerHTML}</span>"
|
||||||
for a in $$ 'a', boardList
|
for a in $$ 'a', boardList
|
||||||
if Conf['JSON Navigation']
|
if Conf['JSON Navigation']
|
||||||
$.on a, 'click', Navigate.navigate
|
$.on a, 'click', Navigate.navigate
|
||||||
|
|||||||
@ -15,9 +15,9 @@ Index =
|
|||||||
modeEntry =
|
modeEntry =
|
||||||
el: $.el 'span', textContent: 'Index mode'
|
el: $.el 'span', textContent: 'Index mode'
|
||||||
subEntries: [
|
subEntries: [
|
||||||
{ el: $.el 'label', innerHTML: '<input type=radio name="Index Mode" value="paged"> Paged' }
|
{ el: $.el 'label', innerHTML: '<input type="radio" name="Index Mode" value="paged"> Paged' }
|
||||||
{ el: $.el 'label', innerHTML: '<input type=radio name="Index Mode" value="infinite"> Infinite scrolling' }
|
{ el: $.el 'label', innerHTML: '<input type="radio" name="Index Mode" value="infinite"> Infinite scrolling' }
|
||||||
{ el: $.el 'label', innerHTML: '<input type=radio name="Index Mode" value="all pages"> All threads' }
|
{ el: $.el 'label', innerHTML: '<input type="radio" name="Index Mode" value="all pages"> All threads' }
|
||||||
]
|
]
|
||||||
for label in modeEntry.subEntries
|
for label in modeEntry.subEntries
|
||||||
input = label.el.firstChild
|
input = label.el.firstChild
|
||||||
@ -28,11 +28,11 @@ Index =
|
|||||||
sortEntry =
|
sortEntry =
|
||||||
el: $.el 'span', textContent: 'Sort by'
|
el: $.el 'span', textContent: 'Sort by'
|
||||||
subEntries: [
|
subEntries: [
|
||||||
{ el: $.el 'label', innerHTML: '<input type=radio name="Index Sort" value="bump"> Bump order' }
|
{ el: $.el 'label', innerHTML: '<input type="radio" name="Index Sort" value="bump"> Bump order' }
|
||||||
{ el: $.el 'label', innerHTML: '<input type=radio name="Index Sort" value="lastreply"> Last reply' }
|
{ el: $.el 'label', innerHTML: '<input type="radio" name="Index Sort" value="lastreply"> Last reply' }
|
||||||
{ el: $.el 'label', innerHTML: '<input type=radio name="Index Sort" value="birth"> Creation date' }
|
{ el: $.el 'label', innerHTML: '<input type="radio" name="Index Sort" value="birth"> Creation date' }
|
||||||
{ el: $.el 'label', innerHTML: '<input type=radio name="Index Sort" value="replycount"> Reply count' }
|
{ el: $.el 'label', innerHTML: '<input type="radio" name="Index Sort" value="replycount"> Reply count' }
|
||||||
{ el: $.el 'label', innerHTML: '<input type=radio name="Index Sort" value="filecount"> File count' }
|
{ el: $.el 'label', innerHTML: '<input type="radio" name="Index Sort" value="filecount"> File count' }
|
||||||
]
|
]
|
||||||
for label in sortEntry.subEntries
|
for label in sortEntry.subEntries
|
||||||
input = label.el.firstChild
|
input = label.el.firstChild
|
||||||
|
|||||||
@ -187,7 +187,7 @@ Main =
|
|||||||
return if previousversion is g.VERSION
|
return if previousversion is g.VERSION
|
||||||
if previousversion
|
if previousversion
|
||||||
el = $.el 'span',
|
el = $.el 'span',
|
||||||
innerHTML: '<%= meta.name %> has been updated to <a href="<%= meta.repo %>blob/<%= meta.mainBranch %>/CHANGELOG.md" target=_blank>version <%= version %></a>.'
|
innerHTML: '<%= meta.name %> has been updated to <a href="<%= meta.repo %>blob/<%= meta.mainBranch %>/CHANGELOG.md" target="_blank">version <%= version %></a>.'
|
||||||
new Notice 'info', el, 15
|
new Notice 'info', el, 15
|
||||||
else
|
else
|
||||||
Settings.open()
|
Settings.open()
|
||||||
@ -242,7 +242,7 @@ Main =
|
|||||||
return
|
return
|
||||||
|
|
||||||
div = $.el 'div',
|
div = $.el 'div',
|
||||||
innerHTML: "#{+errors.length} errors occurred. [<a href=javascript:;>show</a>]"
|
innerHTML: "#{+errors.length} errors occurred. [<a href='javascript:;'>show</a>]"
|
||||||
$.on div.lastElementChild, 'click', ->
|
$.on div.lastElementChild, 'click', ->
|
||||||
[@textContent, logs.hidden] = if @textContent is 'show'
|
[@textContent, logs.hidden] = if @textContent is 'show'
|
||||||
['hide', false]
|
['hide', false]
|
||||||
|
|||||||
@ -112,7 +112,7 @@ Settings =
|
|||||||
return
|
return
|
||||||
|
|
||||||
div = $.el 'div',
|
div = $.el 'div',
|
||||||
innerHTML: '<button></button><span class=description>: Clear manually-hidden threads and posts on all boards. Reload the page to apply.'
|
innerHTML: '<button></button><span class="description">: Clear manually-hidden threads and posts on all boards. Reload the page to apply.'
|
||||||
button = $ 'button', div
|
button = $ 'button', div
|
||||||
$.get {hiddenThreads: {}, hiddenPosts: {}}, ({hiddenThreads, hiddenPosts}) ->
|
$.get {hiddenThreads: {}, hiddenPosts: {}}, ({hiddenThreads, hiddenPosts}) ->
|
||||||
hiddenNum = 0
|
hiddenNum = 0
|
||||||
@ -446,7 +446,7 @@ Settings =
|
|||||||
inputs = {}
|
inputs = {}
|
||||||
for key, arr of Config.hotkeys
|
for key, arr of Config.hotkeys
|
||||||
tr = $.el 'tr',
|
tr = $.el 'tr',
|
||||||
innerHTML: '<td></td><td><input class=field></td>'
|
innerHTML: '<td></td><td><input class="field"></td>'
|
||||||
tr.firstElementChild.textContent = arr[1]
|
tr.firstElementChild.textContent = arr[1]
|
||||||
input = $ 'input', tr
|
input = $ 'input', tr
|
||||||
input.name = key
|
input.name = key
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
class Notice
|
class Notice
|
||||||
constructor: (type, content, @timeout) ->
|
constructor: (type, content, @timeout) ->
|
||||||
@el = $.el 'div',
|
@el = $.el 'div',
|
||||||
innerHTML: '<a href=javascript:; class="close fa fa-times" title=Close></a><div class=message></div>'
|
innerHTML: '<a href="javascript:;" class="close fa fa-times" title="Close"></a><div class="message"></div>'
|
||||||
@el.style.opacity = 0
|
@el.style.opacity = 0
|
||||||
@setType type
|
@setType type
|
||||||
$.on @el.firstElementChild, 'click', @close
|
$.on @el.firstElementChild, 'click', @close
|
||||||
|
|||||||
@ -14,7 +14,7 @@ ImageLoader =
|
|||||||
return unless Conf['Image Prefetching'] and g.VIEW is 'thread'
|
return unless Conf['Image Prefetching'] and g.VIEW is 'thread'
|
||||||
|
|
||||||
prefetch = $.el 'label',
|
prefetch = $.el 'label',
|
||||||
innerHTML: '<input type=checkbox name="prefetch"> Prefetch Images'
|
innerHTML: '<input type="checkbox" name="prefetch"> Prefetch Images'
|
||||||
|
|
||||||
@el = prefetch.firstElementChild
|
@el = prefetch.firstElementChild
|
||||||
$.on @el, 'change', @toggle
|
$.on @el, 'change', @toggle
|
||||||
@ -46,4 +46,4 @@ ImageLoader =
|
|||||||
enabled = Conf['prefetch'] = @checked
|
enabled = Conf['prefetch'] = @checked
|
||||||
if enabled
|
if enabled
|
||||||
ImageLoader.thread.posts.forEach ImageLoader.node.call
|
ImageLoader.thread.posts.forEach ImageLoader.node.call
|
||||||
return
|
return
|
||||||
|
|||||||
@ -23,7 +23,7 @@ PSAHiding =
|
|||||||
$.on entry.el, 'click', PSAHiding.toggle
|
$.on entry.el, 'click', PSAHiding.toggle
|
||||||
|
|
||||||
PSAHiding.btn = btn = $.el 'span',
|
PSAHiding.btn = btn = $.el 'span',
|
||||||
innerHTML: '[<a href=javascript:;>Dismiss</a>]'
|
innerHTML: '[<a href="javascript:;">Dismiss</a>]'
|
||||||
title: 'Mark announcement as read and hide.'
|
title: 'Mark announcement as read and hide.'
|
||||||
className: 'hide-announcement'
|
className: 'hide-announcement'
|
||||||
href: 'javascript:;'
|
href: 'javascript:;'
|
||||||
|
|||||||
@ -4,14 +4,14 @@ ThreadStats =
|
|||||||
|
|
||||||
if Conf['Updater and Stats in Header']
|
if Conf['Updater and Stats in Header']
|
||||||
@dialog = sc = $.el 'span',
|
@dialog = sc = $.el 'span',
|
||||||
innerHTML: "<span id=post-count>0</span> / <span id=file-count>0</span>#{if Conf['Page Count in Stats'] then ' / <span id=page-count>0</span>' else ''}"
|
innerHTML: "<span id='post-count'>0</span> / <span id='file-count'>0</span>#{if Conf['Page Count in Stats'] then ' / <span id="page-count">0</span>' else ''}"
|
||||||
id: 'thread-stats'
|
id: 'thread-stats'
|
||||||
title: 'Post Count / File Count' + (if Conf["Page Count in Stats"] then " / Page Count" else "")
|
title: 'Post Count / File Count' + (if Conf["Page Count in Stats"] then " / Page Count" else "")
|
||||||
$.ready ->
|
$.ready ->
|
||||||
Header.addShortcut sc
|
Header.addShortcut sc
|
||||||
else
|
else
|
||||||
@dialog = sc = UI.dialog 'thread-stats', 'bottom: 0px; right: 0px;',
|
@dialog = sc = UI.dialog 'thread-stats', 'bottom: 0px; right: 0px;',
|
||||||
innerHTML: "<div class=move title='Post Count / File Count#{if Conf['Page Count in Stats'] then ' / Page Count' else ''}'><span id=post-count>0</span> / <span id=file-count>0</span>#{if Conf['Page Count in Stats'] then ' / <span id=page-count>0</span>' else ''}</div>"
|
innerHTML: "<div class='move' title='Post Count / File Count#{if Conf['Page Count in Stats'] then ' / Page Count' else ''}'><span id='post-count'>0</span> / <span id='file-count'>0</span>#{if Conf['Page Count in Stats'] then ' / <span id="page-count">0</span>' else ''}</div>"
|
||||||
$.ready =>
|
$.ready =>
|
||||||
$.add d.body, sc
|
$.add d.body, sc
|
||||||
|
|
||||||
|
|||||||
@ -4,13 +4,13 @@ ThreadUpdater =
|
|||||||
|
|
||||||
if Conf['Updater and Stats in Header']
|
if Conf['Updater and Stats in Header']
|
||||||
@dialog = sc = $.el 'span',
|
@dialog = sc = $.el 'span',
|
||||||
innerHTML: '<span id=update-status></span><span id=update-timer title="Update now"></span>'
|
innerHTML: '<span id="update-status"></span><span id="update-timer" title="Update now"></span>'
|
||||||
id: 'updater'
|
id: 'updater'
|
||||||
$.ready ->
|
$.ready ->
|
||||||
Header.addShortcut sc
|
Header.addShortcut sc
|
||||||
else
|
else
|
||||||
@dialog = sc = UI.dialog 'updater', 'bottom: 0px; left: 0px;',
|
@dialog = sc = UI.dialog 'updater', 'bottom: 0px; left: 0px;',
|
||||||
innerHTML: '<div class=move></div><span id=update-status></span><span id=update-timer title="Update now"></span>'
|
innerHTML: '<div class="move"></div><span id="update-status"></span><span id="update-timer" title="Update now"></span>'
|
||||||
$.addClass doc, 'float'
|
$.addClass doc, 'float'
|
||||||
$.ready =>
|
$.ready =>
|
||||||
$.addClass doc, 'float'
|
$.addClass doc, 'float'
|
||||||
@ -39,7 +39,7 @@ ThreadUpdater =
|
|||||||
subEntries.push el: el
|
subEntries.push el: el
|
||||||
|
|
||||||
@settings = $.el 'span',
|
@settings = $.el 'span',
|
||||||
innerHTML: '<a href=javascript:;>Interval</a>'
|
innerHTML: '<a href="javascript:;">Interval</a>'
|
||||||
|
|
||||||
$.on @settings, 'click', @intervalShortcut
|
$.on @settings, 'click', @intervalShortcut
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@ QR =
|
|||||||
return unless QR.postingIsEnabled
|
return unless QR.postingIsEnabled
|
||||||
|
|
||||||
link = $.el 'h1',
|
link = $.el 'h1',
|
||||||
innerHTML: "<a href=javascript:; class='qr-link'>#{if g.VIEW is 'thread' then 'Reply to Thread' else 'Start a Thread'}</a>"
|
innerHTML: "<a href='javascript:;' class='qr-link'>#{if g.VIEW is 'thread' then 'Reply to Thread' else 'Start a Thread'}</a>"
|
||||||
className: "qr-link-container"
|
className: "qr-link-container"
|
||||||
|
|
||||||
QR.link = link.firstElementChild
|
QR.link = link.firstElementChild
|
||||||
@ -717,7 +717,7 @@ QR =
|
|||||||
QR.error $.el 'span',
|
QR.error $.el 'span',
|
||||||
innerHTML: '''
|
innerHTML: '''
|
||||||
4chan X encountered an error while posting.
|
4chan X encountered an error while posting.
|
||||||
[<a href="//4chan.org/banned" target=_blank>Banned?</a>] [<a href="<%= meta.faq %>#what-does-4chan-x-encountered-an-error-while-posting-please-try-again-mean" target=_blank>More info</a>]
|
[<a href="//4chan.org/banned" target="_blank">Banned?</a>] [<a href="<%= meta.faq %>#what-does-4chan-x-encountered-an-error-while-posting-please-try-again-mean" target="_blank">More info</a>]
|
||||||
'''
|
'''
|
||||||
extra =
|
extra =
|
||||||
form: $.formData formData
|
form: $.formData formData
|
||||||
@ -751,7 +751,7 @@ QR =
|
|||||||
if ban = $ '.banType', resDoc # banned/warning
|
if ban = $ '.banType', resDoc # banned/warning
|
||||||
err = $.el 'span',
|
err = $.el 'span',
|
||||||
if ban.textContent.toLowerCase() is 'banned'
|
if ban.textContent.toLowerCase() is 'banned'
|
||||||
innerHTML: "You are banned on #{$('.board', resDoc).innerHTML}! ;_;<br>Click <a href=//www.4chan.org/banned target=_blank>here</a> to see the reason."
|
innerHTML: "You are banned on #{$('.board', resDoc).innerHTML}! ;_;<br>Click <a href='//www.4chan.org/banned' target='_blank'>here</a> to see the reason."
|
||||||
else
|
else
|
||||||
innerHTML: "You were issued a warning on #{$('.board', resDoc).innerHTML} as #{$('.nameBlock', resDoc).innerHTML}.<br>Reason: #{$('.reason', resDoc).innerHTML}"
|
innerHTML: "You were issued a warning on #{$('.board', resDoc).innerHTML} as #{$('.nameBlock', resDoc).innerHTML}.<br>Reason: #{$('.reason', resDoc).innerHTML}"
|
||||||
else if err = resDoc.getElementById 'errmsg' # error!
|
else if err = resDoc.getElementById 'errmsg' # error!
|
||||||
|
|||||||
@ -4,7 +4,7 @@ QR.post = class
|
|||||||
className: 'qr-preview'
|
className: 'qr-preview'
|
||||||
draggable: true
|
draggable: true
|
||||||
href: 'javascript:;'
|
href: 'javascript:;'
|
||||||
innerHTML: '<a class="remove fa fa-times-circle" title=Remove></a><label hidden><input type=checkbox> Spoiler</label><span></span>'
|
innerHTML: '<a class="remove fa fa-times-circle" title="Remove"></a><label hidden><input type="checkbox"> Spoiler</label><span></span>'
|
||||||
|
|
||||||
@nodes =
|
@nodes =
|
||||||
el: el
|
el: el
|
||||||
|
|||||||
@ -8,7 +8,7 @@ QuoteThreading =
|
|||||||
|
|
||||||
@enabled = true
|
@enabled = true
|
||||||
@controls = $.el 'span',
|
@controls = $.el 'span',
|
||||||
innerHTML: '<label><input id=threadingControl type=checkbox checked> Threading</label>'
|
innerHTML: '<label><input id="threadingControl" type="checkbox" checked> Threading</label>'
|
||||||
|
|
||||||
input = $ 'input', @controls
|
input = $ 'input', @controls
|
||||||
$.on input, 'change', @toggle
|
$.on input, 'change', @toggle
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user