Giter Site home page Giter Site logo

dezaimasu / cute-button Goto Github PK

View Code? Open in Web Editor NEW
40.0 40.0 7.0 355 KB

Little button to save images and webms in one click.

Home Page: https://addons.mozilla.org/en-US/firefox/addon/cute-save-button/

License: MIT License

CSS 5.21% JavaScript 83.33% HTML 11.46%

cute-button's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cute-button's Issues

Not correct image saving

Firefox 72

Hello.
For example, using this link if you save images from the description, the extension of these files will be with the prefix .webp
Also, some images are saved without previews. They cannot be opened in Photoshop. You can check this link.
Please fixed.

Regards.

twitter video issue

in a twitter video the cute button shows until the video autoplays and it vanishes and Ctrl key doesnt show it! can you do something about it?

thank you!

Add option to increase button's relative distance from corner

An issue I keep running into is how often the button overlaps with website's UI, due to how close the button is to the image's edge. Given that websites are rarely consistent on where they place these objects, specifying which corner to use is less useful than being able to increase the distance between the button and the corner.

Does not work in browsers on the chromium engine(not counting chrome)

It does not work in browsers on the chromium engine(not counting chrome)
In all others it tries to save the image as ".htm"
I was digging in the settings, but I couldn't fix it myself, or understand what I was doing wrong.
And besides that, I had a problem with custom folders.
There is no way to configure it so that it swings from a certain site to a certain folder(it seems that I did everything according to the tips in the extension, but nothing happened, after setting a custom folder, the download does not even begin)
I hope for your help and thank you in advance!

Stopped supporting Instagram

It no longer downloads images from Instagram. The download just fails.

  • Firefox 87

I hope this issue will be fixed soon. Also, while I'm at it, I hope you'll add a feature that lets it download IG videos as well.

Thanks! You saved me a lot of time.

Twitter Size Issue (Chrome)

Images on (non-legacy) Twitter now only download the size that is displayed, instead of the "name=orig" size, unless opening up the image url and manually changing it

Not working on BDSMLR images

Images hosted on BDSMLR.com cannot download.
It initiates a download, but tries downloading a webpage (.html) instead of the image.

May be related to a referrer header issue?

Не работает сохранение для отдельного домена

Я тут отзыв писал https://addons.mozilla.org/ru/firefox/addon/cute-save-button/reviews/1410179/
Само расширение очень хорошее. Было. Но у меня на 68.0.1 не работает сохранение для отдельного домена. Сохраняет все равно в папку по умолчанию.

Дополнил: Сайт pornreactor.cc. Я по document.location.hostname и скопировал имя домена.

dosnt work with pixive

i am not sur if this is my fault or not. because it worked jesterday just fine. than i experimanted a bit with settings of the addon. and now everything seems to work at first but the downlode always fails.
this is realy strange because i downloded without the addon and it worked. than i compered the downlode like from the addon and the one i donloded without the addon. strangly the downlode link is the same. but it only works when i downlode it without the addon.
i reset all the setiings and even reinstaled the addon but the downlode are still failing.

Fullsized Deviantart Images Don't Detect Save Button Properly

Problem:
When you click on an image in Deviantart it usually allows you to zoom in twice. Once to get a slightly larger version of the image in its own frame, and once more to fully enlarge this version.
The save button only works with the first image size.
On the two larger sizes the button appears but is not clickable. And actually sometimes only downloads the preview size version if the save button is used on this one. (I am not sure if this is related because it actually says 'pre' somewhere in the filename. )
Other:
I am using Firefox 82 and I use Windows 10's native app scaling to 150%. Which may be why this hasn't been reported as an issue before. Please let me know if you need other info as I would like to be able to use this button for DA as well. It's very useful and I appreciate it immensely.

Could I add some smaller function requests too? And if so should I make them in their own git issue?

webp support?

I noticed today the current version doesn't download webp images. I'm not sure if the past versions did but this version doesn't. :) I wonder if anyone else had this issue.

Excluded Sites

I have two suggestions regarding the excluded sites:

  • The button that is created in the toolbar allows to globally activate or deactivate the plugin, it would be useful if it also allowed to add the site to the list of excluded sites.
  • The text box for adding excluded sites is very small, a larger text box with vertical scrolling would be better.

Thanks .

An option to disable saving on space

I use Space to scroll pages. When the mouse pointer happens to be over an image, Space doesn't scroll but instead downloads and saves the image, which is not what I want.

It would be nice to have an option which disables this behaviour.

[issue+feature request] Please add an option to disable the button and only use spacebar to download

Issue: dl button (bottom right) appears on top of "full-screen" button for videos and i can't full screen the video.

firefox_ABKjbZCsdW firefox_Bnnkpwanpl

Possible fix: make the button appear just above the video controls bar somehow?

Feature request: Make an option to disable the button entirely and make it possible to download media via hotkey only.

thanks for the amazing extension. its made downloading images and clips a lot easier.

cute button no longer appears when enlarging a Twitter picture

I usually use this on Twitter by first clicking on the picture itself to enlarge it (to get the full size version) and then use Cute to download images.

Was working fine just awhile ago and now the Cute button no longer appears after enlarging (however, if I rightclick --> View Image and image is opened in a standalone tab/window, Cute button appears). Maybe Twitter did some changes on their website to prevent Cute from working?

  • Using Firefox 78.0.1 (64-bit).

here's an example

cute button appears here, but if I click to autodownload, it will not download full size version, so I have to click to enlarge it

firefox_t41T5qnwj2

usually after clicking, we should see the cute button appear on the top right, but it doesn't appear anymore.

9agqdwqjWq

extra tests I did on the side, but issue still persists

  • changed cute button to display in various positions
  • using a different cute button image
  • not able to hold control+alt -> mouseOver to download automatically, since Cute doesn't detect image

Renaming feature

Hello. Can you add renaming feature? It would be handy to be able to add date prefix to images so they would be neatly sorted in a folder.

Separate all sites-related crutches

Move all site-specific decisions to some external file which can be plugged to the extension so I don't have to update my cute™ button every time some code monkey (you get it, monkey, ha-ha, thanks Abu) decides to change the layout.

2ch.hk don't have buttons to download on preview

Does not work with pictures\videos on 2ch.hk on preview.
ie, the download button appears, but only after the picture\video after clicking on it.
And I would like to be able to download it from the preview. (As for example it is implemented in vk.com )

stuff

А можно добавить настройку ресайза кнопки?
Алсо, "Save with original name..." сохраняет картинки из треда с названием пикчи ОП-поста. Кнопка подвисает и остается на месте на некоторое время при ресайзе и передвижении картинки.

Еще одна идея. Добавить галочку для
de_cbutton{opacity:0;}
de_cbutton:hover{opacity:1;}
Чтобы кнопка постоянно не маячила. Вот только

Кнопка подвисает и остается на месте на некоторое время при ресайзе и передвижении картинки

И не всегда попадешь по ней. Хотя, можно и прозрачность небольшую сделать для видимости.

Enhancements

Был бы очень благодарен за добавление следующих фичей:

  • Возможность менять изображение иконки сохранения. Всё-таки, «cute» для каждого является сугубо индивидуальной вещью, хочется иметь возможность поставить свою иконку (нет-нет, ваша иконка великолепна).
  • Сохранение различных типов файлов в различные директории. Так, например, хочется иметь возможность сохранять пикчи и гифки (jpg/png/gif/...) в папку, скажем, ~/Pictures, а те же webm — в ~/Videos.
  • Возможность менять хоткеи и стандартное поведение. Так, например, при наличии возможности сохранить оригинальное название, я хотел бы иметь возможность делать это поведение дефолтным по Left Click.

Спасибо за разработку расширения.

Use runtime.lastError instead of extension.lastError

I'm getting this often (Firefox):

image

Error: Please use $(ref:runtime.lastError).

Problem is, this totally spams the logs of other extensions with error messages as well.

It refers to this code:

/* To override "user" originated css rules form other extensions */
function addButtonStyles(tabId){
  chrome.tabs.insertCSS(tabId, {
    allFrames : true,
    cssOrigin : 'user',
    runAt     : 'document_start',
    file      : 'css/button.css',
  }, () => {
    if (chrome.extension.lastError) {return;}
    chrome.tabs.sendMessage(tabId, 'css_injected');
  });
}

I haven't checked if there are other places that use the legacy extension.lastError alias.

Firefox and other hard drives

Hi
I came across this addon and it looked perfect for what I needed. I simply wanted a way to bypass the directory and filename setting prompt for image downloads for stints of mass downloadings. This has all the features to do it with the hotkeys and custom directories it seems.
The problem is that the folders I'd like to save to are on external hard drives, while Firefox is installed on my regular c: drive.
For example I want to set ctrl+RMB to save instantly to g:\documents\screenshots while ctrl+0+LMB (owing to mouse hotkeys, less clunky than it looks) saves to e:\documents\webm.
Trying to set this up the directory save path boxes are red outlined and trying to click Save says that absolute paths are not allowed.

Am I SOL with using this the way I was intending? The How To does mentions the paths are relative to the browsers default save directory, which I'm guessing means I can only save to different folders on the c:\ drive where mozilla is installed? Is there no way around that? If so is there perhaps another option you or anyone could suggest looking into?
This really did seem perfect but I'm having a hard time finding anything remotely close or as good (rather than just the directory problem, everything else I look at also has issues like no hotkeys for alternative paths, so I'm at my wits end...)

Thanks, sorry this isn't a proper issue and just a basic question.

Optionally add prefix or show dialog (Save as or warning) only if target file exists in folder?

Frequently in cases when I save images from discord or some other sources they are named as "unknown.png" or have some other same filename despite being different and sometimes I resave the save image from some image board finding it from another place.

As of now it blinks red and downloads while automatically adding numeric postfix, encountering the same filename.

I rememer there being option to display "Save as" dialog if file exists but I don't see the option in the current version.

Ideally, there would be an option to add prefix or show "Save as" dialog or show warning (file exists without starting download) tooltip at first if file exists for specific hosts.

Basically what I am talking about is making
conflictAction: 'uniquify',
configurable from settings panel on per host basis.

Plugin is ignoring never save history option

Hi great plugin and well done. Just noticed that the plugin is saving history even though the setting in the browser (firefox) is set to never save history. I tried removing references in your code to save history locally but couldn't get it working

Cheers

Doesn't work with www.sex.com

The button appears, but images fail to download.

I'm using Firefox 112.0 (64-bit), on windows 10, but this issue has been ongoing for over a year.

Adding "grab original X" functionality to new sites

Currently supported:
Downloading with original filenames: 4chan.org, 2ch.hk, iichan.hk, 8ch.net, boards.fireden.net, yuki.la
Downloading original full-sized images: vk.com, twitter.com, tumblr.com

Ask here if you want more sites supported.

500px

Привет. Спасибо за расширение. Обмазываюсь и доволен, но столкнулся с проблемой на сайте 500px.com.

Выставил в настройках, чтобы при сохранении изображения в имя писался title, чтобы получить файл вида dolomites-sunrise-by-mike-tesselaar (для примера).
Однако заметил, что заголовок страницы прогружается с задержкой, до прогрузки в нем лишь "500px". Расширение захватывает именно его. Так что для всех сохраняемых изображений получается одно и тоже название (500px.jpg).
Есть ли возможность обойти проблему?

3 suggestions

Hello

  1. Can you add option to not hide save button instantly? 5 seconds delay maybe? This can be very useful as an alternative to the CTRL key, which is somewhat inconvenient to use if you are sitting like a lazy panda...

  2. Can you add option for a bigger save button? 48*48px maybe? Or a customizable size if its possible...

  3. Can you add a hack to https://bdsmlr.com/ (NSFW site! But a lot of people moved here after Tumbr porn-ban event) to always save original images without clicking on the preview? The things is, that im not sure that i can provide you a link to SFW blog for testing needs. I really tried to find it to no avail. :/

Thank you!

ongoing TODOs

make overlay detection not host-dependable, add some kind of caching for overlay element
kinda done d3de881
done e337cd9

cannot define custom folder in Chrome

Hello, if I put a custom folder for image download, the button won’t work. Chrome.

(I’m not very surprised as it seems that Chrome does not allow saving in different folders)

Customizable site hacks

Move this stuff to user settings so people could write their own hacks for websites they use.
Probably should also convert it to css because who tf uses xpath in '23.

siteHacks = {
'twitter.com' : 'self::div[not(*)]/../../preceding-sibling::div[not(@class)]/div/video',
'tumblr.com' : 'self::a/parent::div[@class="photo-wrap"]/img | self::a[@target="_blank"]/parent::div/preceding-sibling::div[@class="post_content"]/div/div[@data-imageurl] | self::span/parent::div/parent::a[@target="_blank"]/parent::div/preceding-sibling::div[@class="post_content"]/div/div[@data-imageurl] | self::div[@class="vjs-big-play-button"]/preceding-sibling::video',
'yandex.*' : 'self::div[contains(@class, "preview2__arrow")]/preceding-sibling::div[contains(@class, "preview2__wrapper")]/div[@class="preview2__thumb-wrapper"]/img[contains(@class, "visible")] | self::div[contains(@class, "preview2__control")]/../preceding-sibling::div[contains(@class, "preview2__wrapper")]/div[@class="preview2__thumb-wrapper"]/img[contains(@class, "visible")]',
'instagram.com' : 'self::div[parent::div/parent::div]/preceding-sibling::div/img | self::div[@role="dialog"]/../../preceding-sibling::img',
'iwara.tv' : 'self::div[@class="vjs-poster"]/preceding-sibling::video[@class="vjs-tech"]',
'vk.com' : 'self::a[contains(@class, "image_cover") and contains(@onclick, "showPhoto")]',
'behance.net' : 'self::div[contains(@class, "js-prev") or contains(@class, "js-next")]/following::div[contains(@class, "js-slide-content") and not(contains(@class, "hidden"))]/img',
'2ch.hk' : 'self::div[@id="html5videofixer"]/preceding-sibling::video',
'pixiv.net' : 'self::button/ancestor::div[@role="presentation"]//img',
},

Tumblr Photoset Dupe Issue

I have long been running into an issue of getting a lot of dupilcate versions of one or a few images when using the Cute button on tumblr. I finally realized and managed to recreate the issue consistently:
Tumblr phototsets (which is to say, at least 2 images) allow you to click on the right or left side to go forward and back in a set. If you save a picture in that set with the Cute button and then quickly move through to any other image, there is a high chance it will be download duplicate images and not the intended new ones. Sometimes it happened while using the Cute button on other images in the set. Sometimes it seemed to interpret the clicks between pictures as a click on the Cute button for the duplicated picture as well. This seems to be mainly if the cute button is used on other images as well.
Let me know if you need any other information.

Also wanted to throw the request of full resolution downloads of the sites zerochan or safebooru if possible? It'd be useful to use the button and also avoid having to click through 2-3 times to download the fullest size version.

it does not work on pixive

the images are detected and the download starts. it even has the right link. but somehow the download fails and it says "file wasn't availabil"

Broken twitter downloads

Hello. Twitter has changed their UI for logged in users and now images have different urls and the addon can't handle them.
If you're logged out, Links are the same as usual. If you're logged in, they looks like
https://pbs.twimg.com/media/IMAGEURL?format=jpg&name=360x360
You get a similar url if you use https://tweetdeck.twitter.com/

If you change the url to
https://pbs.twimg.com/media/IMAGEURL.jpg:orig
you'll get the original image as usual.
Can you fix it?

Save image from cache

Hello, is there any way that when saving firefox image does not download again and save it from cache directly? Some sites, upon requesting the image again, block it and download another. Ex. Chan.SankakuComplex
Greetings

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.