Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] support for "pictwn.com" and "outletpic.com" #577

Closed
OldManYellsAtCode opened this issue Jan 11, 2024 · 3 comments
Closed

[fix] support for "pictwn.com" and "outletpic.com" #577

OldManYellsAtCode opened this issue Jan 11, 2024 · 3 comments

Comments

@OldManYellsAtCode
Copy link

OldManYellsAtCode commented Jan 11, 2024

Issue #540 seems to be back. For "pictwn.com" or "outletpic.com" HandyImage just shows a 1x1 placeholder image.

I'm using a new Chrome profile with no extensions other than Tampermonkey (and the default Google Docs Offline).

Samples:


Looking at the page with the "Continue to Image..." button, I see a 1x1 image element, with attributes matching what HandyImage is looking for:

Outletpic: <img src="/images/1x1.png" class="picview" alt="1x1.png" onload="scaleImgz(this)" style="width:1px;border:none;">

Pictwn: <img src="/images/1x1.png" class="picview" alt="1x1.png" style="width:1px;border:none;">

I don't know if this will help but I did some tinkering.

First I changed HandyImage to not pick up the 1x1 image (in the section for pictwn):

diff --git a/HandyImage.user.js b/HandyImage.user.js
index d5d7405..4f345ee 100644
--- a/HandyImage.user.js
+++ b/HandyImage.user.js
@@ -2116,7 +2116,7 @@ function makeworld()
        case "meetimgz.com":
                j = true;
                dp=true;
-               i = q('img.picview');
+               i = q("img.picview[alt!='1x1.png']");
                if(i)
                {
                        if(!i.getAttribute("src") || !i.getAttribute("src").length)

Then I noticed that the "Continue to Image..." button was a <input type="submit"> button and wouldn't match the [type='button'] and button queries HandyImage does, so in the Javascript console I did a query for input[type='submit'] buttons:

> var f = document.querySelectorAll("input[type='submit']");
undefined
> f
NodeList(5) [input.j8jl, input.j8jl, input.j8jl, input.j8jl, input.j8jl]

Then I ran the button-clicking loop from HandyImage:

		if(f.length)
		{
			let n;
			for(n=f.length-1; n >= 0; n--)
			{
				if(window.getComputedStyle(f[n]).visibility != "hidden" && f[n].offsetWidth != 0 && f[n].value.indexOf("eply") == -1 && f[n].value.indexOf("Log") == -1)
				{
					f[n].removeAttribute("disabled");
					f[n].click();
					i = 1;
					break;
				}
			}
		}

Running the loop a second time in the console triggered HandyImage to display the right image.

@Owyn
Copy link
Owner

Owyn commented Jan 11, 2024

your sample images say "File Not Found" tho

@OldManYellsAtCode
Copy link
Author

They work for me. I'd provide screenshots, but the ads are NSFW.

How about the images in the sample gallery from #540?

https://outletpic.com/?fld_hash=4v3tke67&op=gallery&per_page=15&page=19

Or maybe the pre-redirect URLs for my samples?

https://usefto.com/nxovdtbwess8/tumblr_o4uk4iIIqE1ujcnkeo7_1280.jpg.html

https://imgtown.net/ia23jim9skex/IM032x04.jpg.html

@Owyn Owyn closed this as completed in a26de4d Jan 11, 2024
@Owyn
Copy link
Owner

Owyn commented Jan 11, 2024

fixed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants