From bd29db7551f94db0645e15602af9429af4550b1d Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Fri, 27 Jan 2012 16:50:35 +0100 Subject: [PATCH] Styling inline-blocks with percentages is impossible in Firefox. I'm not gonna use flexboxes for now. Revert "Display filename." This reverts commit 50e9a0e633e22f64d412ad19e56268dcf0f55dad. --- 4chan_x.user.js | 6 ++---- script.coffee | 9 +++------ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index d0ba44c9e..b538bc67d 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1435,7 +1435,6 @@ var url; this.file = file; this.el.title = file.name; - if (this === qr.selected) $('#filename', qr.el).textContent = file.name; if (file.type === 'application/pdf') { this.el.style.backgroundImage = null; return; @@ -1460,7 +1459,6 @@ data = _ref2[_i]; $("[name=" + data + "]", qr.el).value = this[data]; } - $('#filename', qr.el).textContent = this.file ? this.file.name : null; return $('#spoiler', qr.el).checked = this.spoiler; }; @@ -1570,7 +1568,7 @@ }); qr.mimeTypes = mimeTypes.split(', '); qr.spoiler = !!$('#com_submit + label'); - qr.el = ui.dialog('qr', 'top:0;right:0;', "
Quick Reply " + (g.REPLY ? '' : threads) + " x
+
"); + qr.el = ui.dialog('qr', 'top:0;right:0;', "
Quick Reply " + (g.REPLY ? '' : threads) + " x
+
"); if (!g.REPLY) { $.on($('select', qr.el), 'mousedown', function(e) { return e.stopPropagation(); @@ -3662,7 +3660,7 @@ textarea.field {\ position: absolute;\ visibility: hidden;\ }\ -#filename {\ +#fileInfo {\ box-sizing: border-box;\ -moz-box-sizing: border-box;\ display: inline-block;\ diff --git a/script.coffee b/script.coffee index 0aac967d3..96a6f69a3 100644 --- a/script.coffee +++ b/script.coffee @@ -1052,8 +1052,6 @@ qr = qr.replies.push @ setFile: (@file) -> @el.title = file.name - if @ is qr.selected - $('#filename', qr.el).textContent = file.name if file.type is 'application/pdf' @el.style.backgroundImage = null return @@ -1072,8 +1070,7 @@ qr = @el.parentNode.scrollLeft += rectEl.left + rectEl.width/2 - rectList.left - rectList.width/2 for data in ['name', 'email', 'sub', 'com'] $("[name=#{data}]", qr.el).value = @[data] - $('#filename', qr.el).textContent = if @file then @file.name else null - $('#spoiler', qr.el).checked = @spoiler + $('#spoiler', qr.el).checked = @spoiler rm: -> $.rm @el index = qr.replies.indexOf @ @@ -1161,7 +1158,7 @@ qr =
-
+
@@ -2900,7 +2897,7 @@ textarea.field { position: absolute; visibility: hidden; } -#filename { +#fileInfo { box-sizing: border-box; -moz-box-sizing: border-box; display: inline-block;