quote all the attributes
This commit is contained in:
parent
05014b7f13
commit
cb828fa9c4
@ -135,7 +135,7 @@ Header =
|
||||
fourchannav = $.id 'boardNavDesktop'
|
||||
Header.boardList = boardList = $.el 'span',
|
||||
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
|
||||
if Conf['JSON Navigation']
|
||||
$.on a, 'click', Navigate.navigate
|
||||
|
||||
@ -15,9 +15,9 @@ Index =
|
||||
modeEntry =
|
||||
el: $.el 'span', textContent: 'Index mode'
|
||||
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="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="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="all pages"> All threads' }
|
||||
]
|
||||
for label in modeEntry.subEntries
|
||||
input = label.el.firstChild
|
||||
@ -28,11 +28,11 @@ Index =
|
||||
sortEntry =
|
||||
el: $.el 'span', textContent: 'Sort by'
|
||||
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="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="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="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="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="filecount"> File count' }
|
||||
]
|
||||
for label in sortEntry.subEntries
|
||||
input = label.el.firstChild
|
||||
|
||||
@ -187,7 +187,7 @@ Main =
|
||||
return if previousversion is g.VERSION
|
||||
if previousversion
|
||||
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
|
||||
else
|
||||
Settings.open()
|
||||
@ -242,7 +242,7 @@ Main =
|
||||
return
|
||||
|
||||
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', ->
|
||||
[@textContent, logs.hidden] = if @textContent is 'show'
|
||||
['hide', false]
|
||||
|
||||
@ -112,7 +112,7 @@ Settings =
|
||||
return
|
||||
|
||||
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
|
||||
$.get {hiddenThreads: {}, hiddenPosts: {}}, ({hiddenThreads, hiddenPosts}) ->
|
||||
hiddenNum = 0
|
||||
@ -446,7 +446,7 @@ Settings =
|
||||
inputs = {}
|
||||
for key, arr of Config.hotkeys
|
||||
tr = $.el 'tr',
|
||||
innerHTML: '<td></td><td><input class=field></td>'
|
||||
innerHTML: '<td></td><td><input class="field"></td>'
|
||||
tr.firstElementChild.textContent = arr[1]
|
||||
input = $ 'input', tr
|
||||
input.name = key
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
class Notice
|
||||
constructor: (type, content, @timeout) ->
|
||||
@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
|
||||
@setType type
|
||||
$.on @el.firstElementChild, 'click', @close
|
||||
|
||||
@ -14,7 +14,7 @@ ImageLoader =
|
||||
return unless Conf['Image Prefetching'] and g.VIEW is 'thread'
|
||||
|
||||
prefetch = $.el 'label',
|
||||
innerHTML: '<input type=checkbox name="prefetch"> Prefetch Images'
|
||||
innerHTML: '<input type="checkbox" name="prefetch"> Prefetch Images'
|
||||
|
||||
@el = prefetch.firstElementChild
|
||||
$.on @el, 'change', @toggle
|
||||
@ -46,4 +46,4 @@ ImageLoader =
|
||||
enabled = Conf['prefetch'] = @checked
|
||||
if enabled
|
||||
ImageLoader.thread.posts.forEach ImageLoader.node.call
|
||||
return
|
||||
return
|
||||
|
||||
@ -23,7 +23,7 @@ PSAHiding =
|
||||
$.on entry.el, 'click', PSAHiding.toggle
|
||||
|
||||
PSAHiding.btn = btn = $.el 'span',
|
||||
innerHTML: '[<a href=javascript:;>Dismiss</a>]'
|
||||
innerHTML: '[<a href="javascript:;">Dismiss</a>]'
|
||||
title: 'Mark announcement as read and hide.'
|
||||
className: 'hide-announcement'
|
||||
href: 'javascript:;'
|
||||
|
||||
@ -4,14 +4,14 @@ ThreadStats =
|
||||
|
||||
if Conf['Updater and Stats in Header']
|
||||
@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'
|
||||
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;',
|
||||
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 =>
|
||||
$.add d.body, sc
|
||||
|
||||
|
||||
@ -4,13 +4,13 @@ ThreadUpdater =
|
||||
|
||||
if Conf['Updater and Stats in Header']
|
||||
@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'
|
||||
$.ready ->
|
||||
Header.addShortcut sc
|
||||
else
|
||||
@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'
|
||||
$.ready =>
|
||||
$.addClass doc, 'float'
|
||||
@ -39,7 +39,7 @@ ThreadUpdater =
|
||||
subEntries.push el: el
|
||||
|
||||
@settings = $.el 'span',
|
||||
innerHTML: '<a href=javascript:;>Interval</a>'
|
||||
innerHTML: '<a href="javascript:;">Interval</a>'
|
||||
|
||||
$.on @settings, 'click', @intervalShortcut
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ QR =
|
||||
return unless QR.postingIsEnabled
|
||||
|
||||
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"
|
||||
|
||||
QR.link = link.firstElementChild
|
||||
@ -717,7 +717,7 @@ QR =
|
||||
QR.error $.el 'span',
|
||||
innerHTML: '''
|
||||
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 =
|
||||
form: $.formData formData
|
||||
@ -751,7 +751,7 @@ QR =
|
||||
if ban = $ '.banType', resDoc # banned/warning
|
||||
err = $.el 'span',
|
||||
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
|
||||
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!
|
||||
|
||||
@ -4,7 +4,7 @@ QR.post = class
|
||||
className: 'qr-preview'
|
||||
draggable: true
|
||||
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 =
|
||||
el: el
|
||||
|
||||
@ -8,7 +8,7 @@ QuoteThreading =
|
||||
|
||||
@enabled = true
|
||||
@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
|
||||
$.on input, 'change', @toggle
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user