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.']
|
'Thread Hiding Link': [true, 'Add a link to hide entire threads.']
|
||||||
'Reply Hiding Link': [true, 'Add a link to hide single replies.']
|
'Reply Hiding Link': [true, 'Add a link to hide single replies.']
|
||||||
'Delete Link': [true, 'Add post and image deletion links to the menu.']
|
'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.']
|
'Archive Link': [true, 'Add an archive link to the menu.']
|
||||||
'Monitoring':
|
'Monitoring':
|
||||||
'Thread Updater': [true, 'Fetch and insert new replies. Has more options in its own dialog.']
|
'Thread Updater': [true, 'Fetch and insert new replies. Has more options in its own dialog.']
|
||||||
|
|||||||
@ -1737,15 +1737,8 @@ DeleteLink =
|
|||||||
|
|
||||||
DownloadLink =
|
DownloadLink =
|
||||||
init: ->
|
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']
|
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',
|
a = $.el 'a',
|
||||||
className: 'download-link'
|
className: 'download-link'
|
||||||
textContent: 'Download file'
|
textContent: 'Download file'
|
||||||
|
|||||||
@ -791,7 +791,7 @@ QR =
|
|||||||
QR.mimeTypes = mimeTypes.split ', '
|
QR.mimeTypes = mimeTypes.split ', '
|
||||||
# Add empty mimeType to avoid errors with URLs selected in Window's file dialog.
|
# Add empty mimeType to avoid errors with URLs selected in Window's file dialog.
|
||||||
QR.mimeTypes.push ''
|
QR.mimeTypes.push ''
|
||||||
nodes.fileInput.max = $('input[name=MAX_FILE_SIZE]').value
|
nodes.fileInput.max = $('input[name=MAX_FILE_SIZE]').value
|
||||||
<% if (type !== 'userjs') { %>
|
<% if (type !== 'userjs') { %>
|
||||||
# Opera's accept attribute is fucked up
|
# Opera's accept attribute is fucked up
|
||||||
nodes.fileInput.accept = "text/*, #{mimeTypes}"
|
nodes.fileInput.accept = "text/*, #{mimeTypes}"
|
||||||
@ -826,8 +826,8 @@ QR =
|
|||||||
$.on elm, 'blur', QR.focusout
|
$.on elm, 'blur', QR.focusout
|
||||||
$.on elm, 'focus', QR.focusin
|
$.on elm, 'focus', QR.focusin
|
||||||
<% } %>
|
<% } %>
|
||||||
$.on QR.nodes.el, 'focusin', QR.focusin
|
$.on dialog, 'focusin', QR.focusin
|
||||||
$.on QR.nodes.el, 'focusout', QR.focusout
|
$.on dialog, 'focusout', QR.focusout
|
||||||
for node in [nodes.fileButton, nodes.filename.parentNode]
|
for node in [nodes.fileButton, nodes.filename.parentNode]
|
||||||
$.on node, 'click', QR.openFileInput
|
$.on node, 'click', QR.openFileInput
|
||||||
$.on nodes.autohide, 'change', QR.toggleHide
|
$.on nodes.autohide, 'change', QR.toggleHide
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user