Skip to content

Instantly share code, notes, and snippets.

@simion314
Created September 20, 2013 07:38
Show Gist options
  • Save simion314/6634417 to your computer and use it in GitHub Desktop.
Save simion314/6634417 to your computer and use it in GitHub Desktop.
package com.pageone.readability
{
import flash.filesystem.File;
import flash.html.HTMLLoader;
public class Readabiliti1
{
public function Readabiliti1()
{
}
public static function applyReadability(htmlLoader:HTMLLoader):void{
var w:*=htmlLoader.window;
w.alert=function():void{};
w.readConvertLinksToFootnotes = false;
w.readStyle = 'style-newspaper';
w.readSize = 'size-medium';
w.readMargin = 'margin-wide';
var document:Object=htmlLoader.window.document;
var _readability_script:* = document.createElement('script');
_readability_script.type = 'text/javascript';
_readability_script.src = "http://kudani.com/api/readability/readability.js";
//_readability_script.src = storage.resolvePath('readability.js').nativePath;
document.documentElement.appendChild(_readability_script);
var _readability_css:* = document.createElement('link');
_readability_css.rel = 'stylesheet';
_readability_css.href ="http://kudani.com/api/readability/readability.css";
//_readability_css.href = storage.resolvePath('readability.css').nativePath;
_readability_css.type = 'text/css';
_readability_css.media = 'all';
document.documentElement.appendChild(_readability_css);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment