Save images to hard disk WITHOUT prompt?

后端 未结 6 1876
走了就别回头了
走了就别回头了 2020-11-27 07:52

I use twitter. Some people\'s tweets contain photos and I want to save them.

I checked ifttt, where twitter is not a trigger. Thus, ifttt cannot help me do it.

6条回答
  •  暖寄归人
    2020-11-27 08:13

    Greasemonkey cannot do this, because ordinary javascript is forbidden to do this (for security reasons), and the Greasemonkey API does not expose a method to write files (and never will).

    Here are four alternatives:

    1. Update: Switch to Tampermonkey, which you should do anyway. Then you can use GM_download as user136036 said in his answer.

      or

    2. Install and use the excellent DownThemAll add-on (Update: Firefox 57 withdrew support for this kind of extension). It still requires one click, but that's better than always grabbing a file willy nilly, in most cases anyway.

      or

    3. Write your own addon extension. See this (now obsolete) answer for file-writing code from one of the top gurus of FF add-ons. But "new" style extensions can still do this.

      or

    4. Use XAMPP (or similar) to run a web server on your machine. You will then have to write a web application that excepts incoming image data (or just the image URL) and saves the image to disk.

提交回复
热议问题