Understanding Safari Reader
* 5 main parts in the file:
* 1. define const
* 2. helper functions
* 3. CandidateElement
* 4. String Prototype extension
* 5. ReaderArticleFinder (main)
*
* findArticle: look for suggested candidate, otherwise look for others
* when looking for articles, check basic score of each elements (text length, text depth, id and class name, language)
* then cleanArticleNode: find pruneElements and remove them by shouldPruneElement: classname, textlength, imagearea, calculateLinkDensity
*
Way to call it:
* var ReaderArticleFinderJS = new ReaderArticleFinder(document);
* //var article = ReaderArticleFinderJS.findArticle();
* ReaderArticleFinderJS.isReaderModeAvailable();
* ReaderArticleFinderJS.prepareToTransitionToReader();
Blog also for this: http://joevennix.com/2011/05/09/Hacking-Safari-Reader.html
Understanding Safari Reader的更多相关文章
- 收藏这些Safari快捷键,让你的Mac浏览网页更加方便
文章内容及图片来源于:知乎,如果涉及版权问题,请联系作者删除 文章收录于:风云社区(提供上千款各类mac软件的下载) Safari是Mac上的原生浏览器,功能自然很强大,现在每天在Mac上使用的最多的 ...
- APPLE-SA-2019-3-25-4 Safari 12.1
APPLE-SA-2019-3-25-4 Safari 12.1 Safari 12.1 is now available and addresses the following: Safari Re ...
- Edge/Chrome/火狐/Safari/Opera和IE
据DigitalTrends网站报道,谷歌Chrome浏览器性能远超竞争对手的时代已经成为过去.目前流行的浏览器水平基本相当.IE 11被Windows 10中的Edge浏览器取而代之.Mozilla ...
- What's New in iOS9 iOS9功能改进
What's New in iOS9 This article summarizes the key developer-related features introduced in iOS 9, w ...
- iOS 9之SFSafariViewController
金田( github 示例源码) 有时候需要在App内部打开一个网页,例如为了展示公司官网,产品列表信息,Facebook,微博等.以前都是使用 UIWebView,iOS 8引入了WKWebView ...
- APPLE-SA-2019-3-25-1 iOS 12.2
APPLE-SA-2019-3-25-1 iOS 12.2 iOS 12.2 is now available and addresses the following: CFStringAvailab ...
- IE、FF、Safari、OP不同浏览器兼容报告
IE.FF.Safari.OP不同浏览器兼容报告 1 浏览器内核简介 Trident IE浏览器(GreenBrowser绿色浏览器, 遨游浏览器....都是IE) Geckos Fi ...
- Understanding Virtual Memory
Understanding Virtual Memory by Norm Murray and Neil Horman Introduction Definitions The Life of a P ...
- (转) Written Memories: Understanding, Deriving and Extending the LSTM
R2RT Written Memories: Understanding, Deriving and Extending the LSTM Tue 26 July 2016 When I was ...
随机推荐
- Confluence 6 使用 LDAP 授权连接到 Confluence 内部目录
希望连接一个内部目录但是使用 LDAP 检查登录授权: 在屏幕的右上角单击 控制台按钮 ,然后选择 General Configuration 链接. 单击左侧面板上面的 用户目录(User Dire ...
- 我理解的NODE
简介:NODE不是我们想象中的后台语言,它不是一门语言,它是一个和浏览器类似的工具或者平台,在NODE平台中,可以把我们写的JS代码解析出来,而且NODE和谷歌浏览器一样都是采用V8引擎渲染解析的. ...
- Java基础-this关键字和构造方法(10)
this关键字 方法被哪个对象调用,this就代表那个对象当局部变量隐藏成员变量时,使用this关键字(例如构造方法和访问器). 构造方法 构造方法作用概述 给对象的数据进行初始化 构造方法格式 方法 ...
- hdu 6299 Balanced Sequence (括号序列,贪心)
大意: 记$f(t)$表示字符串$t$的最长括号匹配子序列, 给定n个括号序列, 求它们重排后的最大f(t). 首先可以注意到一个括号序列中已经匹配的可以直接消去, 一定不会影响最优解. 那么这样最终 ...
- CentOS7.6 Install TensorFlow
1. install pip 1). yum -y install epel-release 2). yum install python-pip 3). pip install --upgra ...
- 牛客网——B-栈和排序
链接:https://www.nowcoder.com/acm/contest/58/B来源:牛客网 题目描述 给你一个1->n的排列和一个栈,入栈顺序给定 你要在不打乱入栈顺序的情况下,对数组 ...
- 87. Scramble String *HARD* 动态规划
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrin ...
- HashMap知识点、问题
转载:https://blog.csdn.net/qq_27007251/article/details/71403647 https://www.cnblogs.com/kxdblog/p/4323 ...
- en_java去重排序
@Test public void tes5() { String[] strs ={"e", "ee", "ea", "ei&q ...
- bzoj1215
题解: 暴力枚举每一种方案,然后hash判重 代码: #include<bits/stdc++.h> #define eps 1e-7 using namespace std; ],r[] ...