Giter Site home page Giter Site logo

ademking / betterviewer Goto Github PK

View Code? Open in Web Editor NEW
229.0 10.0 18.0 3.9 MB

a replacement for the image viewing mode built into Firefox and Chrome-based web browsers.

License: MIT License

JavaScript 58.79% CSS 17.49% HTML 23.72%
chrome-extension image-viewer image extension firefox-extension edge-extension browser-extension chrome-extensions image-view

betterviewer's Introduction

ademking

Support Palestine

betterviewer's People

Contributors

ademking avatar allcontributors[bot] avatar bbbenji avatar imgbotapp avatar metacor avatar patrykdziurkowski avatar

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  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  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  avatar  avatar  avatar  avatar  avatar  avatar

betterviewer's Issues

[Request] Maximise image button

A maximise button would scale the image to display as large as it can.
This is different from fullscreen as fullscreen takes up the whole screen, whereas this makes the image large enough to fill the window.

An auto-maximise option would also be nice, where when opening an image it will automatically be maximised, and then from there you can resize it however you like.

This would be useful for viewing things like pixel art, which by default will display really small, and can be annoying to constantly zoom in to see.

If technically possible, remembering the view setting (zoom/pan) for a specific image.

First, I want to say thank you, very great extension! :)

So my idea is that the extension can remember the last view of an image (specifically for my need the level of zoom/pan).

If I close the chrome tab and I open the same URL, the zoom and pan will be the same.

This is very useful as I use this for very big jpg map.

That's it!

Thank you again.

[Issue] Going 'back' loads an image with the extension on webpage

If an image loads in the same tab as the web page, then pressing back, to return to the web page, keeps the extension loaded with an image from the webpage you were reading, when you clicked an image, that opened in full, in the same tab.

Ie. When i press back to return to the article i was reading (that didnt open an image in full in a new tab, for some reason. Or, use an 'on page' gallery..) then the buttons and mouse controls mean i have to refresh the page to continue scrolling and using the webpage, after going back
Screenshot 2021-12-19 005709

Allow adjusting zoom speed

Allow us to zoom in slower or faster by changing the speed through the settings.

I feel like the current zoom in speed is too slow, but some people might also find it fast or perfect. So a customizable setting would be great!

Also, it's an amazing and clean extension <3!

Firefox port and other small suggestions

Hey, I don't know if you've looked into porting the extension to Firefox but I've tried a few things and here's what I've noticed:
The extension mostly seems compatible with both browsers since Firefox supports "browser.*" namespace for APIs as well as "chrome.*".
The first problem is Firefox requires an addon id in the "manifest.json" in order to use "storage.sync". This can simply be fixed by adding something like :

"browser_specific_settings": {
  "gecko": {
    "id": "51846946-47ad-4ea1-bac3-ed242f738cf1",
  }

This throws a warning called "unrecognized manifest key" in Chrome, it's just a warning so not a big deal but can be fixed by having separate "manifest.json" files for both browsers.

The second main problem is "Crop image" and "Extract text" are not working, here's how it looks like. They both use "cropper.js" I believe, so that might be where the problem comes from ?

Screenshot-2022-01-25-16-59

I have other small suggestions like for example: moving the windows or toasters at the top by default because when the browser window is not wide enough, they tend to overlap with the toolbar which can be annoying but these are small changes so I can make a pull request if you're interested :

Screenshot-2022-01-25-17-12

'Toggle theme' is not persisted

Tested on:

  • Vivaldi 5.0.2497.38 (Stable channel) stable (64-bit)
  • Brave 1.33.106 Chromium: 96.0.4664.110 (Official Build) unknown (64-bit)

Actual vs. desired behavior:

  • When clicking 'Toggle theme' I expect this setting to be persisted. It is not. Instead, upon each and every image, theme is reverted back to 'blurry background' one. This is disturbing at night. If the change is not persistable, this should be clearly communicated. As of now, this is not the case. In order to offer better user experience, this setting should be clearly persisted. It makes no sense to do this on per-image basis as it is not only annoying but also makes no practical contribution on per-image basis to the overall UX.

Thank you for looking into this and for your work on the extension.

Status of the project?

No commits since last year's November, would be cool to atleast see an archival/unmaintained message ๐Ÿ‘

Open image on a new tab not working on WhatsApp Web

When i use the open image in a new tab in an image from the WhatsApp Web tab the image opens in the default browser's image viewer.
The extensions seem to be working fine with the example image, on google images and in one other website that i tried, but in WhatsApp (That was the main place i wanted to use the extension) it's not working.
I'm using Microsoft Edge.

Feature requests

Hi

Just discovered this great extension and see a couple things missing that would make it perfect.

  1. A hover zoom feature. It's already an image extension, it would be a natural fit, and make it a fully well-rounded extension to add the usual "hover zoom", so that we don't have to also install yet another extension (hover zoom+, which has a history of malware) just for a hover zoom feature.
  2. Ability to use Imgur instead of only imgbb (bonus if we can also use our own self hosted solution (ie something like Cheveretto on Docker)
  3. Stamps. Some basic ones like you'd see in a default snagit installation. like numbers, emoti's, and I don't know if it's possible, but add our own, for something like a quick watermark.
  4. Zoom ability when using the "paint" window.
  5. Some tools in the paint window should automatically also use a select ability. ie when I go to use the pixilize tool, I repeatedly kept accidentally painting on the image and having to undo, because I'm so used to so many other tools that automatically allow you to select and pixilize in the same click and drag movement.

Just noting that these aren't complaints per-se, I love it so far; just think these additions would make it perfect, and like it should be included as a default built right into the browser itself! :)

BetterViewer fork

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Photo Editor not working

Hi!
I've been using BetterViewer for a week. Thanks for this great addon. But Photo Editor is not working. When selected a blank editor tab opens but nothing happens. I don't know if it's only for me but tried it on an different Firefox profile without other extensions. A blank one i mean.. I guess there is a problem with that feature.
Best regards!

Desktop

  • OS: Windows 10
  • Browser : Firefox
  • Version : 108.0.1

Open locally saved image files

I really would like to see support for images saved on my hard drive, because this image viewer is actually a lot better than most dedicated image viewer apps out there.

I tried enabling "Allow access to file URLs" but that didn't help.

This would only be really useful if it opened local images directly in the viewer without having to open it first and then right click and open image in new tab first. i'd also like a dedicated context menu entry for instead of open image in new tab.

Shortcuts would also be nice, especially for fullscreen.

Anyways, i really appreciate the work you've done here! The result is surely magnificient and from my view it's only those few things that are holding me back from deleting every image viewer app on my pc and only using Better Viewer.

[Request] prevent overscrolling

When grabbing the image, I can easily grab it out of the view. I think it is a small thing, but at the same time I'd love to see it perfect!

Alt+D hijacking?

Describe the bug

When viewing an image in BetterViewer tab, the Alt+D key combo to focus the address bar no longer works

To Reproduce
Steps to reproduce the behavior:

  1. Open an image so that BetterViewer loads it
  2. Press Alt+D (on Windows at least)

Expected behavior
Address bar should be focused, but isn't - I think BetterViewer is hijacking that keyboard shortcut

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: firefox
  • Version: 100 (tried on 2 PCs)

Additional context
This may be by design and not a bug ๐Ÿคทโ€โ™‚๏ธ, but I use Alt+D (standard shortcut for focusing the address bar since the dawn of time) all the time! Thanks

configurable shorcuts

I would like to config the shorcut, like single left clik or spacebar to zoom 1:1.
(Chrome user, I've double click already set by another extention to download the image)

Is it possible to modify a file to set that?

Thanks for this amazin work!

EDIT:
I added in all.js file
Mousetrap.bind('space', () => { document.getElementsByClassName('viewer-one-to-one')[0].click(); });
and it works, with spacebar i can zoom 1:1

I tried also
onclick = (event) => { document.getElementsByClassName('viewer-one-to-one')[0].click(); };
but then when you pan with LMB it will zoom in and out, so not really working.

I'm satisfied with spacebar solution, anyway it would be useful for other users too to have configurable shorcuts, thanks.

Fails to open settings

Describe the bug
Fails to open settings

To Reproduce
Steps to reproduce the behavior:

  1. try to open the settings

Screenshots
image

Desktop (please complete the following information):

  • OS: Linux
  • Browser ungoogled-chromium
  • Version 1.0.5

Additional context

settings.html:1 Blocked script execution in 'chrome-extension://llcpfkbjgkpmapiidpnohffjmmnhpmpb/pages/settings.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.

Userscript version?

Is your feature request related to a problem? Please describe.
Userscripts are a great alternative to extensions as extensions are blocked for many people. It would be good to see a version of this that isn't dependent on some chrome.* apis, although from the code it appears that's only used for messaging and the about page.

Describe the solution you'd like
Bundle this as a userscript

Describe alternatives you've considered
Try to do this myself โ€“ It was too hard

Additional context
This is really cool

Reddit images bypassing BetterViewer due to redirects(?)

Describe the bug
A month or two ago, Reddit introduced a change that broke the way opening images worked. Normally the image would be direct and BetterViewer would be able to open it. Currently, the image redirects into Reddit's own website, bypassing BetterViewer.

To Reproduce

  1. Find an image on Reddit.
  2. Open it into a new tab.

Expected behavior
Opens the direct image into BetterViewer.

Screenshots
image

Desktop:

  • OS: [Windows]
  • Browser [Firefox]
  • Version [116.0b8]

Additional context
Images smaller than 1080p seems to work exactly like expected. Here is a Reddit post for additional info..

Extension breaks Google Photos UI

I've discovered a rather finicky issue here with Google Photos, seems to be reliably reproducible as well..

  1. launch Google Photos
  2. open any picture
  3. select "Download" from the "More options" menu (kebab icon, top right)
  4. select the "Back" arrow from the top left

at this point, you should be left with your Google Photos thumbnail gallery view, and BetterViewer's UI controls overlay. the only way to clear this state is by reloading the page.

this "Download" step is critical to reproducing this issue though; even if you open the "More options" menu and then back out of the image, BetterViewer UI does not come up unless you explicitly download the image.

I do have other extensions installed, though none relating to image viewing, so I doubt they would be causing any conflicts here.. so if you are unable to reproduce the issue, please do let me know so I can do some more thorough testing.


my current environment:

  • OS: Windows 10 Pro x64 21H2 build 19044.1466
  • Browser: Chrome 97.0.4692.71

No in-between sizes when inserting text

The only sizes are 1,2,4,8,16,64. The inserted text is always either too small or too big, I would love it if you could add more sizes, or even better, allow the user to input the text size in the size box.

Other than that, I love everything, if I could, I would make this the default photo viewer on my pc.

Image being Blocked by other extension since recent Update

As of recently another extension (https://github.com/RomanistHere/PopUpOFF) which blocks annoying cookie banners/popups on sites so you dont have to click disable/accept, is blocking the picture from loading with your extension.
Ive always used both extensions successfully but as of a recent update PopUpOff has started blocking the image unless set to dormant (off) which isnt the setting i want for the site where im viewing the image.

Thanks, Sam

Ctrl+Q in Firefox conflicts

Hitting Ctrl+Q shows the Firefox quit confirmation dialog instead of doing "Flip vertical".

  • OS: Linux
  • Browser Firefox 106.0.4
  • Version 1.0.5

addons.mozilla.org images not supported

Describe the bug

This does not seem to work properly on images found on Firefox add-ons.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://addons.mozilla.org/en-US/firefox/addon/betterviewer/
  2. Right click on a screenshot
  3. Click "Open Image in New Tab"

Examples:

Expected behavior

Image will open and have BetterViewer controls.

Screenshots

image

Desktop (please complete the following information):

  • OS: macOS 11.5.2
  • Browser: Firefox 100.0
  • Version: 1.0.4

Additional context

N/A

Can you add support for the Data URI Scheme for "Open image in new tab"?

I really like this extension!

I see on your welcome page that the sample jpg is displayed within an img HTML element and I assume you are working off the src attribute to determine if you can display "Open image in new tab" in your context menu.

<img id="demo-img" class="pulsate-fwd shadow cursor-pointer lg:w-2/6 md:w-3/6 w-4/6 object-cover object-center rounded" alt="hero" src="cat_dog.jpg">

It would be great if you could add support for the Data URI Scheme and allow that to also display "Open image in new tab" in your context window when one is encountered.

<img id="myImage" alt="Image Display" src="data:image/png;base64,<base64EncodedString>">

Here is a sample with a tiny Base64 Encoded String included:

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" />

Where image/png is the Media Type. Other valid image Media Types include: image/avif, image/jpeg and image/svg+xml.

Not sure if the extension currently supports PNG images but I know it supports JPG so if no other media types if you could support image/jpeg within the Data URI Schema that would really be great!

Thank you for considering this enhancement!

Enhancement: increased zoom step with Ctrl+Shift+Scroll

Is your feature request related to a problem? Please describe.
Increased zoom step with Ctrl+Shift+Scroll (For faster zooming)

Describe the solution you'd like
Ctrl+Shift + mouse wheel = faster zoom

Describe alternatives you've considered
Ctrl+Alt + mouse wheel = faster zoom
Shift + mouse wheel = faster zoom

BI doesn't function properly

Describe the bug
Sorry to spam you! Really looking forward to test driving the addon! I'm getting some odd behaviour where BetterViewer loads but seems to fall over. I can only reproduce the issue on one PC ๐Ÿ˜‘

To Reproduce
Steps to reproduce the behavior:

  1. Open an image to launch BetterViewer

Expected behavior
BetterViewer should load the image normally. Instead, the background blurry image is shown, but the actual image doesn't show and the image controls do not function:

GIF recording here:

https://imgur.com/a/N65YCd0

Screenshots

https://imgur.com/a/N65YCd0

Desktop (please complete the following information):

  • OS: Windows
  • Browser: firefox
  • Version: 102.0a (Nightly)

Additional context

Since it's just one PC that's having the issue, definitely could be something weird on my end.

[Request] The ability to change the zoom speed

Having the ability to adjust the speed at which you can zoom in and out with the scroll wheel would be great, as the default speed is really slow and gets annoying having to constantly zoom into small images really slowly.

Imgur upload

I wanted to ask how much is expiration date IMGBB upload ?

Image Modifications Lost When Going Full Screen

When making modifications to an image in the browser any modifications made are lost when going into full screen mode.

Steps to reproduce the behavior:

  1. Open an image in the browser
  2. Rotate image, change zoom, etc...
  3. Click the Full Screen button
  4. Image modifications are lost, returning from full screen modifications are still lost

I would expect my modifications to the image to be retained when going into and out of full screen mode. I understand these changes are not affecting the underlying image and that if I close the tab my changes are lost.. but while viewing the image with your extension I expect the changes to be persisted as long as the tab is open.

  • OS: Windows 11
  • Browser: Edge
  • Version: 108.0.1462.54 (Official build) (64-bit)

Original image showed in background together with main picture.

When I do "open image in a new tab", the image is indeed opened in a new tab, however I can still see the same image displayed at the bottom half of the screen, as a background. Trying to change theme (light, dark, blurried) - did not help.
Please see this screenshots:
https://imgur.com/MnYhNHZ
https://imgur.com/h5pH4mW

My system: Windows 11 Pro
Version 10.0.22000 Build 22000

Screen resolution: 2560 x 1440 x 74Hz
Bits/Pixel: 32

Browser:
Microsoft Edge
Version 100.0.1185.36 (Official build) (64-bit)

Comparison with Viewhance

How does BetterViewer compare with Viewhance? I am looking for a robust, feature rich image viewer to replace Viewhance which has been removed from the Chrome extension store for a couple of years now.

If this issue thread isn't the right place for my question, please move/delete accordingly.

Thanks!

Alt + Left not working on Chrome to go to previous page

Describe the bug
If I open an image in a tab that was already open, creating navigation history, I can't get back to the previous page using browser shortcut Alt + Left when seeing the image with BetterViewer.

To Reproduce

  1. Visit any site, for example: https://unsplash.com
  2. Then paste a direct URL to a image in the same tab, e.g.:
    https://play-lh.googleusercontent.com/V_P-I-UENK93ahkQgOWel8X8yFxjhOOfMAZjxXrqp311Gm_RBtlDXHLQhwFZN8n4aIQ
  3. Try to go back to previous page using keyboard shortcut Alt + Left
  4. Nothing happens

Expected behavior
Go back to previous page normally.

Additional context
You can click "Back" button on browser to go to previous page then "Forward" to return to the image again, it works normally. It doesn't work with the keyboard shortcut.

Desktop

  • OS: Ubuntu 22.04
  • Browser: Google Chrome
  • Version: 116.0.5845.110 64 bits

cropping doesn't let you see the full image

When you try to crop most images, the image will be zoomed in and you can't see parts of it.

Steps to reproduce the behavior:

  1. Go to any image
  2. Click on "open image in new tab"
  3. Try to crop image
  4. Most images will be zoomed in

gat

Notice the cat's paw being lower in the crop section. Here it is relatively minor, but on some lower quality images basically half the image is unseen to you.

Feature Request: Support Vanilla Image Drag Behaviour

Is your feature request related to a problem? Please describe.
I'd like to be able to drag the image from the Chrome window directly into Explorer to save it (like you can with almost any draggable/selectable image).

Describe the solution you'd like
The ability to hold a modifier key (Ctrl, Shift, whatever) that would change the drag behaviour to the Chrome default image drag behaviour.

Describe alternatives you've considered
A previous Image Viewer extension I used had this feature, though that extension rarely works anymore.

Additional context
Basically this behaviour:
chrome_RYMkulhykF

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.