开发者

Listen to HTML/CSS events of web page

I'm looking for a way to listen for an event in the HTML/CSS of a webpage. Basically, a website I use at work lists queues and appointments, which flag as yellow/red based on the amount of time late on taking said appointment. Ot开发者_运维知识库her than this visual aide, there is no alert of any kind, which is a failing point if one is juggling multiple windows and doesn't notice.

What I would like to do is put together a simple way to watch for the tag ID or perhaps the flag hex color, and then alert me in a way of my choosing.

The work environment is on OS X, so I presume I'm looking at an Objective-C centric solution unless Applescript is capable of doing this.

Any help would be greatly appreciated.


I know you didn't tag jQuery, or JavaScript, but a custom bookmarklet may be the solution.

As it so happens I created a bookmarklet utility a while back so that you can keep your bookmarklet in an external script file.

You could then have alert or confirm called automatically for some event on the page.


Are you able to specify the browser your users use? If so, Chrome has support for HTML5's out of browser notifications, ala: http://slides.html5rocks.com/#notifications-api


You could get a reference to the dom elements you want to monitor, and use setInterval() to poll the data you are looking for on some interval, alerting when it changes.

See this fiddle for an example.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜