diff --git a/src/General/UI.coffee b/src/General/UI.coffee index 2a22e4eca..4c7ccd2b7 100644 --- a/src/General/UI.coffee +++ b/src/General/UI.coffee @@ -267,7 +267,7 @@ drag = (e) -> left = if left < 10 0 else if @width - left < 10 - null + '' else left / @screenWidth * 100 + '%' @@ -275,19 +275,19 @@ drag = (e) -> top = if top < (10 + @topBorder) @topBorder + 'px' else if @height - top < (10 + @bottomBorder) - null + '' else top / @screenHeight * 100 + '%' - right = if left is null + right = if left is '' 0 else - null + '' - bottom = if top is null + bottom = if top is '' @bottomBorder + 'px' else - null + '' {style} = @ style.left = left @@ -356,9 +356,9 @@ hover = (e) -> threshold = @clientWidth / 2 threshold = Math.max threshold, @clientWidth - 400 unless @isImage [left, right] = if clientX <= threshold - [clientX + 45 + 'px', null] + [clientX + 45 + 'px', ''] else - [null, @clientWidth - clientX + 45 + 'px'] + ['', @clientWidth - clientX + 45 + 'px'] {style} = @ style.top = top + 'px' diff --git a/src/Images/Gallery.coffee b/src/Images/Gallery.coffee index 38fee7532..8d8f5262b 100644 --- a/src/Images/Gallery.coffee +++ b/src/Images/Gallery.coffee @@ -329,7 +329,7 @@ Gallery = style.minHeight = minHeight + 'px' style.minWidth = (width / height * minHeight) + 'px' else - style.minHeight = style.minWidth = null + style.minHeight = style.minWidth = '' setDelay: -> Gallery.delay = +@value diff --git a/src/Miscellaneous/Nav.coffee b/src/Miscellaneous/Nav.coffee index 71227374b..d5a552940 100644 --- a/src/Miscellaneous/Nav.coffee +++ b/src/Miscellaneous/Nav.coffee @@ -74,6 +74,6 @@ Nav = if extra > 0 d.body.style.marginBottom = "#{extra}px" else - d.body.style.marginBottom = null + d.body.style.marginBottom = '' delete Nav.haveExtra $.off d, 'scroll', Nav.removeExtra diff --git a/src/Posting/Captcha.v1.coffee b/src/Posting/Captcha.v1.coffee index 577ebd031..3a7f33d75 100644 --- a/src/Posting/Captcha.v1.coffee +++ b/src/Posting/Captcha.v1.coffee @@ -135,7 +135,7 @@ Captcha.v1 = QR.captcha.load() if QR.nodes.el.getBoundingClientRect().bottom > doc.clientHeight - QR.nodes.el.style.top = null + QR.nodes.el.style.top = '' QR.nodes.el.style.bottom = '0px' destroy: -> diff --git a/src/Posting/Captcha.v2.coffee b/src/Posting/Captcha.v2.coffee index 662ca209c..6c42cc2de 100644 --- a/src/Posting/Captcha.v2.coffee +++ b/src/Posting/Captcha.v2.coffee @@ -144,7 +144,7 @@ Captcha.v2 = fixQRPosition: -> if QR.nodes.el.getBoundingClientRect().bottom > doc.clientHeight - QR.nodes.el.style.top = null + QR.nodes.el.style.top = '' QR.nodes.el.style.bottom = '0px' setupTextArea: (textarea) -> diff --git a/src/Posting/QR.post.coffee b/src/Posting/QR.post.coffee index 725576c89..f77596d06 100644 --- a/src/Posting/QR.post.coffee +++ b/src/Posting/QR.post.coffee @@ -203,7 +203,7 @@ QR.post = class @showFileData() else @updateFilename() - @nodes.el.style.backgroundImage = null + @nodes.el.style.backgroundImage = '' unless @file.type in QR.mimeTypes @fileError 'Unsupported file type.' else if /^(image|video)\//.test @file.type @@ -299,7 +299,7 @@ QR.post = class delete @filesize @nodes.el.removeAttribute 'title' QR.nodes.filename.removeAttribute 'title' - @nodes.el.style.backgroundImage = null + @nodes.el.style.backgroundImage = '' $.rmClass @nodes.el, 'has-file' @showFileData() URL.revokeObjectURL @URL