Skip to content

Commit

Permalink
Adding parser for India Times
Browse files Browse the repository at this point in the history
  • Loading branch information
denny committed Nov 16, 2015
1 parent 87e379a commit 49405fb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Stale News Warning is a Chrome extension which warns you when you are reading
an old news article.

Currently supported: BBC News, CNN, Daily Mail, The Guardian, Huffington Post,
New York Times, Sky News (UK), Yahoo News, Yahoo News UK
India Times, New York Times, Sky News (UK), Yahoo News, Yahoo News UK

# Install
https://chrome.google.com/webstore/detail/stale-news-warning/leimdfebooadifmdaofhjkplmpiimlpg
Expand Down
12 changes: 12 additions & 0 deletions indiatimes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// India Times date HTML:
// <div class="fl author_cont"><span class="fl"><img src="http://media.indiatimes.in/resources/images/indiatimes_author.jpg"/></span><div class="author_cont"><div class="author_fix"> By IndiaTimes</div><div>April 6, 2014</div></div></div></div></div>

jQuery( function( $ ) {
// Extract the publication date from the page HTML
var published = $( 'div[class="fl author_cont"]'
).find( 'div[class="author_cont"]' ).find( 'div:not([class])' ).text();

// Pass the date string to the date-checking function
dateCheck( published );
} );

6 changes: 5 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "Stale News Warning",
"short_name": "Stale News",
"description": "This extension will warn you if you are reading an old news article",
"version": "0.7",
"version": "0.8",

"icons": {
"16": "icon16.png",
Expand Down Expand Up @@ -40,6 +40,10 @@
"matches": [ "*://www.nytimes.com/*" ],
"js": [ "jquery-2.1.4.min.js", "date-check.js", "nytimes.js" ]
},
{
"matches": [ "*://www.indiatimes.com/*" ],
"js": [ "jquery-2.1.4.min.js", "date-check.js", "indiatimes.js" ]
},
{
"matches": [ "*://news.sky.com/*" ],
"js": [ "jquery-2.1.4.min.js", "date-check.js", "skynews.js" ]
Expand Down

0 comments on commit 49405fb

Please sign in to comment.