How can I detect visited and unvisited links on a page?

后端 未结 2 2091
遥遥无期
遥遥无期 2020-11-27 07:09

My aim is to detect the unvisited links on a webpage and then create a greasemonkey script to click on those links. By unvisited links here I mean the links which are not op

2条回答
  •  盖世英雄少女心
    2020-11-27 07:25

    You can parse all links on the page and and get their CSS color property. If a color of the link is a match to the color of unvisited link you defined in CSS the this link is unvisited.

    This kind of technique usually used to determine all visited links. This is sort of a security breach that allows you to determine if user visited particular web-site. Usually used by sleazy marketers.

    This kind of tricks usually classifies as a "browser's history manipulation tricks".

    More info with code: http://www.stevenyork.com/tutorial/getting_browser_history_using_javascript

提交回复
热议问题