Remove the Download Link config on non-crx extensions.
This commit is contained in:
parent
6f50ec0115
commit
8298f7e35d
@ -33,7 +33,9 @@ Config =
|
||||
'Thread Hiding Link': [true, 'Add a link to hide entire threads.']
|
||||
'Reply Hiding Link': [true, 'Add a link to hide single replies.']
|
||||
'Delete Link': [true, 'Add post and image deletion links to the menu.']
|
||||
'Download Link': [true, 'Add a download with original filename link to the menu. Chrome-only currently.']
|
||||
<% if (type === 'crx') { %>
|
||||
'Download Link': [true, 'Add a download with original filename link to the menu.']
|
||||
<% } %>
|
||||
'Archive Link': [true, 'Add an archive link to the menu.']
|
||||
'Monitoring':
|
||||
'Thread Updater': [true, 'Fetch and insert new replies. Has more options in its own dialog.']
|
||||
|
||||
@ -1737,15 +1737,8 @@ DeleteLink =
|
||||
|
||||
DownloadLink =
|
||||
init: ->
|
||||
<% if (type === 'userscript') { %>
|
||||
# Firefox won't let us download cross-domain content.
|
||||
return
|
||||
<% } %>
|
||||
return if g.VIEW is 'catalog' or !Conf['Menu'] or !Conf['Download Link']
|
||||
|
||||
# Test for download feature support.
|
||||
return unless 'download' of $.el 'a'
|
||||
|
||||
a = $.el 'a',
|
||||
className: 'download-link'
|
||||
textContent: 'Download file'
|
||||
|
||||
@ -791,7 +791,7 @@ QR =
|
||||
QR.mimeTypes = mimeTypes.split ', '
|
||||
# Add empty mimeType to avoid errors with URLs selected in Window's file dialog.
|
||||
QR.mimeTypes.push ''
|
||||
nodes.fileInput.max = $('input[name=MAX_FILE_SIZE]').value
|
||||
nodes.fileInput.max = $('input[name=MAX_FILE_SIZE]').value
|
||||
<% if (type !== 'userjs') { %>
|
||||
# Opera's accept attribute is fucked up
|
||||
nodes.fileInput.accept = "text/*, #{mimeTypes}"
|
||||
@ -826,8 +826,8 @@ QR =
|
||||
$.on elm, 'blur', QR.focusout
|
||||
$.on elm, 'focus', QR.focusin
|
||||
<% } %>
|
||||
$.on QR.nodes.el, 'focusin', QR.focusin
|
||||
$.on QR.nodes.el, 'focusout', QR.focusout
|
||||
$.on dialog, 'focusin', QR.focusin
|
||||
$.on dialog, 'focusout', QR.focusout
|
||||
for node in [nodes.fileButton, nodes.filename.parentNode]
|
||||
$.on node, 'click', QR.openFileInput
|
||||
$.on nodes.autohide, 'change', QR.toggleHide
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user