Mayhem X
This commit is contained in:
commit
4481b56851
@ -1,3 +1,12 @@
|
||||
**MayhemYDG**:
|
||||
- Add page count to thread stats
|
||||
- Better performance for Fit Height by using vh
|
||||
|
||||
**seaweedchan**:
|
||||
- Added OpenSettings event on 4chan X settings/sections open for userscripts like OneeChan and 4chan Style Script
|
||||
- Changed defaults that use the arrow keys to shift+arrow key to not conflict with scrolling
|
||||
- Made Mayhem's page count in thread stats optional
|
||||
|
||||
### v1.2.10
|
||||
*2013-05-25*
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -117,11 +117,11 @@ Build =
|
||||
|
||||
if file?.isDeleted
|
||||
fileHtml = if isOP
|
||||
"<div class=file id=f#{data.no}><div class=fileInfo></div><span class=fileThumb>" +
|
||||
"<div class=file id=f#{postID}><div class=fileInfo></div><span class=fileThumb>" +
|
||||
"<img src='#{staticPath}filedeleted.gif' alt='File deleted.' class=fileDeletedRes>" +
|
||||
"</span></div>"
|
||||
else
|
||||
"<div class=file id=f#{data.no}><span class=fileThumb>" +
|
||||
"<div class=file id=f#{postID}><span class=fileThumb>" +
|
||||
"<img src='#{staticPath}filedeleted-res.gif' alt='File deleted.' class=fileDeletedRes>" +
|
||||
"</span></div>"
|
||||
else if file
|
||||
|
||||
@ -612,6 +612,9 @@ a.hide-announcement {
|
||||
clear: both;
|
||||
display: table;
|
||||
}
|
||||
:root.fit-height .full-image {
|
||||
max-height: 100vh;
|
||||
}
|
||||
:root.fit-width .full-image {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@ -51,16 +51,20 @@ ImageExpand =
|
||||
$.queueTask func, post
|
||||
return
|
||||
setFitness: ->
|
||||
{checked} = @
|
||||
(if checked then $.addClass else $.rmClass) doc, @name.toLowerCase().replace /\s+/g, '-'
|
||||
(if @checked then $.addClass else $.rmClass) doc, @name.toLowerCase().replace /\s+/g, '-'
|
||||
<% if (type === 'userjs') { %>
|
||||
# XXX Opera doesn't support CSS vh.
|
||||
return unless @name is 'Fit height'
|
||||
if checked
|
||||
if @checked
|
||||
$.on window, 'resize', ImageExpand.resize
|
||||
unless ImageExpand.style
|
||||
ImageExpand.style = $.addStyle null
|
||||
ImageExpand.resize()
|
||||
else
|
||||
$.off window, 'resize', ImageExpand.resize
|
||||
resize: ->
|
||||
ImageExpand.style.textContent = ":root.fit-height .full-image {max-height:#{doc.clientHeight}px}"
|
||||
<% } %>
|
||||
|
||||
toggle: (post) ->
|
||||
{thumb} = post.file
|
||||
@ -200,8 +204,5 @@ ImageExpand =
|
||||
$.on input, 'change', $.cb.checked
|
||||
el: label
|
||||
|
||||
resize: ->
|
||||
ImageExpand.style.textContent = ":root.fit-height .full-image {max-height:#{doc.clientHeight}px}"
|
||||
|
||||
menuToggle: (e) ->
|
||||
ImageExpand.opmenu.toggle e, @, g
|
||||
ImageExpand.opmenu.toggle e, @, g
|
||||
|
||||
@ -31,6 +31,7 @@ ThreadStats =
|
||||
postCount++
|
||||
fileCount++ if post.file
|
||||
ThreadStats.thread = @
|
||||
ThreadStats.fetchPage()
|
||||
ThreadStats.update postCount, fileCount
|
||||
$.on d, 'ThreadUpdate', ThreadStats.onUpdate
|
||||
|
||||
@ -62,4 +63,4 @@ ThreadStats =
|
||||
if thread.no is ThreadStats.thread.ID
|
||||
ThreadStats.pageCountEl.textContent = page.page
|
||||
(if page.page is pages.length - 1 then $.addClass else $.rmClass) ThreadStats.pageCountEl, 'warning'
|
||||
return
|
||||
return
|
||||
|
||||
@ -212,6 +212,8 @@ QR =
|
||||
loadPersonas: (type, arr) ->
|
||||
list = $ "#list-#{type}", QR.nodes.el
|
||||
for val in arr
|
||||
# XXX Firefox displays empty <option>s in the completion list.
|
||||
continue unless val
|
||||
$.add list, $.el 'option',
|
||||
textContent: val
|
||||
return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user