[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 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.

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 09:56 am
Powered by Dreamwidth Studios