Skip to content

Commit

Permalink
updated readability to latest version from vendor, tweaked to avoid g…
Browse files Browse the repository at this point in the history
…etElementsByTagName heavy hits
  • Loading branch information
thatcher committed Aug 25, 2010
1 parent f09e579 commit 419d08a
Show file tree
Hide file tree
Showing 3 changed files with 832 additions and 204 deletions.
19 changes: 13 additions & 6 deletions plugins/env.readability.js
Expand Up @@ -9,30 +9,37 @@ load('plugins/vendor/readability.js');
Envjs.scriptTypes[""] = false;
Envjs.scriptTypes["javascript"] = false;
Envjs.scriptTypes["text/javascript"] = false;
document.async = false;
document.async = true;

var readStyle='style-newspaper',
readSize='size-medium',
readMargin='margin-medium',
readMargin='margin-wide',
start = new Date().getTime(),
docs = {
'http://www.loc.gov/pictures/collection/bbc/background.html':'background.html',
'http://www.cnn.com/2010/WORLD/europe/08/24/vbs.uk.afghanistan/index.html?hpt=C1':'cnn.html',
'http://www.loc.gov/pictures/collection/bbc/background.html':'background.html'/*,
'http://www.loc.gov/pictures/collection/bbc/bibliographies.html':'bibliographies.html',
'http://www.loc.gov/pictures/collection/bbc/cataloging.html': 'cataloging.html',
'http://www.loc.gov/pictures/collection/bbc/digitizing.html': 'digitizing.html',
'http://www.loc.gov/pictures/collection/bbc/sets.html': 'sets.html',
'http://www.loc.gov/pictures/collection/bbc/tinker_evers_chance.html': 'tinkers_evers_chance.html'
'http://www.loc.gov/pictures/collection/bbc/tinker_evers_chance.html': 'tinkers_evers_chance.html'*/
/*'http://timesofindia.indiatimes.com/india/Railways-rot-as-Mamata-plays-politics-in-Bengal/articleshow/6193608.cms': '6193608.html'*/
/*'http://www.articlesbase.com/communication-articles/difference-between-analog-and-digital-69824.html': 'article1.html'*/
};


jQuery(document).ready(function(){
console.log('document ready')
makeReadable(name);
});

jQuery.each(docs, function(doc, name){
console.log('loading document %s', doc);
start = new Date().getTime();
document.location = doc;
makeReadable(name);
});



function makeReadable(name){
console.log('document ready : %s (%s)', window.location, new Date().getTime()-start);
try{
Expand Down

0 comments on commit 419d08a

Please sign in to comment.