diff options
-rw-r--r-- | all.json | 2 | ||||
-rw-r--r-- | archives/googledrive.tar.gz | bin | 13569 -> 204734 bytes | |||
-rw-r--r-- | uncompressed/googledrive/icon.png | bin | 11492 -> 204548 bytes | |||
-rw-r--r-- | uncompressed/googledrive/index.js | 17 | ||||
-rw-r--r-- | uncompressed/googledrive/package.json | 2 |
5 files changed, 14 insertions, 7 deletions
@@ -279,7 +279,7 @@ | |||
279 | "featured": false, | 279 | "featured": false, |
280 | "id": "googledrive", | 280 | "id": "googledrive", |
281 | "name": "Google Drive", | 281 | "name": "Google Drive", |
282 | "version": "1.0.3", | 282 | "version": "1.0.4", |
283 | "icons": { | 283 | "icons": { |
284 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/googledrive/icon.png", | 284 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/googledrive/icon.png", |
285 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/googledrive/icon.svg" | 285 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/googledrive/icon.svg" |
diff --git a/archives/googledrive.tar.gz b/archives/googledrive.tar.gz index 9f24b28..c7b1b4e 100644 --- a/archives/googledrive.tar.gz +++ b/archives/googledrive.tar.gz | |||
Binary files differ | |||
diff --git a/uncompressed/googledrive/icon.png b/uncompressed/googledrive/icon.png index 19fff5f..98a647a 100644 --- a/uncompressed/googledrive/icon.png +++ b/uncompressed/googledrive/icon.png | |||
Binary files differ | |||
diff --git a/uncompressed/googledrive/index.js b/uncompressed/googledrive/index.js index 9c4da64..aacc1ac 100644 --- a/uncompressed/googledrive/index.js +++ b/uncompressed/googledrive/index.js | |||
@@ -2,10 +2,17 @@ var os = require('os') | |||
2 | 2 | ||
3 | module.exports = Franz => | 3 | module.exports = Franz => |
4 | class googledrive extends Franz { | 4 | class googledrive extends Franz { |
5 | overrideUserAgent() { | 5 | modifyRequestHeaders() { |
6 | if (os.platform() == 'linux') | 6 | return [ |
7 | return "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" | 7 | { |
8 | else | 8 | headers: { |
9 | return "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:72.0) Gecko/20100101 Firefox/72.0"; | 9 | 'user-agent': window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g, '').trim(), |
10 | 'origin': 'https://drive.google.com' | ||
11 | }, | ||
12 | requestFilters: { | ||
13 | urls: ['*://*/*'], | ||
14 | }, | ||
15 | }, | ||
16 | ]; | ||
10 | } | 17 | } |
11 | }; | 18 | }; |
diff --git a/uncompressed/googledrive/package.json b/uncompressed/googledrive/package.json index 5b97042..11e0c57 100644 --- a/uncompressed/googledrive/package.json +++ b/uncompressed/googledrive/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "googledrive", | 2 | "id": "googledrive", |
3 | "name": "Google Drive", | 3 | "name": "Google Drive", |
4 | "version": "1.0.3", | 4 | "version": "1.0.4", |
5 | "description": "Google Drive", | 5 | "description": "Google Drive", |
6 | "main": "index.js", | 6 | "main": "index.js", |
7 | "author": "Djonathan Goulart<d.goulart@outlook.com.br>", | 7 | "author": "Djonathan Goulart<d.goulart@outlook.com.br>", |