ademking / betterviewer Goto Github PK
View Code? Open in Web Editor NEWa replacement for the image viewing mode built into Firefox and Chrome-based web browsers.
License: MIT License
a replacement for the image viewing mode built into Firefox and Chrome-based web browsers.
License: MIT License
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.
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.
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
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!
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 ?
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 :
Tested on:
Actual vs. desired behavior:
Thank you for looking into this and for your work on the extension.
No commits since last year's November, would be cool to atleast see an archival/unmaintained message ๐
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.
Hi
Just discovered this great extension and see a couple things missing that would make it perfect.
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! :)
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.
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
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.
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!
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:
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):
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
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.
I tried to install it on kiwi browser in Mi Pad 5 pro but it seemed not to work. Is there a plan to further support mobile browser like kiwi browser?
Describe the bug
Fails to open settings
To Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
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.
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
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
Expected behavior
Opens the direct image into BetterViewer.
Desktop:
Additional context
Images smaller than 1080p seems to work exactly like expected. Here is a Reddit post for additional info..
We can use Camanjs http://camanjs.com to adjust Hue and saturation
I've discovered a rather finicky issue here with Google Photos, seems to be reliably reproducible as well..
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:
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.
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
I want to open SVG files using BetterViewer
Hitting Ctrl+Q shows the Firefox quit confirmation dialog instead of doing "Flip vertical".
Describe the bug
This does not seem to work properly on images found on Firefox add-ons.
To Reproduce
Steps to reproduce the behavior:
Examples:
Expected behavior
Image will open and have BetterViewer controls.
Screenshots
Desktop (please complete the following information):
11.5.2
100.0
1.0.4
Additional context
N/A
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!
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
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:
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:
Screenshots
Desktop (please complete the following information):
Additional context
Since it's just one PC that's having the issue, definitely could be something weird on my end.
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.
I wanted to ask how much is expiration date IMGBB upload ?
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:
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.
Love the new photo editor on the latest version(1.0.5). But it seems the draw feature is no longer there.
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)
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!
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
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
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:
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.
Is your feature request related to a problem? Please describe.
I want to remove Image Backgroun. Just like https://www.remove.bg
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.