From 5711a85c8c3b01931035c806ad6feba989c39110 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Tue, 26 Feb 2013 04:25:49 +0100 Subject: [PATCH] Disable Download Links on Firefox. #932 --- 4chan_x.user.js | 2 +- src/features.coffee | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index e816839b3..2e3d66c82 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2554,7 +2554,7 @@ if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Download Link']) { return; } - if ($.el('a').download === void 0) { + if ($.engine === 'gecko' || $.el('a').download === void 0) { return; } a = $.el('a', { diff --git a/src/features.coffee b/src/features.coffee index 51442e76c..baeaa2574 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -1363,8 +1363,9 @@ DownloadLink = init: -> return if g.VIEW is 'catalog' or !Conf['Menu'] or !Conf['Download Link'] + # Firefox won't let us download cross-domain content. # Test for download feature support. - return if $.el('a').download is undefined + return if $.engine is 'gecko' or $.el('a').download is undefined a = $.el 'a', className: 'download-link' textContent: 'Download file'