JavaScript: Analyzing someone's site: where does this tag come from?
i'm currently working on a GreaseMonkey plugin for a news-site and they have a <script>
tag in ther开发者_Go百科e, where rating data for comments is stored and then used to display it along the posts.
I'm AJAX-loading several comment-pages and for some reason this <script>
tag doesn't show up in my background-loaded pages. What is the best way to analyze where and how this tag is created?
Too broad of a question? :) Regards
Download their source HTML with curl
and see if the <script>
tag is present in the HTML as initially sent by their server. If not, most likely they are using javascript to add the tag to the DOM after the page is loaded. You'll have to look through their code to find if that is happening. Look for event handlers for the document ready event.
精彩评论