[personal profile] asterroc
[livejournal.com profile] the_xtina, prompted by a post by [livejournal.com profile] hitchhiker, I'm curious as to whether one can write a greasemonkey script that would look at each icon on a page searching for a characteristic file size, image dimensions, and loop time, or some other simple description of the file that wouldn't require actual face recognition-style analysis, and then block either (a) the icon itself, or (b) any post or comment with that icon.

I don't actually care about the specific icon in question and wouldn't use such a script, I'm just curious if this is doable. So don't feel you need to create such a thing, a yes or no would be entirely satisfying to me.

Date: 2008-04-28 03:18 am (UTC)
From: [identity profile] xoder.livejournal.com
Wouldn't it be easier to check the URL of the icon, if your goal is to block a particular poster?

JavaScript (which is what Greasemonkey uses) would have a very hard time doing the kind of checksumming you're speaking of. File sizes and raw IMG data are not accessible by the DOM.

Date: 2008-04-28 11:41 am (UTC)
From: [identity profile] zandperl.livejournal.com
The problem is that many people use the particular icon that [livejournal.com profile] hitchhiker dislikes, and therefore the icon URL is not consistent.

Date: 2008-04-28 05:47 pm (UTC)
From: [identity profile] xoder.livejournal.com
I still think it would be easier to just have a list of banned photos. Hell, if you have ad-block already installed, you can block the icons one by one as they come up.

Date: 2008-04-28 09:16 pm (UTC)
From: [identity profile] hitchhiker.livejournal.com
that's pretty much what i'm doing

Date: 2008-04-28 07:40 am (UTC)
From: [identity profile] hitchhiker.livejournal.com
http://answers.yahoo.com/question/index?qid=20080414100342AAbp0gE suggests that it wouldn't be (if the browser doesn't expose the image details to its javascript engine, greasemonkey can't get at it)

Greasemonkey

Date: 2008-04-28 12:00 pm (UTC)
From: [identity profile] sirroxton.livejournal.com
Even if it's not possible to retrieve and process a binary blob in Javascript, it wouldn't be difficult to write a web application that takes in a URL and tells you if it's the unwanted image. A GreaseMonkey script could then use that web application.

Re: Greasemonkey

Date: 2008-04-28 12:26 pm (UTC)
From: [identity profile] zandperl.livejournal.com
What sort of "web application" would be required to do that job? Keep in mind the problem is that the icon in question is used by many people and therefore has many URLs. I'm trying to come up with a way that avoids inputting many URLs and instead "simply" identifies the image.

Re: Greasemonkey

Date: 2008-04-28 12:55 pm (UTC)
From: [identity profile] sirroxton.livejournal.com
A dumb CGI script running on Apache could take in an image URL, download the image, do a comparison on the source image, and return a simple XML document that says, essentially, yes or no. Just to be clear, you'd need your own webserver for this.

GreaseMonkey, while processing an LJ page, would grab the image URL, post a request to your web server asking if the URL referenced the unwanted image, and then use the result to render or not render the comment.

I don't have a lot of experience with GreaseMonkey, but I imagine it could do that much.

Profile

asterroc

April 2017

S M T W T F S
      1
2345678
9101112131415
16171819202122
232425 26272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 16th, 2026 07:55 am
Powered by Dreamwidth Studios