Skip to content

Commit

Permalink
fixed getting content-type for unknown filename; allow hotkeys only w…
Browse files Browse the repository at this point in the history
…hen button is fully visible
  • Loading branch information
Dezaimasu committed Nov 4, 2018
1 parent 19d033e commit aceb6f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion js/content-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ const de_button = {
},

isVisible: function(){
return this.elem.classList.contains('visible');
return this.elem.classList.contains('visible') && !this.elem.matches('.shy:not(:hover)');
},

emulateClick: function(buttonCode = 0){
Expand Down
2 changes: 1 addition & 1 deletion js/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const downloader = {
const request = new XMLHttpRequest();
request.open(requestType, downloadRequest.src);
request.onload = () => {
if (requestType === 'HEAD' && request.status === 501) { // HEAD request method is not implemented by server
if (requestType === 'HEAD' && [405, 501].includes(request.status)) { // HEAD request method is not allowed / not implemented by server
this.getHeadersAndDownload(downloadRequest, tabId, 'GET');
return;
}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Cute Save Button",
"version": "0.6.0",
"version": "0.6.1",
"description": "__MSG_extensionDescription__",
"author": "Deil",
"default_locale": "en",
Expand Down

0 comments on commit aceb6f0

Please sign in to comment.