Handy Image

Shows just fullsize Image with hotkeys & without pop-ups on many image-hosting sites

< Handy Imageについてのフィードバック

レート:可 - スクリプトは動作するがバグがある

§
投稿日: 2024/08/26

Open disclosure:
Using Firefox 52.8.0 ESR + Tampermonkey 4.8.5847 + HandyImage 25/08/2024

This is not only browser, also using latest Firefox, but this old version 52 is essential to keep for an old extension that is used daily, not being updated anymore and not compatible with FF versions after 52.

HandyImage was working perfectly until yesterday when it ceased doing the re-size (zoom) bit. All other aspects of the HandyImage functionality are still working, just not the resize. I thought the problem might be my VERY old version of Greasemonkey installed. Since it was the last version of Greasemonkey that would run on FF52 anyway, I removed it altogether and switched to the last compatible version of Tampermonkey instead, which was a good 6 months later on from the previous Greasemonkey. Unfortunately this hasn't fixed the non-resizing behaviour either.

HandyImage updated itself automatically this morning to 25/08, so I have the latest version of HandyImage running via the last version of Tampermonkey I can have running in FF52, which has to remain as is for a critical extension that won't run in later versions of FF after 52.8.0

Problem is not specific to any one image host. Any ideas please of what to try to restore full functionality? As stated, it was working perfectly without problem until about 48hrs ago.

Owyn作者
§
投稿日: 2024/08/26

You could check history: https://github.com/Owyn/HandyImage/commits/master/HandyImage.user.js nothing in the script was changed except adding a new include & exclude rule, perhaps your other extensions or scripts got updated?

also, are you sure it also happens in the latest firefox 120+?

You could always check the browser console for errors (ctrl+shift+j) or inspect image element to make sure the rescale event is still there and there is no other even handling the click and blocking it - also, is rescale not working only when clicking or with the keyboard hotkeys as well?

§
投稿日: 2024/08/29

It's fine in latest FF. No changes there. Problem is only occurring in old FF v52

§
投稿日: 2024/08/29

Very odd and annoying. The only recent changes I've made to the setup is the change from Greasemonkey to Tampermonkey instead, but this was prompted by trying to solve the conflict, so the problem arose before swapping Grease with Tamper. None of my scripts are allowed to update themselves automatically EXCEPT HandyImage (because it's the most important and most trusted). To try and track down the conflict, I've now disabled all scripts in Tampermonkey EXCEPT HandyImage. I've done this because there was a conflict with something to do with Tampermonkey that was preventing the right-click lasso of SnapLinks Plus from working. When I disabled tampermonkey entirely, the SnapLinks lasso started working again, so there's definitely a conflict there somewhere. I'm hoping Tamper+HandyImage alone will not conflict with SnapLinks. So far that seems to be the case.

SnapLinks+HandyImage is the best when it works. I wish I had the skills to figure out why the resizing has just suddenly broken for no apparent reason

§
投稿日: 2024/08/29

I even get the little magnifying glass icon with the minus or plus symbol in it when mousing over the un-resized image in the new tab opened by SnapLinks and cleaned by HandyImage. It's just that it doesn't work anymore. I can resize manually by ALT+scroll wheel up/down, but this is not the same as handled automatically by HandyImage

Owyn作者
§
投稿日: 2024/08/29

I meant the script's hotkeys to resize - "TAB" key to fill and "Q" to fit

so it's a conflict with SnapLinks then? "select all links to open em" sounds like an easy task, perhaps there are alternatives?

§
投稿日: 2024/08/30

TAB and Q don't work as hotkeys unfortunately. SnapLinks works fine just the same as always. It's the HandyImage resize that no longer functions

Owyn作者
§
投稿日: 2024/08/30

is snaplinks the important extension you can't leave behind?

cuz using such old browsers is a huge risk to get viruses when opening internet since there were tons of vulnerabilities found later and fixed in later versions

§
投稿日: 2024/08/31

No SnapLinks is not the reason for keeping FF v52. That's downTHEMall! v3.0.8 download manager. To the best of my knowledge there has not been another download manager that does what the old dTa! v3 did and how it integrated with Windows/browser since that version. There was some disagreement between the author of dTa and Mozilla and what sort of app architecture they were going to allow in future versions of FF and the old dTa didn't comply with that and hence it got cut off. There s a new version of dTA of course, but it doesn't do all that the old version did which makes it a lot less useful and more annoying to use.

I'm going to try replacing TamperMonkey with ViolentMonkey script handler next, to see if tamper is the problem.

§
投稿日: 2024/08/31

Well this is now really annoying. Replaced Tamper with Violent and has made no difference. Handy still won't resize images. Running out of ideas to try now.

§
投稿日: 2024/08/31

I've never seen this config menu before, but ViolentMonkey makes it visible. I presume these settings are correct for resizing to work?

Owyn作者
§
投稿日: 2024/08/31
編集日: 2024/08/31

The config should be in other managers as well or on the "P" hotkey, it's ok

I use jDownloader for mass downloading, you can either select all the links and give it to it or just give the page with the links instead and it'll look for em, that's enough for me

You could always check the browser console for errors (ctrl+shift+j) or inspect image element (right click it -> inspect) to make sure the rescale event is still there and there is no other event handling the click and blocking it - also, is rescale not working only when clicking or with the keyboard hotkeys as well?

§
投稿日: 2024/09/01

The only way I can resize the image that results is CTRL+mouse wheel up/down. No hotkeys or mouse clicking (even with magnifier glass +/- icon present) works. What can I do with the error imformation shown?

Owyn作者
§
投稿日: 2024/09/01

You haven't updated it in a while it seems, half a year ago or so a new feature not present in old firefoxes was used, that's the error. You can update the script to see if the new update fixes it, I have added a fallback workaround for this issue

§
投稿日: 2024/09/03
編集日: 2024/09/03

It says I was using HandyImage 26-08-2024, so really not that old at all. I've now updated to 01-09-2024 but still it doesn't resize automatically. It does everything else brilliantly, just not the resize, which is a problem when so many photos these days are uploaded in super-mega-galactic ridiculous size.

Owyn作者
§
投稿日: 2024/09/03

Well, detecting when the window is active (to autoresize) is only supported since FireFox 56

You can add this custom js into the script settings to do it automatically (even for inactive tabs tho) :

function if_theres_an_image_then_resize(){ if(i && i.src) { onWindowResize(); autoresize(); window.clearInterval(task);} }
let task = window.setInterval(if_theres_an_image_then_resize, 50);
§
投稿日: 2024/09/04

Thank you. I'm not sure where to add the extra line, so I just tagged it onto the end on line 3693, but don't know if that's right? Should that work? I've tested it on some forum images and it doesn't seem to make any difference, so I'm guessing just appending that line to the end of the script isn't right.

Owyn作者
§
投稿日: 2024/09/04

script settings

this one, at the bottom

I've never seen this config menu before, but ViolentMonkey makes it visible. I presume these settings are correct for resizing to work?

§
投稿日: 2024/09/05

OK, with a bit of jiggery pokery trying different things, I finally got that custom JS line into the setup config manually. It looks like attached when all said and done. Unfortunately it makes no difference. Still no resizing happening.

Owyn作者
§
投稿日: 2024/09/05

any error in the browser console?

§
投稿日: 2024/09/06

Yes, sorry, a lot more errors this time

Owyn作者
§
投稿日: 2024/09/06

Well, there are no errors from HandyImage there

Maybe this would be better:

let task = window.setInterval(() => { if(i && i.src) { onWindowResize(); autoresize(); window.clearInterval(task);}}, 50);
§
投稿日: 2024/09/07

Here are the new errors. Still doesn't resize.

Owyn作者
§
投稿日: 2024/09/07

try alert("hello"); in the custom JS and see if it even shows at all...

§
投稿日: 2024/09/08

It won't even let me make that change at all due to a SyntaxError.

Owyn作者
§
投稿日: 2024/09/08

There is no check for syntax in the script configuration tho... you must be inputting it somewhere else and not in the "custom js action" and then clicking "save"

§
投稿日: 2024/09/09

That's right, just changing anything in this grey config window and pressing Save doesn't work because nothing is actually saved for next time. The grey config window is only useful for showing what the current saved settings actually are, but you cannot make any changes in here that will stick - contrary to what it looks like you can do. Through much trial & testing, the only way you can make actual changes that will stick and remain saved (to then show as such in the grey config dialog) is in the actual script editor Values tab section. See screenshot.

When trying this previously I was somehow able to trick the script editor into accepting that text as a valid entry. When I did so, the OK button in the top right becomes highlighted yellow indicating I believe the syntax is valid and can be saved. Again see screenshot. When clicking the yellow highlighted OK though is when I got the SyntaxError message and the save obviously failed. I can't find any other way of saving the Custom JS Action scripts that actually works and sticks.

Owyn作者
§
投稿日: 2024/09/09

Seems like it's the script manager's fault, try tampermonkey perhaps?

or else you'd need to "scape" the string before inputting it into the key storage raw via: https://www.freeformatter.com/javascript-escape.html#before-output

§
投稿日: 2024/09/10
編集日: 2024/09/10

Back to Tamper v4.8.5847 (the last version that runs in FF52), updated HandyImage to 01/09/2024, no other active scripts at all, still doesn't resize. Can't save script edits in Config screen and can't find anywhere else to be able to manually add custom JS entries beyond the grey config window (unlike with Violent).

Only thing I could find to run in Tamper was an automated syntax checker which says there are 54 syntax errors in the HandyImage script. Couldn't find anywhere to add custom JS entries. New console errors under Tamper attached.

Owyn作者
§
投稿日: 2024/09/10

Are there any new errors happening in the console when you click "save" and it doesn't work?

§
投稿日: 2024/09/11

Are there any new errors happening in the console when you click "save" and it doesn't work?

No. Tamper produces no error dialogs at all. The Save Configuration button is most of the time a completely dead button. You can click it, but you get nothing back as confirmation you have done so. It's like pressing the home button on a phone when it's switched off. It does nothing.

The ONLY exception to this was immediately after updating HandyImage script to 01/09/2024, when I looked at the configuration window settings on the first image I clicked on, I noticed the check button for 'Larger than window either' was unchecked. I then checked it and pressed the Save configuration button. That one time and ONLY that one time, I got a dialog pop up in the middle of the screen saying Configuration saved. That is the ONLY time I have ever seen a confirmation dialog of any kind appear from pressing the Save configuration button. Sure enough, it did work. The configuration did save the checkbox setting change I made.

I cannot now get that confirmation dialog (or any other) to reappear from doing anything in the grey settings window and pressing the Save configuration button. It is completely dead.

Owyn作者
§
投稿日: 2024/09/11

No. Tamper produces no error dialogs at all. The Save Configuration button is most of the time a completely dead button.

that means there's an error happening, there won't be an error dialogue, only an error line in the console at most tho

§
投稿日: 2024/09/13

This is the error console after loading a picture, opening the Tamper configuration window and trying to insert and save alert("hello"); into the JS box.

Owyn作者
§
投稿日: 2024/09/13

I see the error now, try the latest script version, now it should work

§
投稿日: 2024/09/14

Configuration saved dialog is now fixed and working and reliable. Resizing still does not function. Here's what it looks like when loading a picture with the alert("hello"); in the JS box

§
投稿日: 2024/09/14
編集日: 2024/09/14

Sorry, sorry, sorry, my apologies! I appear to have tested the script on a cached copy of an image and of course it didn't resize. On new uncached images, the resizing does appear to be working again to some extent now on script v13.09.2024. It's definitely an improvement and is closer to doing what it's supposed to do, but still not quite as expected. With the correctly saved configuration set as shown in image, new uncached images DO resize sometimes, but not vertically, meaning they stay in correct aspect ratio, but only resize to fit horizontally and do not resize to fit vertically. Either that, or the maximum amount of resizing is limited by the ability of the old browser to cope with very large images that need a large reduction like ~10% to be forced to fit the screen. From brief testing, it seems like 40% is the browser confined minimum.

§
投稿日: 2024/09/14

Update: Tested more extensively now using new uncached pictures and the script now appears to be working perfectly according to the saved configuration settings. Browser appears to be limited in most cases to a manual zoom resizing function activated by CTRL+mouse wheel minimum of 30%, but this is ignored by the HandyImage script and resize occurs to fit screen even if <30% is required to do so.

Is there anymore feedback or error script codes you would like to see to check operation? Is there anything else I can do to hopefully ensure future updates don't remove whatever the magic trick was that broke the script resizing in the first place?

Owyn作者
§
投稿日: 2024/09/14

You can try "Fill to window instead" option to fit even more (while cutting off parts of the image)

But the browser lowers the resolution of background tabs to save up, that's why it's like that.

you could also try this custom JS

window.addEventListener('focus', myfocus);
function myfocus(){
if(i && i.src){
    window.removeEventListener('focus', myfocus);
    onWindowResize();
    autoresize();
}}
§
投稿日: 2024/09/15
編集日: 2024/09/15

But the browser lowers the resolution of background tabs to save up, that's why it's like that.

Not sure that I understand this. Are you saying the browser is doing the resizing and so HandyImage has no control over the algorithm used and therefore the resultant picture quality?

I have inserted and saved the custom JS config setting provided. Haven't noticed any stark difference yet. Maybe if you can tell me what it's supposed to do, then I will know what to look for and can report back whether it works or not.

Owyn作者
§
投稿日: 2024/09/15

It's supposed to do the auto-resizing when you focus a tab and it becomes active

browser is doing

yea, browser is doing saving up so the script can't know what the full screen resolution is to make the image fully fit - if it is done in a non-active tab

§
投稿日: 2024/09/16

Thank you for the explanation. I think I can see the effect of the custom JS script now. It appears to resize the image to the window more fully, but it does chop off the very edges a bit in order to save needing to scroll with the mouse. I have removed that JS code now as I think I preferred the stock result without it.

Thank you for all your help.

§
投稿日: 2024/09/24

I hate to be a massive pain, but is it the case that the script is limited to the amount of resizing it can do by the limit of the browser version it is operating within? I've just opened some pictures which are very large, such that even at 30% zoom which is the minimum possible in a FF 52.8 window, the image is still too tall to fit fully within the window. HandyImage DOES do the resize as it's supposed to do, but only to the 30% limit of the browser. It that the correct functionality by design?

Owyn作者
§
投稿日: 2024/09/24

It's hard to say without seeing the actual image and its browser window, but maybe, who knows how old browsers worked...

§
投稿日: 2024/10/13

Yep, after extensive testing, I'm convinced now the limitation is with the resizing range ability of FF v52.8, and nothing to do with HandyImage. The problem just shows up now because a lot of posted photos are now being taken with ridiculous megapixel capable cameras in 4K, 6K, 8K and even higher resolutions that are simply beyond the capability of FF v52.8 to reduce enough to fit the screen because images that large simply didn't exist back when FF v52.8 was current software.

Thank you very much for all your efforts and patience with me. It is very much appreciated. I consider HandyImage along with adblockers and Total Commander to be software that no computer should run without. The internet is simply unuseable without HandyImage.

返信を投稿

返信を投稿するにはログインしてください。