Created
September 20, 2013 07:38
-
-
Save simion314/6634417 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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