Get direct links to files in Google Drive by a Chrome extension (manifest v3)
Convert {ID}
to https://lh3.googleusercontent.com/d/{ID}
(or you can change to use https://drive.google.com/uc?id={ID}
by yourself)
Created links may be deleted by Google Drive, you can move the pointer to regenerate (this is a hack by adding a listener to "pointermove" 😜)
Tested on Brave 1.50.119 (Chromium: 112.0.5615.121)
- clone/download this repo; modify injected.js if you need
- go to chrome://extensions (or brave://extensions)
- toggle "Developer mode" on
- click "Load unpacked" and select the folder of the repo
- (optional) click "Details" of the extension and toggle "Allow in Private" on
- Open your google drive, browse images, and enjoy the hack
If it shows "404. That’s an error.", it means that the file is not shared. Please share the image(s) first
- Need to refresh page (F5) after uploading new images
- Only support image files (see
postfix
ininjected.js
) - Language should be either English or 繁體中文 (see
postfix
ininjected.js
) - To copy the link directly, you need to use the Shift key + right click on the generated link
This project is not provided by Google (Alphabet Inc.)
MIT