├── .nvmrc ├── icon.icns ├── .gitignore ├── icons ├── icon256.ico └── icon256.png ├── pages ├── greyFavicon.png ├── phishing │ ├── phishingError.css │ ├── redFavicon.png │ ├── phishingError.js │ └── index.html ├── crash │ └── index.html ├── error │ └── index.html ├── pdfViewer │ └── index.html ├── sessionRestoreError │ └── index.html └── pagebase.css ├── reader ├── blackFavicon.png ├── whiteFavicon.png ├── index.html └── readerViewDB.js ├── ext ├── readability-master │ ├── .travis.yml │ ├── .gitignore │ ├── test │ │ ├── test-pages │ │ │ ├── ietf-1 │ │ │ │ └── expected-metadata.json │ │ │ ├── replace-brs │ │ │ │ ├── expected-metadata.json │ │ │ │ ├── expected.html │ │ │ │ └── source.html │ │ │ ├── rtl-1 │ │ │ │ ├── expected-metadata.json │ │ │ │ ├── expected.html │ │ │ │ └── source.html │ │ │ ├── rtl-2 │ │ │ │ ├── expected-metadata.json │ │ │ │ ├── expected.html │ │ │ │ └── source.html │ │ │ ├── rtl-3 │ │ │ │ ├── expected-metadata.json │ │ │ │ ├── expected.html │ │ │ │ └── source.html │ │ │ ├── rtl-4 │ │ │ │ ├── expected-metadata.json │ │ │ │ ├── expected.html │ │ │ │ └── source.html │ │ │ ├── qq │ │ │ │ ├── expected-metadata.json │ │ │ │ └── expected.html │ │ │ ├── 001 │ │ │ │ └── expected-metadata.json │ │ │ ├── daringfireball-1 │ │ │ │ └── expected-metadata.json │ │ │ ├── gmw │ │ │ │ └── expected-metadata.json │ │ │ ├── bbc-1 │ │ │ │ └── expected-metadata.json │ │ │ ├── table-style-attributes │ │ │ │ └── expected-metadata.json │ │ │ ├── yahoo-4 │ │ │ │ ├── expected-metadata.json │ │ │ │ └── expected.html │ │ │ ├── links-in-tables │ │ │ │ └── expected-metadata.json │ │ │ ├── mozilla-2 │ │ │ │ └── expected-metadata.json │ │ │ ├── liberation-1 │ │ │ │ ├── expected-metadata.json │ │ │ │ └── expected.html │ │ │ ├── blogger │ │ │ │ └── expected-metadata.json │ │ │ ├── buzzfeed-1 │ │ │ │ └── expected-metadata.json │ │ │ ├── medium-1 │ │ │ │ └── expected-metadata.json │ │ │ ├── webmd-2 │ │ │ │ └── expected-metadata.json │ │ │ ├── ars-1 │ │ │ │ └── expected-metadata.json │ │ │ ├── basic-tags-cleaning │ │ │ │ ├── expected-metadata.json │ │ │ │ ├── expected.html │ │ │ │ └── source.html │ │ │ ├── medium-2 │ │ │ │ └── expected-metadata.json │ │ │ ├── remove-extra-brs │ │ │ │ ├── expected-metadata.json │ │ │ │ ├── expected.html │ │ │ │ └── source.html │ │ │ ├── remove-script-tags │ │ │ │ ├── expected-metadata.json │ │ │ │ ├── expected.html │ │ │ │ └── source.html │ │ │ ├── comment-inside-script-parsing │ │ │ │ ├── expected-metadata.json │ │ │ │ ├── expected.html │ │ │ │ └── source.html │ │ │ ├── remove-extra-paragraphs │ │ │ │ ├── expected-metadata.json │ │ │ │ ├── expected.html │ │ │ │ └── source.html │ │ │ ├── nytimes-1 │ │ │ │ └── expected-metadata.json │ │ │ ├── pixnet │ │ │ │ └── expected-metadata.json │ │ │ ├── keep-images │ │ │ │ └── expected-metadata.json │ │ │ ├── cnet │ │ │ │ └── expected-metadata.json │ │ │ ├── lemonde-1 │ │ │ │ └── expected-metadata.json │ │ │ ├── yahoo-2 │ │ │ │ └── expected-metadata.json │ │ │ ├── cnn │ │ │ │ └── expected-metadata.json │ │ │ ├── tmz-1 │ │ │ │ ├── expected-metadata.json │ │ │ │ └── expected.html │ │ │ ├── wapo-2 │ │ │ │ └── expected-metadata.json │ │ │ ├── heise │ │ │ │ ├── expected-metadata.json │ │ │ │ └── expected.html │ │ │ ├── 002 │ │ │ │ └── expected-metadata.json │ │ │ ├── salon-1 │ │ │ │ └── expected-metadata.json │ │ │ ├── wikia │ │ │ │ └── expected-metadata.json │ │ │ ├── youth │ │ │ │ └── expected-metadata.json │ │ │ ├── nytimes-2 │ │ │ │ └── expected-metadata.json │ │ │ ├── breitbart │ │ │ │ └── expected-metadata.json │ │ │ ├── wapo-1 │ │ │ │ └── expected-metadata.json │ │ │ ├── msn │ │ │ │ └── expected-metadata.json │ │ │ ├── medium-3 │ │ │ │ └── expected-metadata.json │ │ │ ├── tumblr │ │ │ │ └── expected-metadata.json │ │ │ ├── herald-sun-1 │ │ │ │ └── expected-metadata.json │ │ │ ├── mozilla-1 │ │ │ │ └── expected-metadata.json │ │ │ ├── wordpress │ │ │ │ └── expected-metadata.json │ │ │ ├── simplyfound-1 │ │ │ │ ├── expected-metadata.json │ │ │ │ └── expected.html │ │ │ ├── clean-links │ │ │ │ └── expected-metadata.json │ │ │ ├── lifehacker-working │ │ │ │ └── expected-metadata.json │ │ │ ├── yahoo-1 │ │ │ │ └── expected-metadata.json │ │ │ ├── lifehacker-post-comment-load │ │ │ │ └── expected-metadata.json │ │ │ ├── webmd-1 │ │ │ │ ├── expected-metadata.json │ │ │ │ └── expected.html │ │ │ ├── ehow-1 │ │ │ │ └── expected-metadata.json │ │ │ ├── iab-1 │ │ │ │ └── expected-metadata.json │ │ │ ├── bug-1255978 │ │ │ │ └── expected-metadata.json │ │ │ ├── ehow-2 │ │ │ │ └── expected-metadata.json │ │ │ ├── wikipedia │ │ │ │ └── expected-metadata.json │ │ │ ├── svg-parsing │ │ │ │ ├── expected-metadata.json │ │ │ │ ├── expected.html │ │ │ │ └── source.html │ │ │ ├── lwn-1 │ │ │ │ └── expected-metadata.json │ │ │ ├── base-url │ │ │ │ ├── expected-metadata.json │ │ │ │ ├── expected.html │ │ │ │ └── source.html │ │ │ ├── embedded-videos │ │ │ │ ├── expected-metadata.json │ │ │ │ ├── expected.html │ │ │ │ └── source.html │ │ │ ├── replace-font-tags │ │ │ │ ├── expected-metadata.json │ │ │ │ ├── expected.html │ │ │ │ └── source.html │ │ │ ├── social-buttons │ │ │ │ ├── expected-metadata.json │ │ │ │ └── expected.html │ │ │ ├── style-tags-removal │ │ │ │ ├── expected-metadata.json │ │ │ │ ├── expected.html │ │ │ │ └── source.html │ │ │ ├── normalize-spaces │ │ │ │ ├── expected-metadata.json │ │ │ │ ├── expected.html │ │ │ │ └── source.html │ │ │ ├── reordering-paragraphs │ │ │ │ ├── expected-metadata.json │ │ │ │ ├── expected.html │ │ │ │ └── source.html │ │ │ ├── yahoo-3 │ │ │ │ └── expected-metadata.json │ │ │ └── missing-paragraphs │ │ │ │ ├── expected-metadata.json │ │ │ │ └── expected.html │ │ └── utils.js │ ├── package.json │ ├── index.js │ └── benchmarks │ │ ├── benchmark-reporter.js │ │ └── benchmarks.js ├── font-awesome-4.4.0 │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── less │ │ ├── fixed-width.less │ │ ├── larger.less │ │ ├── list.less │ │ ├── core.less │ │ ├── font-awesome.less │ │ ├── stacked.less │ │ ├── bordered-pulled.less │ │ ├── rotated-flipped.less │ │ ├── path.less │ │ ├── animated.less │ │ └── mixins.less │ ├── scss │ │ ├── _fixed-width.scss │ │ ├── _larger.scss │ │ ├── _list.scss │ │ ├── font-awesome.scss │ │ ├── _core.scss │ │ ├── _stacked.scss │ │ ├── _bordered-pulled.scss │ │ ├── _rotated-flipped.scss │ │ ├── _path.scss │ │ ├── _animated.scss │ │ └── _mixins.scss │ └── HELP-US-OUT.txt ├── filterLists │ └── updateEasylist.js └── abp-filter-parser-modified │ └── README.md ├── js ├── filteringRenderer.js ├── navbar │ ├── addTabButton.js │ ├── goBackButton.js │ ├── menuButton.js │ └── tabActivity.js ├── tabRestore.js ├── util │ ├── relativeDate.js │ ├── theme.js │ ├── defaultKeyMap.js │ ├── searchEngine.js │ └── settings.js ├── phishingWarning.js ├── searchbar │ ├── hostsSuggestionsPlugin.js │ ├── searchbarAutocomplete.js │ ├── searchSuggestionsPlugin.js │ ├── placeSuggestionsPlugin.js │ ├── openTabsPlugin.js │ └── searchbarPlugins.js ├── previewCache.js ├── focusMode.js ├── preload │ ├── siteUnbreak.js │ ├── default.js │ └── readerDetector.js ├── menuBarVisibility.js ├── userscripts.js ├── windowsCaptionButtons.js ├── pdfViewer.js └── default.js ├── css ├── base.css ├── webviews.css ├── findinpage.css └── windowsCaptionButtons.css ├── scripts ├── buildPreload.js ├── buildMain.js ├── watch.js ├── buildLocalization.js └── buildBrowser.js ├── package.json ├── localization └── localizationHelpers.js └── main ├── filtering.js └── viewManager.js /.nvmrc: -------------------------------------------------------------------------------- 1 | 8.1.4 -------------------------------------------------------------------------------- /icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apm/min/master/icon.icns -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | .npm 3 | dist 4 | main.build.js 5 | .DS_Store 6 | -------------------------------------------------------------------------------- /icons/icon256.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apm/min/master/icons/icon256.ico -------------------------------------------------------------------------------- /icons/icon256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apm/min/master/icons/icon256.png -------------------------------------------------------------------------------- /pages/greyFavicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apm/min/master/pages/greyFavicon.png -------------------------------------------------------------------------------- /pages/phishing/phishingError.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #D42020; 3 | color: #fff; 4 | } 5 | -------------------------------------------------------------------------------- /reader/blackFavicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apm/min/master/reader/blackFavicon.png -------------------------------------------------------------------------------- /reader/whiteFavicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apm/min/master/reader/whiteFavicon.png -------------------------------------------------------------------------------- /ext/readability-master/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | sudo: false 3 | node_js: 4 | - '0.10' 5 | -------------------------------------------------------------------------------- /pages/phishing/redFavicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apm/min/master/pages/phishing/redFavicon.png -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apm/min/master/ext/font-awesome-4.4.0/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apm/min/master/ext/font-awesome-4.4.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apm/min/master/ext/font-awesome-4.4.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apm/min/master/ext/font-awesome-4.4.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apm/min/master/ext/font-awesome-4.4.0/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /ext/readability-master/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | npm-debug.log 3 | node_modules 4 | .metadata 5 | *.pyc 6 | *~ 7 | .*.sw? 8 | .sw? 9 | *.jar 10 | *.xpi 11 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/ietf-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "draft-dejong-remotestorage-04 - remoteStorage", 3 | "byline": "AUTHORING", 4 | "readerable": true 5 | } 6 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/replace-brs/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Replace brs test", 3 | "byline": null, 4 | "excerpt": "Lorem ipsum", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/rtl-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "RTL Test", 3 | "byline": null, 4 | "excerpt": "Lorem ipsum dolor sit amet.", 5 | "dir": "rtl", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/rtl-2/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "RTL Test", 3 | "byline": null, 4 | "excerpt": "Lorem ipsum dolor sit amet.", 5 | "dir": "rtl", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/rtl-3/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "RTL Test", 3 | "byline": null, 4 | "excerpt": "Lorem ipsum dolor sit amet.", 5 | "dir": "rtl", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/rtl-4/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "RTL Test", 3 | "byline": null, 4 | "excerpt": "Lorem ipsum dolor sit amet.", 5 | "dir": null, 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/qq/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "DeepMind新电脑已可利用记忆自学 人工智能迈上新台阶_科技_腾讯网", 3 | "byline": null, 4 | "excerpt": "DeepMind新电脑已可利用记忆自学 人工智能迈上新台阶", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/001/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Get your Frontend JavaScript Code Covered | Code", 3 | "byline": "Nicolas Perriault —", 4 | "excerpt": "Nicolas Perriault's homepage.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/daringfireball-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Daring Fireball: Colophon", 3 | "byline": null, 4 | "excerpt": "Daring Fireball is written and produced by John Gruber.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/gmw/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "宇航员在太空中喝酒会怎么样?后果很严重 _探索者 _光明网", 3 | "byline": "肖春芳", 4 | "dir": null, 5 | "excerpt": "不幸的是,对于希望能喝上一杯的太空探险者,那些将他们送上太空的政府机构普遍禁止他们染指包括酒在内的含酒精饮料。", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/bbc-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Obama admits US gun laws are his 'biggest frustration'", 3 | "byline": null, 4 | "excerpt": "President Barack Obama tells the BBC his failure to pass", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/table-style-attributes/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "linux video", 3 | "byline": null, 4 | "dir": null, 5 | "excerpt": "linux usability\n ...or, why do I bother. © 2002, 2003\n Jamie Zawinski", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/yahoo-4/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "トレンドマイクロ、公衆無線LANを安全に使うためのアプリ「フリーWi-Fiプロテクション」 (CNET Japan) - Yahoo!ニュース", 3 | "byline": null, 4 | "dir": null, 5 | "excerpt": "トレンドマイクロは3月9日、Wi-Fi利用時の通信を暗号化し保護するスマホ・タブレッ", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/links-in-tables/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Saving Data: Reducing the size of App Updates by 65%", 3 | "byline": null, 4 | "dir": "ltr", 5 | "excerpt": "Posted by Andrew Hayden, Software Engineer on Google Play", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /js/filteringRenderer.js: -------------------------------------------------------------------------------- 1 | // gets the tracking settings and sends them to the main process 2 | 3 | settings.get('filtering', function (settings) { 4 | ipc.send('setFilteringSettings', settings) 5 | }) 6 | 7 | function registerFiltering (ses) { 8 | ipc.send('registerFiltering', ses) 9 | } 10 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/mozilla-2/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Welcome to Firefox Developer Edition", 3 | "byline": null, 4 | "dir": "ltr", 5 | "excerpt": "Get to know the features that make it the most complete browser for building the Web.", 6 | "readerable": false 7 | } 8 | -------------------------------------------------------------------------------- /js/navbar/addTabButton.js: -------------------------------------------------------------------------------- 1 | var browserUI = require('api-wrapper.js') 2 | 3 | var addTabButton = document.getElementById('add-tab-button') 4 | 5 | addTabButton.addEventListener('click', function (e) { 6 | var newTab = tabs.add({}, tabs.getIndex(tabs.getSelected()) + 1) 7 | browserUI.addTab(newTab) 8 | }) 9 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/liberation-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Un troisième Français mort dans le séisme au Népal", 3 | "byline": "AFP", 4 | "excerpt": "Laurent Fabius a accueilli jeudi matin à Roissy un premier avion spécial ramenant des rescapés.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/blogger/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Open Verilog flow for Silego GreenPak4 programmable logic devices", 3 | "byline": null, 4 | "dir": "ltr", 5 | "excerpt": "I've written a couple of posts in the past few months but they were all for", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/buzzfeed-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Student Dies After Diet Pills She Bought Online \"Burned Her Up From Within\"", 3 | "byline": "Mark Di Stefano", 4 | "excerpt": "An inquest into Eloise Parry's death has been adjourned until July...", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/medium-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Better Student Journalism — Medium", 3 | "byline": "Pippin Lee", 4 | "excerpt": "We pushed out the first version of the Open Journalism site in January. Here’s what we’ve learned about student journali…", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/webmd-2/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Superbugs: What They Are and How You Get Them", 3 | "byline": "By Kelli Miller\n WebMD Health News", 4 | "excerpt": "Drug-resistant bacteria, dubbed", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/ars-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Just-released Minecraft exploit makes it easy to crash game servers", 3 | "byline": "by Dan Goodin - Apr 16, 2015 8:02 pm UTC", 4 | "excerpt": "Two-year-old bug exposes thousands of servers to crippling attack.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/basic-tags-cleaning/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Basic tag cleaning test", 3 | "byline": null, 4 | "excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/medium-2/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "On Behalf of “Literally” — Medium", 3 | "byline": "Courtney Kirchoff", 4 | "excerpt": "In defense of the word “literally” and why you or someone you know should stop misusing the word, lest they drive us fig…", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/remove-extra-brs/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Remove trailing brs test", 3 | "byline": null, 4 | "excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/remove-script-tags/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Remove script tags test", 3 | "byline": null, 4 | "excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/comment-inside-script-parsing/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Test script parsing", 3 | "byline": null, 4 | "excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/remove-extra-paragraphs/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Replace font tags test", 3 | "byline": null, 4 | "excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/nytimes-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "United States to Lift Sudan Sanctions", 3 | "byline": "Jeffrey Gettleman", 4 | "dir": null, 5 | "excerpt": "For the first time since the 1990s, the country will be able to trade extensively with the United States.", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/pixnet/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "新竹尖石_美樹營地賞楓 (2) @ 史蒂文的家_藍天 :: 痞客邦 PIXNET ::", 3 | "byline": "史蒂文的家_藍天 (stevenhgm)", 4 | "dir": null, 5 | "excerpt": "一波波接續性低溫寒流報到 已將新竹尖石鄉後山一帶層層山巒披上嫣紅的彩衣 玉峰道路一路上雲氣山嵐滯留山頭 順路下切蜿蜒道路後不久即抵達來到"玉峰國小" "美樹"美", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/keep-images/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Inside the Deep Web Drug Lab — Backchannel — Medium", 3 | "byline": "Joseph Cox", 4 | "excerpt": "Welcome to DoctorX’s Barcelona lab, where the drugs you bought online are tested for safety and purity. No questions ask…", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/cnet/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Zuckerberg offers peek at Facebook's acquisition strategies", 3 | "byline": "Steven Musil", 4 | "dir": null, 5 | "excerpt": "Facebook CEO says be a friend and have a shared vision, but scare them when you have to and move fast.", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/lemonde-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Le projet de loi sur le renseignement massivement approuvé à l'Assemblée", 3 | "byline": null, 4 | "excerpt": "Largement approuvé par les députés, le texte sera désormais examiné par le Sénat, puis le Conseil constitutionnel.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/yahoo-2/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Russia: Space ship malfunctions, breaks up over Siberia", 3 | "byline": "NATALIYA VASILYEVA", 4 | "excerpt": "The latest news and headlines from Yahoo! News. Get breaking news stories and in-depth coverage with videos and photos.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/cnn/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "The 'birth lottery' and economic mobility", 3 | "byline": "Ahiza Garcia", 4 | "dir": null, 5 | "excerpt": "A recently-released report on poverty and inequality found that the U.S. ranks the lowest among countries with welfare states.", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/tmz-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Lupita Nyong'o's $150K Pearl Oscar Dress -- STOLEN!!!", 3 | "byline": null, 4 | "excerpt": "Lupita Nyong'o's now-famous Oscar dress -- adorned in pearls -- was stolen right out of her hotel room ... TMZ has learned. Law enforcement sources tell…", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/wapo-2/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Where do strained U.S.-Israeli relations go after Netanyahu’s victory?", 3 | "byline": "By Steven Mufson", 4 | "excerpt": "Few foreign leaders have so brazenly stood up to President Obama and the relationship could face its next test this month.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/heise/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "1Password für Mac generiert Einmal-Passwörter", 3 | "byline": null, 4 | "excerpt": "Das in der iOS-Version bereits enthaltene TOTP-Feature ist nun auch für OS X 10.10 verfügbar. Zudem gibt es neue Zusatzfelder in der Datenbank und weitere Verbesserungen.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/HELP-US-OUT.txt: -------------------------------------------------------------------------------- 1 | I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, 2 | Fonticons (https://fonticons.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, 3 | comprehensive icon sets or copy and paste your own. 4 | 5 | Please. Check it out. 6 | 7 | -Dave Gandy 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/002/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "This API is so Fetching! ✩ Mozilla Hacks – the Web developer blog", 3 | "byline": "Nikhil Marathe", 4 | "excerpt": "For more than a decade the Web has used XMLHttpRequest (XHR) to achieve asynchronous requests in JavaScript. While very useful, XHR is not a very ...", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/salon-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "The sharing economy is a lie: Uber, Ayn Rand and the truth about tech\n and libertarians", 3 | "byline": "Joanna Rothkopf", 4 | "excerpt": "Disruptive companies talk a good game about sharing. Uber's really just an under-regulated company making riches", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/wikia/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "'Star Wars' Original Cuts Might Get Released for 40th Anniversary", 3 | "byline": "James Akinaka", 4 | "dir": null, 5 | "excerpt": "As a 40th birthday present to the Star Wars Saga and its fans, Lucasfilm could re-release the original versions of the original trilogy films.", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/youth/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "海外留学生看两会:出国前后关注点大不同_教育频道_中国青年网", 3 | "byline": "青网校园崔宁宁", 4 | "dir": null, 5 | "excerpt": "图为马素湘在澳大利亚悉尼游玩时的近影。出国前后关注点大不同出国前:政治科目会出啥考题?出国后:国家未来将如何发展?在采访中,我们了解到不少学子在出国前就每年守在电脑前观看两会直播。但是,随着年龄和阅历的增长,学子对两会的关注点在出国前后发生了很大的变化。在法国里昂国立应用科学院留学的卢宇表示,他还是个中学生时,就开始关注两会了。“我高中毕业后就出国留学了。", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/nytimes-2/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Yahoo’s Sale to Verizon Leaves Shareholders With Little Say", 3 | "byline": "Steven Davidoff Solomon", 4 | "dir": null, 5 | "excerpt": "The internet giant’s decision to sell its business is plagued with challenges that reveal how unusual deal structures can affect shareholders.", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/breitbart/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "'Neutral' Snopes Fact-Checker David Emery: 'Are There Any Un-Angry Trump Supporters?'", 3 | "byline": "by Lucas Nolan22 Dec 2016651", 4 | "dir": null, 5 | "excerpt": "Snopes fact checker and staff writer David Emery posted to Twitter asking if there were “any un-angry Trump supporters?”", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/wapo-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Attack stokes instability fears in North Africa", 3 | "byline": "By Erin Cunningham", 4 | "excerpt": "The assault on Tunisia’s most renowned museum, in which gunmen killed at least 19 people, could heighten tensions in a nation that has become deeply divided between pro- and anti-Islamist factions.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /js/navbar/goBackButton.js: -------------------------------------------------------------------------------- 1 | var goBackButton = document.getElementById('back-button') 2 | 3 | goBackButton.addEventListener('click', function (e) { 4 | webviews.get(tabs.getSelected()).goBack() 5 | }) 6 | 7 | settings.get('historyButton', function (value) { 8 | if (value === true || value === undefined) { 9 | goBackButton.hidden = false 10 | } else { 11 | goBackButton.hidden = true 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/msn/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Nintendo's first iPhone game will launch in December for $10", 3 | "byline": "Alex Perry\n \n 1 day ago", 4 | "excerpt": "Nintendo and Apple shocked the world earlier this year by announcing \"Super Mario Run,\" the legendary gaming company's first foray into mobile gaming. ", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/medium-3/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Samantha and The Great Big Lie – John C. Welch – Medium", 3 | "byline": "John C. Welch", 4 | "dir": null, 5 | "excerpt": "(EDIT: removed the link to Samantha’s post, because the arments and the grubers and the rest of The Deck Clique got what they wanted: a non-proper person driven off the internet lightly capped with a…", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/tumblr/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Minecraft 1.8 - The Bountiful Update - Minecraft 1.8 - The Bountiful Update", 3 | "byline": null, 4 | "dir": null, 5 | "excerpt": "+ Added Granite, Andesite, and Diorite stone blocks, with smooth versions\n+ Added Slime Block\n+ Added Iron Trapdoor\n+ Added Prismarine and Sea Lantern blocks\n+ Added the Ocean Monument\n+ Added Red...", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/herald-sun-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Angry media won’t buckle over new surveillance laws\n\t\t\t\t\t\t| Herald Sun", 3 | "byline": "JOE HILDEBRAND", 4 | "excerpt": "A HIGH-powered federal government team has been doing the rounds of media organisations in the past few days in an attempt to allay concerns about the impact of new surveillance legislation on press freedom. It failed.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/mozilla-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Firefox — Customize and make it your own — The most flexible browser on\n the Web — Mozilla", 3 | "byline": null, 4 | "dir": "ltr", 5 | "excerpt": "It’s easier than ever to personalize Firefox and make it work the way\n you do.\n No other browser gives you so much choice and flexibility.", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: (-@fa-li-width + (4em / 14)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/wordpress/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Stack Overflow Jobs Data Shows ReactJS Skills in High Demand, WordPress Market Oversaturated with Developers – WordPress Tavern", 3 | "byline": null, 4 | "dir": null, 5 | "excerpt": "Stack Overflow published its analysis of 2017 hiring trends based on the targeting options employers selected when posting to Stack Overflow Jobs. The report, which compares data from 200 companies…", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/simplyfound-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Raspberry Pi 3 - The credit card sized PC that cost only $35 - All-time bestselling computer in UK", 3 | "byline": null, 4 | "excerpt": "The Raspberry Pi Foundation started by a handful of volunteers in 2012 when they released the original Raspberry Pi 256MB Model B without knowing what to expect. In a short four-year period they have grown to over sixty full-time employees and ha...", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/clean-links/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Bartleby the Scrivener Web Study Text", 3 | "byline": null, 4 | "excerpt": "Ere introducing the scrivener, as he first appeared to me, it is fit \n I make some mention of myself, my employees, my business, my chambers, \n and general surroundings; because some such description is indispensable \n to an adequate understanding of the chief character about to be presented.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.4.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "animated"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/lifehacker-working/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "How to Program Your Mind to Stop Buying Crap You Don’t Need", 3 | "byline": "Patrick Allan", 4 | "excerpt": "We all buy things from time to time that we don't really need. It's okay to appeal to your wants every once in a while, as long as you're in control. If you struggle with clutter, impulse buys, and buyer's remorse, here's how to put your mind in the right place before you even set foot in a store.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/yahoo-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "These are the 8 coolest PlayStation VR games", 3 | "byline": "Ben Silverman", 4 | "dir": null, 5 | "excerpt": "To help you decide what’s what, I’ve put together this list of the 8 PSVR games worth considering. Beloved cult hit “Rez” gets the VR treatment to help launch the PSVR, and the results are terrific. Chaos, for sure, and also “Thumper.” Called a “violent rhythm game” by its creators, “Thumper” is, well", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /js/navbar/menuButton.js: -------------------------------------------------------------------------------- 1 | var menuButton = document.getElementById('menu-button') 2 | 3 | menuButton.addEventListener('click', function (e) { 4 | showSecondaryMenu() 5 | }) 6 | 7 | function showSecondaryMenu () { 8 | var navbar = document.getElementById('navbar') 9 | var rect = menuButton.getBoundingClientRect() 10 | var navbarRect = navbar.getBoundingClientRect() 11 | 12 | ipc.send('showSecondaryMenu', { 13 | x: Math.round(rect.left), 14 | y: Math.round(navbarRect.bottom), 15 | async: true 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/lifehacker-post-comment-load/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "How to Program Your Mind to Stop Buying Crap You Don’t Need", 3 | "byline": "Patrick Allan", 4 | "excerpt": "We all buy things from time to time that we don't really need. It's okay to appeal to your wants every once in a while, as long as you're in control. If you struggle with clutter, impulse buys, and buyer's remorse, here's how to put your mind in the right place before you even set foot in a store.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/webmd-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Babies Who Eat Peanuts Early May Avoid Allergy", 3 | "byline": "By Brenda Goodman, MA\n WebMD Health News", 4 | "excerpt": "Life-threatening peanut allergies have mysteriously been on the rise in the past decade, with little hope for a cure. But a groundbreaking new study may offer a way to stem that rise, while another may offer some hope for those who are already allergic.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/ehow-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "How to Build a Terrarium (with Pictures)", 3 | "byline": "Lucy Akins", 4 | "excerpt": "How to Build a Terrarium. Glass cloche terrariums are not only appealing to the eye, but they also preserve a bit of nature in your home and serve as a simple, yet beautiful, piece of art. Closed terrariums are easy to care for, as they retain much of their own moisture and provide a warm environment with a consistent level of humidity. You...", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/iab-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Getting LEAN with Digital Ad UX", 3 | "byline": "By\n\t\t\tScott Cunningham", 4 | "excerpt": "We messed up. As technologists, tasked with delivering content and services to users, we lost track of the user experience. Twenty years ago we saw an explosion of websites, built by developers around the world, providing all forms of content. This was the beginning of an age of enlightenment, the intersection of content and technology. … Continued", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/bug-1255978/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "The seven secrets that hotel owners don't want you to know", 3 | "byline": "Hazel Sheffield", 4 | "dir": null, 5 | "excerpt": "Most people go to hotels for the pleasure of sleeping in a giant bed with clean white sheets and waking up to fresh towels in the morning. But those towels and sheets might not be as clean as they look, according to the hotel bosses that responded to an online thread about the things hotel owners don’t want you to know.", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/ehow-2/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "How to Throw a Graduation Party on a Budget (with Pictures)", 3 | "byline": "Gina Roberts-Grey", 4 | "excerpt": "How to Throw a Graduation Party on a Budget. Graduation parties are a great way to commemorate the years of hard work teens and college co-eds devote to education. They’re also costly for mom and dad.The average cost of a graduation party in 2013 was a whopping $1,200, according to Graduationparty.com; $700 of that was allocated for food....", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/wikipedia/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Mozilla - Wikipedia", 3 | "byline": null, 4 | "dir": "ltr", 5 | "excerpt": "Mozilla is a free-software community, created in 1998 by members of Netscape. The Mozilla community uses, develops, spreads and supports Mozilla products, thereby promoting exclusively free software and open standards, with only minor exceptions.[1] The community is supported institutionally by the Mozilla Foundation and its tax-paying subsidiary, the Mozilla Corporation.[2]", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.4.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "animated.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/svg-parsing/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "SVG parsing", 3 | "byline": null, 4 | "excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\nquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\nconsequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\ncillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\nproident, sunt in culpa qui officia deserunt mollit anim id est laborum.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /css/base.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | font-size: 16px; 6 | font-family: '.SFNSText-Regular', 'BlinkMacSystemFont', 'Helvetica Neue', 'Segoe UI', 'Arial', sans-serif; 7 | } 8 | body.mac * { 9 | letter-spacing: 0.3px; 10 | } 11 | [hidden] { 12 | display: none !important; 13 | } 14 | /* buttons are styled like normal text by default */ 15 | button { 16 | background: none; 17 | border: none; 18 | color: inherit; 19 | outline: none; 20 | } 21 | body, 22 | html { 23 | background-color: #fff; 24 | height: 100%; 25 | overflow: hidden; 26 | -webkit-user-select: none; 27 | } 28 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/lwn-1/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "LWN.net Weekly Edition for March 26, 2015 [LWN.net]", 3 | "byline": "By Nathan Willis\n March 25, 2015", 4 | "excerpt": "The Arduino has been one of the biggest success stories of the open-hardware movement, but that success does not protect it from internal conflict. In recent months, two of the project's founders have come into conflict about the direction of future efforts—and that conflict has turned into a legal dispute about who owns the rights to the Arduino trademark.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/base-url/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Base URL test", 3 | "byline": null, 4 | "excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", 5 | "readerable": false 6 | } 7 | -------------------------------------------------------------------------------- /js/tabRestore.js: -------------------------------------------------------------------------------- 1 | function TabStack (tabStack) { 2 | this.depth = 20 3 | 4 | if (tabStack) { 5 | this.stack = tabStack.stack 6 | } else { 7 | this.stack = [] 8 | } 9 | } 10 | 11 | TabStack.prototype.push = function (closedTab) { 12 | // Do not store private tabs or blank tabs 13 | if (closedTab.private 14 | || closedTab.url === 'about:blank' 15 | || closedTab.url === '') { 16 | return 17 | } 18 | 19 | if (this.stack.length >= this.depth) { 20 | this.stack.shift() 21 | } 22 | 23 | this.stack.push(closedTab) 24 | } 25 | 26 | TabStack.prototype.pop = function () { 27 | return this.stack.pop() 28 | } 29 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/embedded-videos/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Embedded videos test", 3 | "byline": null, 4 | "excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", 5 | "readerable": false 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/replace-font-tags/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Replace font tags test", 3 | "byline": null, 4 | "excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", 5 | "readerable": false 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/social-buttons/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Share buttons removal test", 3 | "byline": null, 4 | "excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/style-tags-removal/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Style tags removal", 3 | "byline": null, 4 | "excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", 5 | "readerable": false 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/normalize-spaces/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Normalize space test", 3 | "byline": null, 4 | "excerpt": "Lorem\n ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n\ttab here\n incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", 5 | "readerable": false 6 | } 7 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .@{fa-css-prefix}-pull-left { float: left; } 11 | .@{fa-css-prefix}-pull-right { float: right; } 12 | 13 | .@{fa-css-prefix} { 14 | &.@{fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.@{fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .@{fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .#{$fa-css-prefix}-pull-left { float: left; } 11 | .#{$fa-css-prefix}-pull-right { float: right; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.#{$fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.#{$fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .#{$fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .@{fa-css-prefix}-rotate-90, 15 | :root .@{fa-css-prefix}-rotate-180, 16 | :root .@{fa-css-prefix}-rotate-270, 17 | :root .@{fa-css-prefix}-flip-horizontal, 18 | :root .@{fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /pages/crash/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |

16 |

17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /reader/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
Back to Article
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .#{$fa-css-prefix}-rotate-90, 15 | :root .#{$fa-css-prefix}-rotate-180, 16 | :root .#{$fa-css-prefix}-rotate-270, 17 | :root .#{$fa-css-prefix}-flip-horizontal, 18 | :root .#{$fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/reordering-paragraphs/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "", 3 | "byline": null, 4 | "excerpt": "Regarding item# 11111, under sufficiently extreme conditions, quarks may\n become deconfined and exist as free particles. In the course of asymptotic\n freedom, the strong interaction becomes weaker at higher temperatures.\n Eventually, color confinement would be lost and an extremely hot plasma\n of freely moving quarks and gluons would be formed. This theoretical phase\n of matter is called quark-gluon plasma.[81] The exact conditions needed\n to give rise to this state are unknown and have been the subject of a great\n deal of speculation and experimentation.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /js/util/relativeDate.js: -------------------------------------------------------------------------------- 1 | var relativeDateRanges = [ 2 | [0, 15000, l('timeRangeJustNow')], 3 | [15000, 300000, l('timeRangeMinutes')], 4 | [300000, 3600000, l('timeRangeHour')], 5 | [3600000, 86400000, l('timeRangeDay')], 6 | [86400000, 604800000, l('timeRangeWeek')], 7 | [604800000, 2592000000, l('timeRangeMonth')], 8 | [2592000000, 31104000000, l('timeRangeYear')], 9 | [31104000000, Infinity, l('timeRangeLongerAgo')] 10 | ] 11 | 12 | function formatRelativeDate (date) { 13 | var diff = Date.now() - date 14 | for (var i = 0; i < relativeDateRanges.length; i++) { 15 | if (relativeDateRanges[i][0] <= diff && relativeDateRanges[i][1] >= diff) { 16 | return relativeDateRanges[i][2] 17 | } 18 | } 19 | return null 20 | } 21 | 22 | module.exports = formatRelativeDate 23 | -------------------------------------------------------------------------------- /scripts/buildPreload.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | const outFile = path.resolve(__dirname, '../dist/preload.js') 5 | 6 | const modules = [ 7 | 'js/preload/default.js', 8 | 'js/preload/textExtractor.js', 9 | 'js/preload/phishDetector.js', 10 | 'js/preload/readerDetector.js', 11 | 'js/preload/keywordExtractor.js', 12 | 'js/preload/siteUnbreak.js' 13 | ] 14 | 15 | function buildPreload () { 16 | /* concatenate modules */ 17 | let output = '' 18 | modules.forEach(function (script) { 19 | output += fs.readFileSync(path.resolve(__dirname, '../', script)) + ';\n' 20 | }) 21 | 22 | fs.writeFileSync(outFile, output, 'utf-8') 23 | } 24 | 25 | if (module.parent) { 26 | module.exports = buildPreload 27 | } else { 28 | buildPreload() 29 | } 30 | -------------------------------------------------------------------------------- /scripts/buildMain.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | const outFile = path.resolve(__dirname, '../main.build.js') 5 | 6 | const modules = [ 7 | 'dist/localization.build.js', 8 | 'main/main.js', 9 | 'main/filtering.js', 10 | 'main/viewManager.js' 11 | ] 12 | 13 | function buildMain () { 14 | 15 | // build localization support first, since it is included in the bundle 16 | require('./buildLocalization.js')() 17 | 18 | /* concatenate modules */ 19 | let output = '' 20 | modules.forEach(function (script) { 21 | output += fs.readFileSync(path.resolve(__dirname, '../', script)) + ';\n' 22 | }) 23 | 24 | fs.writeFileSync(outFile, output, 'utf-8') 25 | } 26 | 27 | if (module.parent) { 28 | module.exports = buildMain 29 | } else { 30 | buildMain() 31 | } 32 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); 7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), 8 | url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), 9 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), 10 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), 11 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), 9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/yahoo-3/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Veteran Wraps Baby in American Flag, Photo Sparks Controversy", 3 | "byline": "By GILLIAN MOHNEY\n March 11, 2015 3:46 PM", 4 | "dir": "ltr", 5 | "excerpt": "From Yahoo: A photographer and Navy veteran is fighting back after a photo she posted to Facebook started an online backlash. Vanessa Hicks said she had no idea her photo would be considered controversial. The photo, from a military family’s newborn photo shoot, showed a newborn infant wrapped in an American flag held by his father, who was in his military uniform. Hicks, a Navy veteran herself and the wife of an active-duty Navy member, said her intention was to honor the flag as well as her clients, who wanted to incorporate their military service in the photo shoot.", 6 | "readerable": true 7 | } 8 | -------------------------------------------------------------------------------- /pages/error/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |

16 |

17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/less/animated.less: -------------------------------------------------------------------------------- 1 | // Animated Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .@{fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/scss/_animated.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .#{$fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /js/util/theme.js: -------------------------------------------------------------------------------- 1 | function shouldEnableDarkMode () { 2 | var hours = new Date().getHours() 3 | return hours > 21 || hours < 6 4 | } 5 | 6 | settings.get('darkMode', function (value) { 7 | if (value === true || shouldEnableDarkMode()) { 8 | document.body.classList.add('dark-mode') 9 | window.isDarkMode = true 10 | window.dispatchEvent(new CustomEvent('themechange')) 11 | } else { 12 | setInterval(function () { 13 | if (shouldEnableDarkMode()) { 14 | if (!window.isDarkMode) { 15 | document.body.classList.add('dark-mode') 16 | window.isDarkMode = true 17 | window.dispatchEvent(new CustomEvent('themechange')) 18 | } 19 | } else if (window.isDarkMode) { 20 | document.body.classList.remove('dark-mode') 21 | window.isDarkMode = false 22 | window.dispatchEvent(new CustomEvent('themechange')) 23 | } 24 | }, 10000) 25 | } 26 | }) 27 | -------------------------------------------------------------------------------- /scripts/watch.js: -------------------------------------------------------------------------------- 1 | const chokidar = require('chokidar') 2 | const path = require('path') 3 | 4 | const mainDir = path.resolve(__dirname, '../main') 5 | const jsDir = path.resolve(__dirname, '../js') 6 | const preloadDir = path.resolve(__dirname, '../js/preload') 7 | 8 | const buildMain = require('./buildMain.js') 9 | const buildBrowser = require('./buildBrowser.js') 10 | const buildPreload = require('./buildPreload.js') 11 | 12 | // rebuild everything on startup 13 | buildMain() 14 | buildBrowser() 15 | buildPreload() 16 | 17 | chokidar.watch(mainDir).on('change', function () { 18 | console.log('rebuilding main') 19 | buildMain() 20 | }) 21 | 22 | chokidar.watch(jsDir, {ignored: preloadDir}).on('change', function () { 23 | console.log('rebuilding browser') 24 | buildBrowser() 25 | }) 26 | 27 | chokidar.watch(preloadDir).on('change', function () { 28 | console.log('rebuilding preload script') 29 | buildPreload() 30 | }) 31 | -------------------------------------------------------------------------------- /js/phishingWarning.js: -------------------------------------------------------------------------------- 1 | /* redirects to the phishing warning page when a message is recieved from the webview */ 2 | 3 | var browserUI = require('api-wrapper.js') 4 | 5 | var phishingWarningPage = 'file://' + __dirname + '/pages/phishing/index.html' 6 | 7 | webviews.bindIPC('phishingDetected', function (webview, tabId, args) { 8 | var url = webview.getURL() 9 | 10 | try { 11 | var hostname = new URL(url).hostname 12 | var redirectURL = phishingWarningPage + '?url=' + encodeURIComponent(url) + '&info=' + encodeURIComponent(args[0].join('\n')) 13 | } catch (e) { 14 | var hostname = '' 15 | var redirectURL = phishingWarningPage 16 | } 17 | 18 | settings.get('phishingWhitelist', function (value) { 19 | if (!value || !hostname || value.indexOf(hostname) === -1) { 20 | // show the warning page 21 | browserUI.navigate(tabId, redirectURL) 22 | } 23 | }, { 24 | fromCache: false 25 | }) 26 | }) 27 | -------------------------------------------------------------------------------- /js/searchbar/hostsSuggestionsPlugin.js: -------------------------------------------------------------------------------- 1 | var searchbarPlugins = require('searchbar/searchbarPlugins.js') 2 | var searchbarUtils = require('searchbar/searchbarUtils.js') 3 | 4 | // hosts are parsed in util/urlParser 5 | 6 | function showHostsSuggestions (text, input, event, container) { 7 | empty(container) 8 | 9 | var results = hosts.filter(function (host) { 10 | // only match start of host string 11 | return host.indexOf(text) === 0 12 | }) 13 | 14 | results.slice(0, 4).forEach(function (result) { 15 | var item = searchbarUtils.createItem({ 16 | title: result, 17 | secondaryText: l('hostsFileEntry'), 18 | url: 'http://' + result 19 | }) 20 | 21 | container.appendChild(item) 22 | }) 23 | } 24 | 25 | searchbarPlugins.register('hostsSuggestions', { 26 | index: 1, 27 | trigger: function (text) { 28 | return (hosts.length && typeof text === 'string' && text.length > 2) 29 | }, 30 | showResults: showHostsSuggestions 31 | }) 32 | -------------------------------------------------------------------------------- /js/navbar/tabActivity.js: -------------------------------------------------------------------------------- 1 | /* fades out tabs that are inactive */ 2 | 3 | var tabActivity = { 4 | minFadeAge: 330000, 5 | refresh: function () { 6 | requestAnimationFrame(function () { 7 | var tabSet = tabs.get() 8 | var selected = tabs.getSelected() 9 | var time = Date.now() 10 | 11 | tabSet.forEach(function (tab) { 12 | if (selected === tab.id) { // never fade the current tab 13 | tabBar.getTab(tab.id).classList.remove('fade') 14 | return 15 | } 16 | if (time - tab.lastActivity > tabActivity.minFadeAge) { // the tab has been inactive for greater than minActivity, and it is not currently selected 17 | tabBar.getTab(tab.id).classList.add('fade') 18 | } else { 19 | tabBar.getTab(tab.id).classList.remove('fade') 20 | } 21 | }) 22 | }) 23 | }, 24 | init: function () { 25 | setInterval(tabActivity.refresh, 7500) 26 | } 27 | } 28 | 29 | module.exports = tabActivity 30 | -------------------------------------------------------------------------------- /pages/phishing/phishingError.js: -------------------------------------------------------------------------------- 1 | var ignoreButton = document.getElementById('ignore-button') 2 | var continueButton = document.getElementById('continue-button') 3 | 4 | ignoreButton.addEventListener('click', function () { 5 | // add the domain to the exception list 6 | 7 | settings.get('phishingWhitelist', function (value) { 8 | if (!value) { 9 | value = [] 10 | } 11 | 12 | var searchParams = new URLSearchParams(window.location.search.replace('?', '')) 13 | 14 | var url = decodeURIComponent(searchParams.get('url')) 15 | 16 | if (!url) { 17 | throw new Error('URL cannot be undefined') 18 | } 19 | 20 | var domain = new URL(url).hostname 21 | 22 | value.push(domain) 23 | 24 | settings.set('phishingWhitelist', value) 25 | 26 | // redirect back to the original page 27 | 28 | window.location = url 29 | }) 30 | }) 31 | 32 | continueButton.addEventListener('click', function () { 33 | window.location = 'https://duckduckgo.com' 34 | }) 35 | -------------------------------------------------------------------------------- /js/previewCache.js: -------------------------------------------------------------------------------- 1 | /* saves preview images for each tab */ 2 | 3 | var previewCache = { 4 | images: {}, // tabId: image 5 | get: function (tabId) { 6 | return previewCache.images[tabId] 7 | }, 8 | set: function (tabId, image) { 9 | previewCache.images[tabId] = image 10 | } 11 | } 12 | 13 | var savedData = localStorage.getItem('previewCache') 14 | 15 | if (savedData) { 16 | try { 17 | previewCache.images = JSON.parse(savedData) 18 | } catch (e) { 19 | console.warn('discarding preview cache', e) 20 | previewCache.images = {} 21 | } 22 | } 23 | 24 | setInterval(function () { 25 | // discard any images for tabs that don't exist any more 26 | // TODO replace this with an event listener 27 | for (var tab in previewCache.images) { 28 | if (!tasks.getTaskContainingTab(tab)) { 29 | delete previewCache.images[tab] 30 | } 31 | } 32 | 33 | localStorage.setItem('previewCache', JSON.stringify(previewCache.images)) 34 | }, 60000) 35 | 36 | module.exports = previewCache 37 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/normalize-spaces/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tab here incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

4 |

Foo

5 |

Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

6 |
7 |
-------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/style-tags-removal/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

4 |

Foo

5 |

Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

6 |
7 |
-------------------------------------------------------------------------------- /js/focusMode.js: -------------------------------------------------------------------------------- 1 | var isFocusMode = false 2 | 3 | ipc.on('enterFocusMode', function () { 4 | isFocusMode = true 5 | document.body.classList.add('is-focus-mode') 6 | 7 | setTimeout(function () { // wait to show the message until the tabs have been hidden, to make the message less confusing 8 | electron.remote.dialog.showMessageBox({ 9 | type: 'info', 10 | buttons: [l('closeDialog')], 11 | message: l('isFocusMode'), 12 | detail: l('focusModeExplanation1') + ' ' + l('focusModeExplanation2') 13 | }) 14 | }, 16) 15 | }) 16 | 17 | ipc.on('exitFocusMode', function () { 18 | isFocusMode = false 19 | document.body.classList.remove('is-focus-mode') 20 | }) 21 | 22 | module.exports = { 23 | enabled: function () { 24 | return isFocusMode 25 | }, 26 | warn: function () { 27 | electron.remote.dialog.showMessageBox({ 28 | type: 'info', 29 | buttons: [l('closeDialog')], 30 | message: l('isFocusMode'), 31 | detail: l('focusModeExplanation2') 32 | }) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /js/preload/siteUnbreak.js: -------------------------------------------------------------------------------- 1 | /* a collection of various hacks to unbreak sites, mainly due to missing window.open() support */ 2 | 3 | /* drive.google.com - fixes clicking on files to open them */ 4 | 5 | if (window.location.hostname === 'drive.google.com') { 6 | var realWindowOpen = window.open 7 | 8 | window.open = function (url) { 9 | if (url) { 10 | return realWindowOpen(url) 11 | } 12 | return { 13 | document: new Proxy({}, { 14 | get: function () { 15 | return function () { 16 | return document.createElement('div') 17 | } 18 | }, 19 | set: function () { 20 | console.warn('unpatched set', arguments)} 21 | } 22 | ), 23 | location: { 24 | replace: function (location) { 25 | realWindowOpen(location) 26 | } 27 | } 28 | } 29 | } 30 | } 31 | 32 | /* news.google.com - fixes clicking on news articles */ 33 | 34 | if (window.location.hostname === 'news.google.com') { 35 | window.open = null 36 | } 37 | -------------------------------------------------------------------------------- /js/preload/default.js: -------------------------------------------------------------------------------- 1 | /* imports common modules */ 2 | 3 | var electron = require('electron') 4 | var ipc = electron.ipcRenderer 5 | 6 | /* define window.chrome 7 | this is necessary because some websites (such as the Google Drive file viewer, see issue #378) check for a 8 | Chrome user agent, and then do things like if(chrome.) {} 9 | so we need to define an empty chrome object to prevent errors 10 | */ 11 | 12 | window.chrome = {} 13 | 14 | var propertiesToClone = ['deltaX', 'deltaY', 'metaKey', 'ctrlKey', 'defaultPrevented'] 15 | 16 | function cloneEvent (e) { 17 | var obj = {} 18 | 19 | for (var i = 0; i < propertiesToClone.length; i++) { 20 | obj[propertiesToClone[i]] = e[propertiesToClone[i]] 21 | } 22 | return JSON.stringify(obj) 23 | } 24 | window.addEventListener('wheel', function (e) { 25 | ipc.send('wheel-event', cloneEvent(e)) 26 | }) 27 | 28 | /* re-implement window.close, since the built-in function doesn't work correctly */ 29 | window.close = function () { 30 | ipc.send('close-window') 31 | } 32 | -------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | .fa-icon-rotate(@degrees, @rotation) { 15 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); 16 | -webkit-transform: rotate(@degrees); 17 | -ms-transform: rotate(@degrees); 18 | transform: rotate(@degrees); 19 | } 20 | 21 | .fa-icon-flip(@horiz, @vert, @rotation) { 22 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1); 23 | -webkit-transform: scale(@horiz, @vert); 24 | -ms-transform: scale(@horiz, @vert); 25 | transform: scale(@horiz, @vert); 26 | } 27 | -------------------------------------------------------------------------------- /js/menuBarVisibility.js: -------------------------------------------------------------------------------- 1 | const settings = require('util/settings.js') 2 | 3 | function initialize () { 4 | settings.get('menuBarVisible', function (value) { 5 | if (value === false) { 6 | remote.getCurrentWindow().setMenuBarVisibility(false) 7 | } else { 8 | // menu bar should be visible, do nothing 9 | } 10 | }) 11 | } 12 | 13 | function showMenuBar () { 14 | remote.getCurrentWindow().setMenuBarVisibility(true) 15 | settings.set('menuBarVisible', true) 16 | } 17 | 18 | function hideMenuBar () { 19 | remote.getCurrentWindow().setMenuBarVisibility(false) 20 | settings.set('menuBarVisible', false) 21 | } 22 | 23 | function toggleMenuBar () { 24 | if (navigator.platform === 'Win32') { 25 | // use secondary menu instead of application menu on Windows 26 | return showSecondaryMenu() 27 | } 28 | settings.get('menuBarVisible', function (value) { 29 | if (value === false) { 30 | showMenuBar() 31 | } else { 32 | hideMenuBar() 33 | } 34 | }) 35 | } 36 | 37 | module.exports = {initialize, toggleMenuBar} 38 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/basic-tags-cleaning/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

4 |

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

5 |

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

6 |
7 |
8 |

Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

9 |

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

10 |
11 |
-------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/remove-script-tags/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

4 |

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

5 |

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

6 |
7 |
8 |

Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

9 |

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

10 |
11 |
-------------------------------------------------------------------------------- /ext/font-awesome-4.4.0/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | @mixin fa-icon-rotate($degrees, $rotation) { 15 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 16 | -webkit-transform: rotate($degrees); 17 | -ms-transform: rotate($degrees); 18 | transform: rotate($degrees); 19 | } 20 | 21 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 22 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 23 | -webkit-transform: scale($horiz, $vert); 24 | -ms-transform: scale($horiz, $vert); 25 | transform: scale($horiz, $vert); 26 | } 27 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/remove-extra-paragraphs/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

4 |

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

5 |

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

6 |
7 |
8 |

Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

9 |

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

10 |
11 |
-------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/comment-inside-script-parsing/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

4 |

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

5 |

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

6 |
7 |
8 |

Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

9 |

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

10 |
11 |
-------------------------------------------------------------------------------- /pages/pdfViewer/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 |
17 | 18 |
19 |
20 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/remove-extra-brs/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

4 |

5 |

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

6 |

7 |

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

8 |
9 |
10 |

Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

11 |

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

12 |
13 |
-------------------------------------------------------------------------------- /css/webviews.css: -------------------------------------------------------------------------------- 1 | #webviews { 2 | height: calc(100vh - 36px); 3 | position: relative; 4 | } 5 | body.windows #webviews { 6 | height: calc(100vh - 46px); 7 | } 8 | 9 | .arrow-indicator { 10 | width: 140px; 11 | height: 140px; 12 | border-radius: 70px; 13 | background: #000; 14 | position: fixed; 15 | top: 50%; 16 | z-index: 1; 17 | opacity: 0; 18 | visibility: hidden; 19 | } 20 | /* use a separate class to avoid an issue where the arrow sometimes appears briefly on startup beginning in Chromium 61 */ 21 | .arrow-indicator.animating { 22 | transition: opacity 0.3s, visibility 0.3s; 23 | } 24 | .arrow-indicator.shown { 25 | opacity: 0.6; 26 | visibility: visible; 27 | } 28 | #leftArrowContainer { 29 | left: -70px; 30 | } 31 | #rightArrowContainer { 32 | right: -70px; 33 | } 34 | 35 | .arrow { 36 | color: white; 37 | font-size: 40px !important; 38 | margin-top: 50px; 39 | } 40 | #leftArrow { 41 | float: right; 42 | margin-right: 15px; 43 | } 44 | #rightArrow { 45 | float: left; 46 | margin-left: 15px; 47 | } 48 | 49 | #webview-placeholder { 50 | width: 100%; 51 | height: 100%; 52 | filter: blur(6px) 53 | } 54 | -------------------------------------------------------------------------------- /ext/readability-master/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "readability", 3 | "version": "0.0.1", 4 | "description": "A standalone version of the readability library used for Firefox Reader View.", 5 | "main": "Readability.js", 6 | "scripts": { 7 | "lint": "eslint .", 8 | "test": "mocha test/test-*.js", 9 | "generate-testcase": "node test/generate-testcase.js", 10 | "perf": "matcha benchmarks/benchmarks.js", 11 | "perf-reference": "READABILITY_PERF_REFERENCE=1 matcha --reporter ./benchmarks/benchmark-reporter.js benchmarks/benchmarks.js" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/mozilla/readability" 16 | }, 17 | "author": "", 18 | "license": "Apache-2.0", 19 | "bugs": { 20 | "url": "https://github.com/mozilla/readability/issues" 21 | }, 22 | "engines": { 23 | "node" : ">=6.5" 24 | }, 25 | "homepage": "https://github.com/mozilla/readability", 26 | "devDependencies": { 27 | "chai": "^2.1.*", 28 | "eslint": ">=4.2", 29 | "js-beautify": "^1.5.5", 30 | "jsdom": "^7.0", 31 | "matcha": "^0.6.0", 32 | "mocha": "^2.2.*" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/replace-font-tags/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

4 |

Foo

5 |

Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

6 |
7 |
-------------------------------------------------------------------------------- /css/findinpage.css: -------------------------------------------------------------------------------- 1 | #findinpage-bar { 2 | width: 100%; 3 | display: flex; 4 | position: absolute; 5 | top: 0; 6 | left: 0; 7 | align-items: center; 8 | padding-left: 0.5em; 9 | padding-right: 0.75em; 10 | height: 35px; 11 | z-index: 99; 12 | } 13 | body.mac:not(.fullscreen) #findinpage-bar { 14 | padding-left: 80px; 15 | } 16 | body.windows #findinpage-bar { 17 | top: 10px; 18 | right: 138px; 19 | width: calc(100% - 138px); 20 | } 21 | #findinpage-bar #findinpage-input { 22 | flex: 1; 23 | -webkit-appearance: none; 24 | appearance: none; 25 | outline: none; 26 | border: 0; 27 | background: inherit; 28 | color: inherit; 29 | min-width: 80px; 30 | } 31 | #findinpage-bar #findinpage-input::-webkit-input-placeholder { 32 | opacity: 0.75; 33 | color: inherit; 34 | } 35 | #findinpage-bar .divider { 36 | height: 100%; 37 | width: 1em; 38 | } 39 | #findinpage-bar .inline-text { 40 | font-size: 0.85em; 41 | vertical-align: middle; 42 | } 43 | #findinpage-bar .icon { 44 | font-size: 1em; 45 | padding: 0 0.5em; 46 | margin-top: -2px; 47 | } 48 | #findinpage-bar .icon.fa-angle-up, 49 | #findinpage-bar .icon.fa-angle-down { 50 | font-size: 1.2em; 51 | } 52 | -------------------------------------------------------------------------------- /pages/phishing/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 |

20 |

21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/rtl-1/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

5 | Lorem ipsum dolor sit amet. 6 |

7 |

8 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 9 |

10 |

11 | Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 12 |

13 |
14 |
15 |
16 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/rtl-2/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

5 | Lorem ipsum dolor sit amet. 6 |

7 |

8 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 9 |

10 |

11 | Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 12 |

13 |
14 |
15 |
16 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/rtl-3/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

5 | Lorem ipsum dolor sit amet. 6 |

7 |

8 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 9 |

10 |

11 | Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 12 |

13 |
14 |
15 |
16 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/rtl-4/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

5 | Lorem ipsum dolor sit amet. 6 |

7 |

8 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 9 |

10 |

11 | Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 12 |

13 |
14 |
15 |
16 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/replace-brs/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Lorem ipsum

4 |

dolor sit

5 |

amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

6 |
7 |
8 |

Tempor

9 |

incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

10 |
11 |
-------------------------------------------------------------------------------- /ext/readability-master/index.js: -------------------------------------------------------------------------------- 1 | var path = require("path"); 2 | var fs = require("fs"); 3 | 4 | // We want to load Readability and JSDOMParser, which aren't set up as commonjs libraries, 5 | // and so we need to do some hocus-pocus with 'vm' to import them on a separate scope 6 | // (identical) scope context. 7 | var vm = require("vm"); 8 | var readabilityPath = path.join(__dirname, "Readability.js"); 9 | var jsdomPath = path.join(__dirname, "JSDOMParser.js"); 10 | 11 | 12 | var scopeContext = {}; 13 | // We generally expect dump() and console.{whatever} to work, so make these available 14 | // in the scope we're using: 15 | scopeContext.dump = console.log; 16 | scopeContext.console = console; 17 | 18 | // Actually load files. NB: if either of the files has parse errors, 19 | // node is dumb and shows you a syntax error *at this callsite* . Don't try to find 20 | // a syntax error on this line, there isn't one. Go look in the file it's loading instead. 21 | vm.runInNewContext(fs.readFileSync(jsdomPath), scopeContext, jsdomPath); 22 | vm.runInNewContext(fs.readFileSync(readabilityPath), scopeContext, readabilityPath); 23 | 24 | module.exports = { 25 | Readability: scopeContext.Readability, 26 | JSDOMParser: scopeContext.JSDOMParser 27 | }; 28 | -------------------------------------------------------------------------------- /ext/readability-master/benchmarks/benchmark-reporter.js: -------------------------------------------------------------------------------- 1 | var clean = require('matcha/lib/matcha/reporters/clean'); 2 | 3 | function average(list) { 4 | if (!list.length) 5 | return 0; 6 | 7 | var sum = list.reduce(function(previous, current) { 8 | return previous + current; 9 | }); 10 | return (sum / list.length).toFixed(0); 11 | } 12 | 13 | 14 | // Like clean, but also produces an average: 15 | module.exports = function(runner, utils) { 16 | var humanize = utils.humanize; 17 | var padBefore = utils.padBefore; 18 | var color = utils.color; 19 | var results = {}; 20 | var currentResults = []; 21 | runner.on('bench end', function(benchResults) { 22 | currentResults.push(benchResults.ops); 23 | }); 24 | runner.on('suite end', function(suite) { 25 | var avg = humanize(average(currentResults)); 26 | console.log(padBefore(avg + ' op/s', 22) + ' » ' + suite.title); 27 | console.log(); 28 | results[suite.title] = avg; 29 | currentResults = []; 30 | }); 31 | 32 | runner.on('end', function() { 33 | for (var k in results) { 34 | console.log(color(padBefore(k, 30) + ': ', 'gray') + results[k] + ' op/s'); 35 | } 36 | console.log(); 37 | }); 38 | 39 | clean(runner, utils); 40 | }; 41 | -------------------------------------------------------------------------------- /js/util/defaultKeyMap.js: -------------------------------------------------------------------------------- 1 | var defaultKeyMap = { 2 | 'addPrivateTab': 'shift+mod+p', 3 | 'toggleTasks': 'shift+mod+e', 4 | 'goBack': 'mod+left', 5 | 'goForward': 'mod+right', 6 | 'enterEditMode': ['mod+l', 'mod+k'], 7 | 'completeSearchbar': 'mod+enter', 8 | 'closeTab': 'mod+w', 9 | 'restoreTab': 'shift+mod+t', 10 | 'gotoFirstTab': 'shift+mod+9', 11 | 'gotoLastTab': 'mod+9', 12 | 'addToFavorites': 'mod+d', 13 | 'toggleReaderView': 'shift+mod+r', 14 | 'switchToNextTab': ['option+mod+right', 'ctrl+tab', 'shift+mod+pagedown'], 15 | 'switchToPreviousTab': ['option+mod+left', 'shift+ctrl+tab', 'shift+mod+pageup'], 16 | 'switchToNextTask': 'mod+]', 17 | 'switchToPreviousTask': 'mod+[', 18 | 'closeAllTabs': 'shift+mod+n', 19 | 'reload': 'mod+r', 20 | 'showAndHideMenuBar': 'alt', 21 | 'followLink': 'mod+enter' 22 | } 23 | /* Utility function to override default mapping with user settings */ 24 | function userKeyMap (settings) { 25 | var keyMapCopy = Object.assign({}, defaultKeyMap) 26 | if (settings) { 27 | // override the default keymap by the user defined ones 28 | Object.keys(keyMapCopy).forEach(function (key) { 29 | if (settings[key]) { 30 | keyMapCopy[key] = settings[key] 31 | } 32 | }) 33 | } 34 | return keyMapCopy 35 | } 36 | -------------------------------------------------------------------------------- /ext/readability-master/test/utils.js: -------------------------------------------------------------------------------- 1 | var path = require("path"); 2 | var fs = require("fs"); 3 | var prettyPrint = require("js-beautify").html; 4 | 5 | function readFile(filePath) { 6 | return fs.readFileSync(filePath, {encoding: "utf-8"}).trim(); 7 | } 8 | 9 | function readJSON(jsonPath) { 10 | return JSON.parse(readFile(jsonPath)); 11 | } 12 | 13 | var testPageRoot = path.join(__dirname, "test-pages"); 14 | 15 | exports.getTestPages = function() { 16 | return fs.readdirSync(testPageRoot).map(function(dir) { 17 | return { 18 | dir: dir, 19 | source: readFile(path.join(testPageRoot, dir, "source.html")), 20 | expectedContent: readFile(path.join(testPageRoot, dir, "expected.html")), 21 | expectedMetadata: readJSON(path.join(testPageRoot, dir, "expected-metadata.json")), 22 | }; 23 | }); 24 | }; 25 | 26 | exports.prettyPrint = function(html) { 27 | return prettyPrint(html, { 28 | "indent_size": 4, 29 | "indent_char": " ", 30 | "indent_level": 0, 31 | "indent_with_tabs": false, 32 | "preserve_newlines": false, 33 | "break_chained_methods": false, 34 | "eval_code": false, 35 | "unescape_strings": false, 36 | "wrap_line_length": 0, 37 | "wrap_attributes": "auto", 38 | "wrap_attributes_indent_size": 4 39 | }); 40 | }; 41 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/missing-paragraphs/expected-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy\n eirmod tempor invidunt", 3 | "byline": "Henri Sivonen", 4 | "excerpt": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy\n eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam\n voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet\n clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit\n amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam\n nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,\n sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.\n Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor\n sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed\n diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,\n sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.\n Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor\n sit amet.", 5 | "readerable": true 6 | } 7 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/replace-brs/source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Replace brs test 6 | 7 | 8 |
9 |

Lorem

10 |
11 | Lorem ipsum
dolor sit


amet, consectetur adipisicing elit, sed do eiusmod 12 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 13 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 14 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 15 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 16 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 17 |
18 |

Foo

19 |
20 | Tempor

incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 21 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 22 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 23 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 24 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 25 |
26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /pages/sessionRestoreError/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |

16 |

17 | 18 |
19 |
20 | 21 |
22 |
23 | 24 |

25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/normalize-spaces/source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Normalize space test 6 | 7 | 8 |
9 |

Lorem

10 |
11 | Lorem 12 | ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 13 | tab here 14 | incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 15 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 16 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 17 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 18 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 19 |
20 |

Foo

21 |
22 | Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 23 | quis nostrud exercitation 24 | 25 | 26 | 27 | 28 | ullamco laboris nisi ut aliquip ex ea commodo 29 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 30 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 31 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 32 |
33 |
34 | 35 | 36 | -------------------------------------------------------------------------------- /ext/filterLists/updateEasylist.js: -------------------------------------------------------------------------------- 1 | /* downloads the latest version of easyList and easyPrivacy, removes element hiding rules, and saves them to ext/filterLists/easylist+easyprivacy-noelementhiding.txt */ 2 | 3 | const https = require('https') 4 | const fs = require('fs') 5 | 6 | const filePath = __dirname + '/easylist+easyprivacy-noelementhiding.txt' 7 | 8 | const easylistOptions = { 9 | hostname: 'easylist.to', 10 | port: 443, 11 | path: '/easylist/easylist.txt', 12 | method: 'GET' 13 | } 14 | 15 | const easyprivacyOptions = { 16 | hostname: 'easylist.to', 17 | port: 443, 18 | path: '/easylist/easyprivacy.txt', 19 | method: 'GET' 20 | } 21 | 22 | function makeRequest (options, callback) { 23 | var request = https.request(options, function (response) { 24 | response.setEncoding('utf8') 25 | 26 | var data = '' 27 | response.on('data', function (chunk) { 28 | data += chunk 29 | }) 30 | 31 | response.on('end', function () { 32 | callback(data) 33 | }) 34 | }) 35 | request.end() 36 | } 37 | 38 | /* get the filter lists */ 39 | 40 | makeRequest(easylistOptions, function (easylist) { 41 | makeRequest(easyprivacyOptions, function (easyprivacy) { 42 | var data = easylist + easyprivacy 43 | 44 | data = data.replace(/.*##.+\n/g, '') 45 | 46 | fs.writeFile(filePath, data) 47 | }) 48 | }) 49 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/rtl-1/source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | RTL Test 7 | 8 | 9 | 10 |
11 |
12 |

Lorem

13 |

14 | Lorem ipsum dolor sit amet. 15 |

16 |

17 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 18 |

19 |

20 | Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 21 |

22 |
23 |
24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/rtl-3/source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | RTL Test 7 | 8 | 9 | 10 |
11 |
12 |

Lorem

13 |

14 | Lorem ipsum dolor sit amet. 15 |

16 |

17 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 18 |

19 |

20 | Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 21 |

22 |
23 |
24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/rtl-4/source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | RTL Test 7 | 8 | 9 | 10 |
11 |
12 |

Lorem

13 |

14 | Lorem ipsum dolor sit amet. 15 |

16 |

17 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 18 |

19 |

20 | Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 21 |

22 |
23 |
24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/rtl-2/source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | RTL Test 7 | 8 | 9 | 10 |
11 |
12 |

Lorem

13 |

14 | Lorem ipsum dolor sit amet. 15 |

16 |

17 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 18 |

19 |

20 | Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 21 |

22 |
23 |
24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/remove-extra-brs/source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Remove trailing brs test 6 | 7 | 8 |
9 |

Lorem

10 |
11 |
12 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 13 | tempor incididunt ut labore et dolore magna aliqua.

14 |

Ut enim ad minim veniam, 15 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 16 | consequat.


17 |

Duis aute irure dolor in reprehenderit in voluptate velit esse 18 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 19 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

20 |
21 |

Foo

22 |
23 |

Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 24 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 25 | consequat.

26 |

Duis aute irure dolor in reprehenderit in voluptate velit esse 27 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 28 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

29 |
30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "min", 3 | "productName": "Min", 4 | "version": "1.7.1", 5 | "electronVersion": "3.0.0-beta.7", 6 | "main": "main.build.js", 7 | "dependencies": { 8 | "dexie": "^1.2.0", 9 | "dragula": "^3.6.2", 10 | "mousetrap": "^1.5.3", 11 | "pdfjs-dist": "2.0.91", 12 | "string_score": "^0.1.22" 13 | }, 14 | "devDependencies": { 15 | "browserify": "^16.2.2", 16 | "chokidar": "^2.0.4", 17 | "decomment": "^0.9.0", 18 | "electron": "^2.0.0-beta.6", 19 | "electron-renderify": "0.0.2", 20 | "grunt": "^1.0.1", 21 | "grunt-electron": "^5.0.0", 22 | "grunt-run": "^0.8.0", 23 | "standard": "^7.1.0" 24 | }, 25 | "optionalDependencies": { 26 | "grunt-electron-installer-debian": "^0.5.0" 27 | }, 28 | "license": "Apache-2.0", 29 | "scripts": { 30 | "test": "node_modules/.bin/standard --verbose js/**/*.js main/*.js", 31 | "watch": "node ./scripts/watch.js", 32 | "buildMain": "node ./scripts/buildMain.js", 33 | "buildBrowser": "node ./scripts/buildBrowser.js", 34 | "buildPreload": "node ./scripts/buildPreload.js", 35 | "build": "npm run buildMain && npm run buildBrowser && npm run buildPreload", 36 | "updateFilters": "node ./ext/filterLists/updateEasylist.js" 37 | }, 38 | "repository": { 39 | "type": "git", 40 | "url": "https://github.com/minbrowser/min.git" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /scripts/buildLocalization.js: -------------------------------------------------------------------------------- 1 | /* compile the language files into dist/localization.build.js */ 2 | 3 | const path = require('path') 4 | const fs = require('fs') 5 | const decomment = require('decomment') 6 | 7 | const outputDir = path.join(__dirname, '../dist') 8 | const outputFile = path.join(outputDir, 'localization.build.js') 9 | 10 | const languageFileDir = path.join(__dirname, '../localization/languages') 11 | 12 | function buildLocalization () { 13 | // read all the files from the "languages" directory 14 | 15 | const languageFiles = fs.readdirSync(languageFileDir) 16 | 17 | // build languages object 18 | 19 | let languages = {} 20 | 21 | languageFiles.forEach(function (file) { 22 | let data = fs.readFileSync(path.join(languageFileDir, file), 'utf-8') 23 | 24 | let obj = JSON.parse(decomment(data)) 25 | 26 | languages[obj.identifier] = obj 27 | }) 28 | 29 | let fileContents = 'var languages = ' + JSON.stringify(languages) + ';\n' 30 | 31 | // add contents of localization.js (helper functions, ...) 32 | 33 | fileContents += fs.readFileSync(path.join(__dirname, '../localization/localizationHelpers.js')) 34 | 35 | if (!fs.existsSync(outputDir)) { 36 | fs.mkdirSync(outputDir) 37 | } 38 | 39 | fs.writeFileSync(outputFile, fileContents) 40 | } 41 | 42 | if (module.parent) { 43 | module.exports = buildLocalization 44 | } else { 45 | buildLocalization() 46 | } 47 | -------------------------------------------------------------------------------- /css/windowsCaptionButtons.css: -------------------------------------------------------------------------------- 1 | 2 | .windows-caption-buttons { 3 | display: none; 4 | } 5 | 6 | body.windows .windows-caption-buttons { 7 | display: flex; 8 | position: absolute; 9 | top: 10px; 10 | right: 0; 11 | z-index: 10; 12 | } 13 | 14 | .windows-caption-buttons .element { 15 | line-height: 36px; 16 | width: 36px; 17 | stroke: #000; 18 | padding: 0 5px; 19 | box-sizing: content-box; 20 | fill: transparent; 21 | text-align: center; 22 | } 23 | 24 | body:not(.task-overlay-is-shown).dark-theme .windows-caption-buttons .element { 25 | stroke: #fff; 26 | } 27 | 28 | 29 | .windows-caption-buttons .element > svg { 30 | width: 12px; 31 | height: 12px; 32 | } 33 | 34 | .windows-caption-buttons .element { 35 | transition: background-color 0.1s linear, color 0.1s linear; 36 | } 37 | .windows-caption-buttons .element:hover { 38 | background-color: rgba(196, 196, 196, 0.4); 39 | transition: none; 40 | } 41 | .windows-caption-buttons .element:active { 42 | background-color: rgba(168, 168, 168, 0.5); 43 | } 44 | .windows-caption-buttons .element.caption-close:hover { 45 | background-color: #e81123; 46 | } 47 | .windows-caption-buttons .element.caption-close:hover > svg, 48 | .windows-caption-buttons .element.caption-close:active > svg { 49 | stroke: #fff; 50 | stroke-width: 1.1px; 51 | } 52 | .windows-caption-buttons .element.caption-close:active { 53 | background-color: rgba(232, 17, 35, 0.6); 54 | } -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/replace-font-tags/source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Replace font tags test 6 | 7 | 8 |
9 |

Lorem

10 |
11 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 12 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 13 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 14 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 15 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 16 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 17 |
18 |

Foo

19 |
20 | Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 21 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 22 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 23 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 24 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 25 |
26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/comment-inside-script-parsing/source.html: -------------------------------------------------------------------------------- 1 | 2 | Test script parsing 3 | 4 | 10 |
11 |

Lorem

12 |
13 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 14 | tempor incididunt ut labore et dolore magna aliqua.

15 |

Ut enim ad minim veniam, 16 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 17 | consequat.

18 |

Duis aute irure dolor in reprehenderit in voluptate velit esse 19 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 20 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

21 |
22 |

Foo

23 |
24 |

Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 25 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 26 | consequat.

27 |

Duis aute irure dolor in reprehenderit in voluptate velit esse 28 | cillum dolore eu fugiat nulla pariatur. 29 | Excepteur sint occaecat cupidatat non 30 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

31 |
32 |
33 | 34 | 35 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/remove-extra-paragraphs/source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Replace font tags test 6 | 7 | 8 |
9 |

Lorem

10 |
11 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 12 | tempor incididunt ut labore et dolore magna aliqua.

13 |

14 |

Ut enim ad minim veniam, 15 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 16 | consequat.

17 |

18 |

19 |

Duis aute irure dolor in reprehenderit in voluptate velit esse 20 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 21 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

22 |

23 |
24 |

Foo

25 |
26 |

Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 27 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 28 | consequat.

29 |

30 |

31 |

Duis aute irure dolor in reprehenderit in voluptate velit esse 32 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 33 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

34 |

35 | 36 | 37 |

38 |
39 |
40 | 41 | 42 | -------------------------------------------------------------------------------- /pages/pagebase.css: -------------------------------------------------------------------------------- 1 | body, 2 | html { 3 | width: 100%; 4 | height: 100%; 5 | padding: 0; 6 | margin: 0; 7 | box-sizing: border-box; 8 | font-family: ".SFNSText-Regular", 'Helvetica Neue', 'Arial', sans-serif; 9 | background-color: #eee; 10 | } 11 | 12 | body.dark-mode { 13 | background-color: rgb(33, 37, 43); 14 | color: lightgrey 15 | } 16 | 17 | #page-wrapper { 18 | width: auto; 19 | height: auto; 20 | position: absolute; 21 | top: 50%; 22 | left: 50%; 23 | transform: translate(-50%, -50%); 24 | max-width: 600px; 25 | } 26 | h1 { 27 | font-size: 2.75em; 28 | font-family: ".SFNSDisplay-Light", 'Helvetica Neue', 'Arial', sans-serif; 29 | font-weight: normal; 30 | margin-bottom: 0.25em; 31 | margin-top: 0; 32 | } 33 | h2 { 34 | font-size: 1.15em; 35 | font-weight: normal; 36 | margin-top: 0; 37 | } 38 | button { 39 | -webkit-appearance: none; 40 | color: inherit; 41 | font-size: 1.1em; 42 | padding: 0.5em 1em; 43 | border: 0; 44 | background-color: rgba(0, 0, 0, 0.1); 45 | margin-top: 0.5em; 46 | } 47 | button.secondary-button { 48 | padding: 0.5em; 49 | margin-left: -0.5em; 50 | margin-right: 2em; 51 | transition: 0.1s; 52 | background: none; 53 | opacity: 0.6; 54 | text-decoration: underline; 55 | } 56 | button.secondary-button:hover { 57 | opacity: 0.8; 58 | background: rgba(0, 0, 0, 0.05); 59 | cursor: pointer; 60 | } 61 | button.secondary-button { 62 | float: left; 63 | } 64 | button.primary-button { 65 | float: right; 66 | } 67 | 68 | a { 69 | color: royalblue; 70 | text-decoration: none; 71 | } 72 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/style-tags-removal/source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Style tags removal 6 | 7 | 8 | 9 |
10 |

Lorem

11 | 14 |
15 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 16 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 17 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 18 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 19 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 20 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 21 |
22 | 27 |

Foo

28 |
29 | Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 30 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 31 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 32 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 33 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 34 |
35 |
36 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/basic-tags-cleaning/source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Basic tag cleaning test 6 | 7 | 8 |
9 |

Lorem

10 |
11 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 12 | tempor incididunt ut labore et dolore magna aliqua.

13 |

Ut enim ad minim veniam, 14 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 15 | consequat.

16 | 17 |

Duis aute irure dolor in reprehenderit in voluptate velit esse 18 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 19 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

20 |
21 |

Foo

22 |
23 |

Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 24 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 25 | consequat.

26 | 27 | 28 | 29 | 30 |

Duis aute irure dolor in reprehenderit in voluptate velit esse 31 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 32 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

33 |
34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/yahoo-4/expected.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | トレンドマイクロは3月9日、Wi-Fi利用時の通信を暗号化し保護するスマホ・タブレット向けのセキュリティアプリ「フリーWi-Fiプロテクション」(iOS/Android)の発売を開始すると発表した。1年版ライセンスは2900円(税込)で、2年版ライセンスは5000円(税込)。

4 |  フリーWi-Fiプロテクションは、App Storeおよび、Google Playにて販売され、既に提供しているスマホ・タブレット向け総合セキュリティ対策アプリ「ウイルスバスター モバイル」と併用することで、不正アプリや危険なウェブサイトからの保護に加え、通信の盗み見を防ぐことができる。

5 |  2020年の東京オリンピック・パラリンピックの開催などを見据え、フリーWi-Fi(公衆無線LAN)の設置が促進され、フリーWi-Fiの利用者も増加している。 6 |

7 |  一方で、脆弱な設定のフリーWi-Fiや攻撃者が設置した偽のフリーWi-Fiへの接続などによる情報漏えい、通信の盗み見などのセキュリティリスクが危惧されているという。 8 |

9 |  正規事業者が提供する安全性の高いフリーWi-Fiのほかにも、通信を暗号化していない安全性の低いフリーWi-Fi、さらにはサイバー犯罪者が設置したフリーWi-Fiなどさまざまなものが混在している。また、利用者は、接続する前にひとつひとつ安全性を確認するのは難しい状況だとしている。 10 |

11 |  トレンドマイクロがスマートフォン保持者でフリーWi-Fiの利用経験がある人に実施した調査では、回答者の約85%が安全なフリーWi-Fiと危険なフリーWi-Fiは「見分けられない」と回答。さらに、約65%がフリーWi-Fiの利用に不安を感じていると回答している。 12 |

13 |  こうした環境の変化やユーザの状況を鑑み、フリーWi-Fiプロテクションの提供を開始する。同アプリをインストールすることで利用者は、万が一安全性の低いフリーWi-Fiのアクセスポイントに接続してしまった場合でも、その通信を暗号化でき、通信の盗み見やそれによる情報漏えいのリスクを低減できるようになる。 14 |

15 |  具体的には、フリーWi-Fi利用時に、スマートフォンがフリーWi-Fiプロテクションインフラに接続することにより、フリーWi-Fiのアクセスポイントを介した通信がVPN(Virtual Private Network)で暗号化される。これにより利用者は、第三者から通信を傍受されることやデータの情報漏えいを防ぐことが可能。さらに、かんたん自動接続の機能により、通信を暗号化していない安全性が低いフリーWi-Fi接続時や利用者が指定したWi-Fiへ接続する際に、自動的に通信を暗号化し、利用者の通信を保護する。

16 |  また、フリーWi-Fiプロテクションインフラと、莫大なセキュリティ情報のビッグデータを保有するクラウド型セキュリティ技術基盤「Trend Micro Smart Protection Network」(SPN)が連携することで、フリーWi-Fiプロテクションインフラを経由してインターネットを利用する際に、利用者がフィッシング詐欺サイトや偽サイトなどへの不正サイトへアクセスすることをブロックできるという。

17 |

18 |
19 | -------------------------------------------------------------------------------- /js/preload/readerDetector.js: -------------------------------------------------------------------------------- 1 | /* detects if a page is readerable, and tells the main process if it is */ 2 | 3 | function pageIsReaderable () { 4 | var paragraphMap = new Map() 5 | 6 | var paragraphs = document.querySelectorAll('p') 7 | var totalLength = 0 8 | 9 | if (!paragraphs) { 10 | return false 11 | } 12 | 13 | for (var i = 0; i < paragraphs.length; i++) { 14 | var pLength = Math.max(paragraphs[i].textContent.length - 100, -30) 15 | totalLength += pLength 16 | 17 | var prev = paragraphMap.get(paragraphs[i].parentNode) || 0 18 | paragraphMap.set(paragraphs[i].parentNode, prev + pLength) 19 | } 20 | 21 | var largestValue = 0 22 | 23 | paragraphMap.forEach(function (value, key) { 24 | if (value > largestValue) { 25 | largestValue = value 26 | } 27 | }) 28 | 29 | if ((largestValue > 400 && largestValue / totalLength > 0.33) || (largestValue > 200 && document.querySelector('article, meta[property="og:type"][content="article"]'))) { 30 | return true 31 | } else { 32 | return false 33 | } 34 | } 35 | 36 | window.addEventListener('load', function (e) { 37 | if (pageIsReaderable()) { 38 | // the page is probably an article 39 | 40 | // some websites can cause multiple did-finish-load events. In webview.js, we assume these mean a new page, and set readerable to false. Because of this, if we send canReader, and later there is another load event, the button will never show up. To get around this, we send multiple canReader events at intervals. 41 | 42 | setTimeout(function () { 43 | ipc.send('canReader') 44 | }, 500) 45 | 46 | setTimeout(function () { 47 | ipc.send('canReader') 48 | }, 2500) 49 | } 50 | }) 51 | -------------------------------------------------------------------------------- /reader/readerViewDB.js: -------------------------------------------------------------------------------- 1 | function saveArticle (url, pageHTML, article, extraData) { 2 | if (!url || !pageHTML) { 3 | console.warn('no article found for db') 4 | return 5 | } 6 | 7 | db.readingList.where('url').equals(url).count(function (ct) { 8 | if (ct == 0) { 9 | db.readingList.add({ 10 | url: url, 11 | time: Date.now(), 12 | visitCount: 1, 13 | pageHTML: pageHTML, 14 | article: article, 15 | extraData: extraData || {} 16 | }) 17 | } else { 18 | db.readingList.where('url').equals(url).each(function (item) { 19 | db.readingList.where('url').equals(url).modify({ 20 | url: url, 21 | time: Date.now(), 22 | visitCount: item.visitCount + 1, 23 | pageHTML: pageHTML, 24 | article: article, 25 | extraData: extraData || {} 26 | }) 27 | }) 28 | } 29 | }) 30 | } 31 | 32 | function updateExtraData (url, newExtraData) { 33 | db.readingList.where('url').equals(url).each(function (item) { 34 | var extraData = item.extraData || {} 35 | for (var key in newExtraData) { 36 | extraData[key] = newExtraData[key] 37 | } 38 | 39 | db.readingList.update(url, { 40 | extraData: extraData 41 | }) 42 | }) 43 | } 44 | 45 | function getArticle (url, cb) { 46 | db.readingList.where('url').equals(url).count(function (count) { 47 | if (count > 0) { 48 | db.readingList.where('url').equals(url).each(cb) 49 | } else { 50 | cb(null) 51 | } 52 | }) 53 | } 54 | 55 | function cleanupDB () { 56 | db.readingList.where('time').below(Date.now() - (30 * 24 * 60 * 60 * 1000)).delete() 57 | } 58 | 59 | setTimeout(cleanupDB, 5000) 60 | -------------------------------------------------------------------------------- /js/util/searchEngine.js: -------------------------------------------------------------------------------- 1 | window.currentSearchEngine = { 2 | name: '', 3 | searchURL: '%s' 4 | } 5 | 6 | var defaultSearchEngine = 'DuckDuckGo' 7 | 8 | var searchEngines = { 9 | DuckDuckGo: { 10 | name: 'DuckDuckGo', 11 | searchURL: 'https://duckduckgo.com/?q=%s&t=min' 12 | }, 13 | Google: { 14 | name: 'Google', 15 | searchURL: 'https://google.com/search?q=%s' 16 | }, 17 | Bing: { 18 | name: 'Bing', 19 | searchURL: 'https://www.bing.com/search?q=%s' 20 | }, 21 | Yahoo: { 22 | name: 'Yahoo', 23 | searchURL: 'https://search.yahoo.com/yhs/search?p=%s' 24 | }, 25 | Baidu: { 26 | name: 'Baidu', 27 | searchURL: 'https://www.baidu.com/s?wd=%s' 28 | }, 29 | StartPage: { 30 | name: 'StartPage', 31 | searchURL: 'https://startpage.com/do/search?q=%s' 32 | }, 33 | Wikipedia: { 34 | name: 'Wikipedia', 35 | searchURL: 'https://wikipedia.org/w/index.php?search=%s' 36 | }, 37 | Yandex: { 38 | name: 'Yandex', 39 | searchURL: 'https://yandex.com/search/?text=%s' 40 | }, 41 | none: { 42 | name: 'none', 43 | searchURL: 'http://%s' 44 | } 45 | } 46 | 47 | settings.get('searchEngine', function (value) { 48 | if (typeof value === 'string') { 49 | // migrate from legacy format 50 | value = {name: value} 51 | settings.set('searchEngine', value) 52 | } 53 | 54 | if (value && value.name) { 55 | window.currentSearchEngine = searchEngines[value.name] 56 | } else if (value && value.url) { 57 | window.currentSearchEngine = { 58 | name: 'custom', 59 | searchURL: value.url, 60 | custom: true 61 | } 62 | } else { 63 | window.currentSearchEngine = searchEngines[defaultSearchEngine] 64 | } 65 | }) 66 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/remove-script-tags/source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Remove script tags test 6 | 7 | 8 | 9 |
10 |

Lorem

11 |
12 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 13 | tempor incididunt ut labore et dolore magna aliqua.

14 |

Ut enim ad minim veniam, 15 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 16 | consequat.

17 | 20 |

Duis aute irure dolor in reprehenderit in voluptate velit esse 21 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 22 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

23 |
24 | 27 |

Foo

28 |
29 |

Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 30 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 31 | consequat.

32 | 33 |

Duis aute irure dolor in reprehenderit in voluptate velit esse 34 | cillum dolore eu fugiat nulla pariatur. 35 | 38 | Excepteur sint occaecat cupidatat non 39 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

40 |
41 |
42 | 43 | 44 | -------------------------------------------------------------------------------- /ext/abp-filter-parser-modified/README.md: -------------------------------------------------------------------------------- 1 | # abp-filter-parser 2 | JavaScript Adblock Plus filter parser for lists like EasyList 3 | 4 | [![Build Status](https://travis-ci.org/bbondy/abp-filter-parser.svg?branch=master)](https://travis-ci.org/bbondy/abp-filter-parser) 5 | 6 | Parses filter rules as per: 7 | - https://adblockplus.org/en/filters 8 | - https://adblockplus.org/en/filter-cheatsheet 9 | 10 | ## Usage 11 | 12 | Babel / ES6: 13 | 14 | ```javascript 15 | import * as ABPFilterParser from 'abp-filter-parser.js'; 16 | ``` 17 | 18 | Node: 19 | 20 | ```javascript 21 | let ABPFilterParser = require('abp-filter-parser'); 22 | ``` 23 | 24 | ## Primary API: 25 | 26 | ```javascript 27 | let ABPFilterParser = require('abp-filter-parser'); 28 | var fs = require('fs'); 29 | 30 | let easyListTxt = fs.readFileSync('./test/data/easylist.txt', 'utf-8'); 31 | let parsedFilterData = {}; 32 | let urlToCheck = 'http://static.tumblr.com/dhqhfum/WgAn39721/cfh_header_banner_v2.jpg'; 33 | 34 | // This is the site who's URLs are being checked, not the domain of the URL being checked. 35 | let currentPageDomain = 'slashdot.org'; 36 | 37 | ABPFilterParser.parse(easyListTxt, parsedFilterData); 38 | // ABPFilterParser.parse(someOtherListOfFilters, parsedFilterData); 39 | 40 | if (ABPFilterParser.matches(parsedFilterData, urlToCheck, { 41 | domain: currentPageDomain, 42 | elementTypeMaskMap: ABPFilterParser.elementTypes.SCRIPT, 43 | })) { 44 | console.log('You should block this URL!'); 45 | } else { 46 | console.log('You should NOT block this URL!'); 47 | } 48 | ``` 49 | 50 | ## Secondary APIs 51 | 52 | You probably won't need these directly, they are used by the parimary API above. 53 | 54 | - parseDomains 55 | - parseOptions 56 | - parseHTMLFilter 57 | - parseFilter 58 | - matchesFilter 59 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/reordering-paragraphs/expected.html: -------------------------------------------------------------------------------- 1 |
2 |

Regarding item# 11111, under sufficiently extreme conditions, quarks may become deconfined and exist as free particles. In the course of asymptotic freedom, the strong interaction becomes weaker at higher temperatures. Eventually, color confinement would be lost and an extremely hot plasma of freely moving quarks and gluons would be formed. This theoretical phase of matter is called quark-gluon plasma.[81] The exact conditions needed to give rise to this state are unknown and have been the subject of a great deal of speculation and experimentation.

3 |

Regarding item# 22222, under sufficiently extreme conditions, quarks may become deconfined and exist as free particles. In the course of asymptotic freedom, the strong interaction becomes weaker at higher temperatures. Eventually, color confinement would be lost and an extremely hot plasma of freely moving quarks and gluons would be formed. This theoretical phase of matter is called quark-gluon plasma.[81] The exact conditions needed to give rise to this state are unknown and have been the subject of a great deal of speculation and experimentation.

4 |

Regarding item# 33333, under sufficiently extreme conditions, quarks may become deconfined and exist as free particles. In the course of asymptotic freedom, the strong interaction becomes weaker at higher temperatures. Eventually, color confinement would be lost and an extremely hot plasma of freely moving quarks and gluons would be formed. This theoretical phase of matter is called quark-gluon plasma.[81] The exact conditions needed to give rise to this state are unknown and have been the subject of a great deal of speculation and experimentation.

5 |
-------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/base-url/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

4 |

Links

5 |

link

6 |

link

7 |

link

8 |

link

9 |

link

10 |

link

11 |

link

12 |

link

13 |

Images

14 |

15 |

16 |

17 |

18 |

19 |

Foo

20 |

Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

21 |
22 |
23 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/base-url/source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Base URL test 6 | 7 | 8 |
9 |

Lorem

10 |
11 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 12 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 13 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 14 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 15 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 16 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 17 |
18 |

Links

19 |

link

20 |

link

21 |

link

22 |

link

23 |

link

24 |

link

25 |

link

26 |

link

27 |

Images

28 |

29 |

30 |

31 |

32 |

33 |

Foo

34 |
35 | Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 36 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 37 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 38 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 39 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 40 |
41 |
42 | 43 | 44 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/embedded-videos/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

4 |

Videos

5 |

At root

6 | 7 | 8 | 9 |

In a paragraph

10 |

11 | 12 |

13 |

In a div

14 |

15 | 16 |

17 |

Foo

18 |

Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

19 |
20 |
-------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/tmz-1/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 |

Lupita Nyong'o

5 |

$150K Pearl Oscar Dress ... STOLEN!!!!

6 |
7 | 2/26/2015 7:11 AM PST BY TMZ STAFF 8 |
9 |
10 |

EXCLUSIVE

11 |

0225-lupita-nyongo-getty-01Lupita Nyong'o's now-famous Oscar dress -- adorned in pearls -- was stolen right out of her hotel room ... TMZ has learned.

12 |

Law enforcement sources tell TMZ ... the dress was taken out of Lupita's room at The London West Hollywood. The dress is made of pearls ... 6,000 white Akoya pearls. It's valued at $150,000.

13 |

Our sources say Lupita told cops it was taken from her room sometime between 8 AM and 9 PM Wednesday ... while she was gone.  

14 |

We're told there is security footage that cops are looking at that could catch the culprit right in the act. 

15 |

update_graphic_red_bar12:00 PM PT -- Sheriff's deputies were at The London Thursday morning.  We know they were in the manager's office and we're told they have looked at security footage to determine if they can ID the culprit.

16 |

0226-SUB-london-hotel-swipe-tmz-02

17 | 18 |
19 |
20 |
-------------------------------------------------------------------------------- /js/userscripts.js: -------------------------------------------------------------------------------- 1 | /* implements userscript support */ 2 | 3 | var userScriptsEnabled = false 4 | var domainScriptMap = {} 5 | 6 | settings.get('userscriptsEnabled', function (value) { 7 | if (value === true) { 8 | userScriptsEnabled = true 9 | 10 | /* get a list of all the files */ 11 | 12 | var path = require('path') 13 | var scriptDir = path.join(remote.app.getPath('userData'), 'userscripts') 14 | 15 | fs.readdir(scriptDir, function (err, files) { 16 | if (err || files.length === 0) { 17 | return 18 | } 19 | 20 | // store the scripts in memory 21 | files.forEach(function (filename) { 22 | if (filename.endsWith('.js')) { 23 | fs.readFile(path.join(scriptDir, filename), 'utf-8', function (err, file) { 24 | if (err || !file) { 25 | return 26 | } 27 | 28 | var domain = filename.slice(0, -3) 29 | if (domain.startsWith('www.')) { 30 | domain = domain.slice(4) 31 | } 32 | if (!domain) { 33 | return 34 | } 35 | domainScriptMap[domain] = file 36 | }) 37 | } 38 | }) 39 | }) 40 | } 41 | }) 42 | 43 | /* listen for load events and execute the scripts 44 | this listener has to be attached immediately so that we can capture events for 45 | webviews that are created at startup 46 | */ 47 | 48 | webviews.bindEvent('dom-ready', function (e) { 49 | if (!userScriptsEnabled) { 50 | return 51 | } 52 | try { 53 | var domain = new URL(this.getAttribute('src')).hostname 54 | if (domain.startsWith('www.')) { 55 | domain = domain.slice(4) 56 | } 57 | // global script 58 | if (domainScriptMap.global) { 59 | this.executeJavaScript(domainScriptMap.global, false, null) 60 | } 61 | // domain-specific scripts 62 | if (domainScriptMap[domain]) { 63 | this.executeJavaScript(domainScriptMap[domain], false, null) 64 | } 65 | } catch(e) {} 66 | }) 67 | -------------------------------------------------------------------------------- /js/searchbar/searchbarAutocomplete.js: -------------------------------------------------------------------------------- 1 | var urlParser = require('util/urlParser.js') 2 | 3 | function autocomplete (input, strings) { 4 | // if there is text after the selection, we can never autocomplete 5 | if (input.selectionEnd !== input.value.length) { 6 | return { 7 | valid: false 8 | } 9 | } 10 | 11 | var text = input.value.substring(0, input.selectionStart) 12 | 13 | for (var i = 0; i < strings.length; i++) { 14 | // check if the item can be autocompleted 15 | if (strings[i].toLowerCase().indexOf(text.toLowerCase()) === 0) { 16 | input.value = strings[i] 17 | input.setSelectionRange(text.length, strings[i].length) 18 | 19 | return { 20 | valid: true, 21 | matchIndex: i 22 | } 23 | } 24 | } 25 | return { 26 | valid: false 27 | } 28 | } 29 | 30 | // autocompletes based on a result item 31 | // returns: 1 - the exact URL was autocompleted, 0 - the domain was autocompleted, -1: nothing was autocompleted 32 | function autocompleteURL (item, input) { 33 | var url = new URL(item.url) 34 | var hostname = url.hostname 35 | 36 | // the different variations of the URL we can autocomplete 37 | var possibleAutocompletions = [ 38 | // we start with the domain 39 | hostname, 40 | // if that doesn't match, try the hostname without the www instead. The regex requires a slash at the end, so we add one, run the regex, and then remove it 41 | (hostname + '/').replace(urlParser.startingWWWRegex, '$1').replace('/', ''), 42 | // then try the whole URL 43 | urlParser.prettyURL(item.url), 44 | // then try the URL with querystring 45 | urlParser.basicURL(item.url), 46 | // then just try the URL with protocol 47 | item.url 48 | ] 49 | 50 | var autocompleteResult = autocomplete(input, possibleAutocompletions) 51 | 52 | if (!autocompleteResult.valid) { 53 | return -1 54 | } else if (autocompleteResult.matchIndex < 2 && url.pathname !== '/') { 55 | return 0 56 | } else { 57 | return 1 58 | } 59 | } 60 | 61 | module.exports = {autocomplete, autocompleteURL} 62 | -------------------------------------------------------------------------------- /js/searchbar/searchSuggestionsPlugin.js: -------------------------------------------------------------------------------- 1 | var searchbar = require('searchbar/searchbar.js') 2 | var searchbarPlugins = require('searchbar/searchbarPlugins.js') 3 | var searchbarUtils = require('searchbar/searchbarUtils.js') 4 | 5 | var ddgAttribution = l('resultsFromDDG') 6 | 7 | function showSearchSuggestions (text, input, event, container) { 8 | // TODO support search suggestions for other search engines 9 | if (currentSearchEngine.name !== 'DuckDuckGo') { 10 | return 11 | } 12 | 13 | // if the search text is a custom bang, we should never show suggestions 14 | if (getCustomBang(text)) { 15 | empty(container) 16 | return 17 | } 18 | 19 | if (searchbarPlugins.getResultCount() > 3) { 20 | empty(container) 21 | return 22 | } 23 | 24 | fetch('https://ac.duckduckgo.com/ac/?t=min&q=' + encodeURIComponent(text), { 25 | cache: 'force-cache' 26 | }) 27 | .then(function (response) { 28 | return response.json() 29 | }) 30 | .then(function (results) { 31 | empty(container) 32 | 33 | if (results) { 34 | results.slice(0, 3).forEach(function (result) { 35 | var data = { 36 | title: result.phrase, 37 | classList: ['iadata-onfocus'] 38 | } 39 | 40 | if (urlParser.isURL(result.phrase) || urlParser.isURLMissingProtocol(result.phrase)) { // website suggestions 41 | data.icon = 'fa-globe' 42 | } else { // regular search results 43 | data.icon = 'fa-search' 44 | } 45 | 46 | var item = searchbarUtils.createItem(data) 47 | 48 | item.addEventListener('click', function (e) { 49 | searchbar.openURL(result.phrase, e) 50 | }) 51 | 52 | container.appendChild(item) 53 | }) 54 | } 55 | searchbarPlugins.addResults(results.length) 56 | }) 57 | } 58 | 59 | searchbarPlugins.register('searchSuggestions', { 60 | index: 4, 61 | trigger: function (text) { 62 | return !!text && (text.indexOf('!') !== 0 || text.trim().indexOf(' ') !== -1) && !tabs.get(tabs.getSelected()).private 63 | }, 64 | showResults: debounce(showSearchSuggestions, 150) 65 | }) 66 | -------------------------------------------------------------------------------- /ext/readability-master/benchmarks/benchmarks.js: -------------------------------------------------------------------------------- 1 | var getTestPages = require("../test/utils").getTestPages; 2 | 3 | var readability = require("../index.js"); 4 | var Readability = readability.Readability; 5 | var JSDOMParser = readability.JSDOMParser; 6 | 7 | var referenceTestPages = [ 8 | "002", 9 | "herald-sun-1", 10 | "lifehacker-working", 11 | "lifehacker-post-comment-load", 12 | "medium-1", 13 | "medium-2", 14 | "salon-1", 15 | "tmz-1", 16 | "wapo-1", 17 | "wapo-2", 18 | "webmd-1", 19 | ]; 20 | 21 | var testPages = getTestPages(); 22 | 23 | if (process.env.READABILITY_PERF_REFERENCE === "1") { 24 | testPages = testPages.filter(function(testPage) { 25 | return referenceTestPages.indexOf(testPage.dir) !== -1; 26 | }); 27 | } 28 | 29 | suite("JSDOMParser test page perf", function () { 30 | set("iterations", 1); 31 | set("type", "static"); 32 | 33 | testPages.forEach(function(testPage) { 34 | bench(testPage.dir + " document parse perf", function() { 35 | new JSDOMParser().parse(testPage.source); 36 | }); 37 | }); 38 | }); 39 | 40 | 41 | suite("Readability test page perf", function () { 42 | set("iterations", 1); 43 | set("type", "static"); 44 | 45 | var uri = { 46 | spec: "http://fakehost/test/page.html", 47 | host: "fakehost", 48 | prePath: "http://fakehost", 49 | scheme: "http", 50 | pathBase: "http://fakehost/test" 51 | }; 52 | testPages.forEach(function(testPage) { 53 | var doc = new JSDOMParser().parse(testPage.source); 54 | bench(testPage.dir + " readability perf", function() { 55 | new Readability(uri, doc).parse(); 56 | }); 57 | }); 58 | }); 59 | 60 | suite("isProbablyReaderable perf", function () { 61 | set("iterations", 1); 62 | set("type", "static"); 63 | 64 | var uri = { 65 | spec: "http://fakehost/test/page.html", 66 | host: "fakehost", 67 | prePath: "http://fakehost", 68 | scheme: "http", 69 | pathBase: "http://fakehost/test" 70 | }; 71 | testPages.forEach(function(testPage) { 72 | var doc = new JSDOMParser().parse(testPage.source); 73 | bench(testPage.dir + " readability perf", function() { 74 | new Readability(uri, doc).isProbablyReaderable(); 75 | }); 76 | }); 77 | }); 78 | -------------------------------------------------------------------------------- /js/util/settings.js: -------------------------------------------------------------------------------- 1 | /* 2 | gets and sets settings 3 | requires Dexie and util/database.js 4 | */ 5 | 6 | if (typeof db === 'undefined' && typeof require !== 'undefined') { 7 | var db = require('util/database.js') 8 | } 9 | 10 | var settings = { 11 | loaded: false, 12 | list: {}, 13 | onLoadCallbacks: [], 14 | get: function (key, cb, options) { 15 | var isCacheable = !options || options.fromCache !== false 16 | 17 | // get the setting from the cache if possible 18 | if (settings.loaded && isCacheable) { 19 | cb(settings.list[key]) 20 | 21 | // if the settings haven't loaded, wait until they have 22 | } else if (isCacheable) { 23 | settings.onLoadCallbacks.push({ 24 | key: key, 25 | cb: cb 26 | }) 27 | 28 | // the setting can't be cached, get it from the database 29 | } else { 30 | db.settings.where('key').equals(key).first(function (item) { 31 | if (item) { 32 | cb(item.value) 33 | } else { 34 | cb(null) 35 | } 36 | }) 37 | } 38 | }, 39 | set: function (key, value, cb) { 40 | db.settings.put({ 41 | key: key, 42 | value: value 43 | }).then(function () { 44 | settings.list[key] = value 45 | if (cb) { 46 | cb() 47 | } 48 | }) 49 | }, 50 | delete: function (key, cb) { 51 | db.settings.where('key').equals(key).delete() 52 | .then(function () { 53 | delete settings.list[key] 54 | if (cb) { 55 | cb() 56 | } 57 | }) 58 | }, 59 | load: function () { 60 | db.settings.each(function (setting) { 61 | settings.list[setting.key] = setting.value 62 | }).then(function () { 63 | settings.loaded = true 64 | 65 | settings.onLoadCallbacks.forEach(function (item) { 66 | item.cb(settings.list[item.key]) 67 | }) 68 | 69 | settings.onLoadCallbacks = [] 70 | }) 71 | }, 72 | onLoad: function (cb) { 73 | if (settings.loaded) { 74 | cb() 75 | } else { 76 | settings.onLoadCallbacks.push({ 77 | key: '', 78 | cb: cb 79 | }) 80 | } 81 | } 82 | } 83 | 84 | settings.load() 85 | 86 | if (typeof module !== 'undefined') { 87 | module.exports = settings 88 | } 89 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/embedded-videos/source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Embedded videos test 6 | 7 | 8 |
9 |

Lorem

10 |
11 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 12 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 13 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 14 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 15 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 16 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

17 |
18 |

Videos

19 |

At root

20 | 22 | 24 | 27 |

In a paragraph

28 |

30 |

In a div

31 |
33 |

Foo

34 |
35 | Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 36 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 37 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 38 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 39 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 40 |
41 |
42 | 43 | 44 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/reordering-paragraphs/source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |

Regarding item# 11111, under sufficiently extreme conditions, quarks may 8 | become deconfined and exist as free particles. In the course of asymptotic 9 | freedom, the strong interaction becomes weaker at higher temperatures. 10 | Eventually, color confinement would be lost and an extremely hot plasma 11 | of freely moving quarks and gluons would be formed. This theoretical phase 12 | of matter is called quark-gluon plasma.[81] The exact conditions needed 13 | to give rise to this state are unknown and have been the subject of a great 14 | deal of speculation and experimentation.

15 |

Regarding item# 22222, under sufficiently extreme conditions, quarks may 16 | become deconfined and exist as free particles. In the course of asymptotic 17 | freedom, the strong interaction becomes weaker at higher temperatures. 18 | Eventually, color confinement would be lost and an extremely hot plasma 19 | of freely moving quarks and gluons would be formed. This theoretical phase 20 | of matter is called quark-gluon plasma.[81] The exact conditions needed 21 | to give rise to this state are unknown and have been the subject of a great 22 | deal of speculation and experimentation.

23 |

Regarding item# 33333, under sufficiently extreme conditions, quarks may 24 | become deconfined and exist as free particles. In the course of asymptotic 25 | freedom, the strong interaction becomes weaker at higher temperatures. 26 | Eventually, color confinement would be lost and an extremely hot plasma 27 | of freely moving quarks and gluons would be formed. This theoretical phase 28 | of matter is called quark-gluon plasma.[81] The exact conditions needed 29 | to give rise to this state are unknown and have been the subject of a great 30 | deal of speculation and experimentation.

31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /js/windowsCaptionButtons.js: -------------------------------------------------------------------------------- 1 | var captionMinimise = 2 | document.querySelector('.windows-caption-buttons .caption-minimise, body.linux .titlebar-linux .caption-minimise') 3 | 4 | var captionMaximise = 5 | document.querySelector('.windows-caption-buttons .caption-maximise, body.linux .titlebar-linux .caption-maximise') 6 | 7 | var captionRestore = 8 | document.querySelector('.windows-caption-buttons .caption-restore, body.linux .titlebar-linux .caption-restore') 9 | 10 | var captionClose = 11 | document.querySelector('.windows-caption-buttons .caption-close, body.linux .titlebar-linux .caption-close') 12 | 13 | var windowIsMaximised = false 14 | var windowIsFullscreen = false 15 | 16 | if (navigator.platform === 'Win32') { 17 | captionMinimise.addEventListener('click', function (e) { 18 | remote.getCurrentWindow().minimize() 19 | }) 20 | 21 | captionMaximise.addEventListener('click', function (e) { 22 | remote.getCurrentWindow().maximize() 23 | }) 24 | 25 | captionRestore.addEventListener('click', function (e) { 26 | if (windowIsFullscreen) { 27 | remote.getCurrentWindow().setFullScreen(false) 28 | } else { 29 | remote.getCurrentWindow().restore() 30 | } 31 | }) 32 | 33 | captionClose.addEventListener('click', function (e) { 34 | remote.getCurrentWindow().close() 35 | }) 36 | 37 | if (windowIsMaximised || windowIsFullscreen) { 38 | captionMaximise.hidden = true 39 | captionRestore.hidden = false 40 | } else { 41 | captionMaximise.hidden = false 42 | captionRestore.hidden = true 43 | } 44 | 45 | ipc.on('maximize', function (e) { 46 | windowIsMaximised = true 47 | captionMaximise.hidden = true 48 | captionRestore.hidden = false 49 | }) 50 | ipc.on('unmaximize', function (e) { 51 | windowIsMaximised = false 52 | captionMaximise.hidden = false 53 | captionRestore.hidden = true 54 | }) 55 | ipc.on('enter-full-screen', function (e) { 56 | windowIsFullscreen = true 57 | captionMaximise.hidden = true 58 | captionRestore.hidden = false 59 | }) 60 | ipc.on('leave-full-screen', function (e) { 61 | windowIsFullscreen = false 62 | if (windowIsMaximised) { 63 | captionMaximise.hidden = true 64 | captionRestore.hidden = false 65 | } else { 66 | captionMaximise.hidden = false 67 | captionRestore.hidden = true 68 | } 69 | }) 70 | } 71 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/simplyfound-1/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

The Raspberry Pi Foundation started by a handful of volunteers in 2012 when they released the original Raspberry Pi 256MB Model B without knowing what to expect.  In a short four-year period they have grown to over sixty full-time employees and have shipped over eight million units to-date.  Raspberry Pi has achieved new heights by being shipped to the International Space Station for research and by being an affordable computing platforms used by teachers throughout the world.  "It has become the all-time best-selling computer in the UK".

4 |

Raspberry Pi 3 - A credit card sized PC that only costs $35 - Image: Raspberry Pi Foundation

5 |

Raspberry Pi Foundation is charity organization that pushes for a digital revolution with a mission to inspire kids to learn by creating computer-powered objects.  The foundation also helps teachers learn computing  skills through free training and readily available tutorials & example code for creating cool things such as music.

6 |

Raspberry Pi in educations - Image: Raspberry Pi Foundation

7 |

In celebration of their 4th year anniversary, the foundation has released Raspberry Pi 3 with the same price tag of $35 USD.  The 3rd revision features a 1.2GHz 64-bit quad-core ARM CPU with integrated Bluetooth 4.1 and 802.11n wireless LAN chipsets.  The ARM Cortex-A53 CPU along with other architectural enhancements making it the fastest Raspberry Pi to-date.  The 3rd revision is reportedly about 50-60% times faster than its predecessor Raspberry Pi 2 and about 10 times faster then the original Raspberry PI.

8 |

Raspberry Pi - Various Usage

9 |

Raspberry Pi 3 is now available via many online resellers.  At this time, you should use a recent 32-bit NOOBS or Raspbian image from their downloads page with a promise of a switch to a 64-bit version only if further investigation proves that there is indeed some value in moving to 64-bit mode.

10 |
11 |
-------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/social-buttons/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

4 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

5 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

6 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

7 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

8 |
9 |
-------------------------------------------------------------------------------- /localization/localizationHelpers.js: -------------------------------------------------------------------------------- 1 | /* provides helper functions for using localized strings */ 2 | 3 | /* 4 | translations are compiled into here by running "npm run build" in this format 5 | 6 | var languages = { 7 | en-US: {name: "English (United States), identifier: "en-US", translations: {...}} 8 | } 9 | 10 | */ 11 | 12 | function getCurrentLanguage () { 13 | // TODO add a setting to change the language to something other than the default 14 | 15 | var language = 'en-US' // default 16 | 17 | if (typeof navigator !== 'undefined') { // renderer process 18 | language = navigator.language 19 | } else if (typeof app !== 'undefined') { // main process 20 | language = app.getLocale() 21 | } else { 22 | // nothing worked, fall back to default 23 | } 24 | 25 | return language 26 | } 27 | 28 | var userLanguage = null 29 | 30 | function l (stringId) { 31 | if (!userLanguage) { 32 | userLanguage = getCurrentLanguage() 33 | } 34 | 35 | // get the translated string for the given ID 36 | 37 | // try to use the string for the user's language 38 | if (languages[userLanguage] && languages[userLanguage].translations[stringId]) { 39 | return languages[userLanguage].translations[stringId] 40 | } else { 41 | // fallback to en-US 42 | return languages['en-US'].translations[stringId] 43 | } 44 | } 45 | 46 | /* for static HTML pages 47 | insert a localized string into all elements with a [data-string] attribute 48 | set the correct attributes for all elements with a [data-label] attribute 49 | */ 50 | 51 | if (typeof document !== 'undefined') { 52 | document.querySelectorAll('[data-string]').forEach(function (el) { 53 | var str = l(el.getAttribute('data-string')) 54 | if (typeof str === 'string') { 55 | el.textContent = str 56 | } else if (str && str.unsafeHTML && el.hasAttribute('data-allowHTML')) { 57 | el.innerHTML = str.unsafeHTML 58 | } 59 | }) 60 | document.querySelectorAll('[data-label]').forEach(function (el) { 61 | var str = l(el.getAttribute('data-label')) 62 | if (typeof str === 'string') { 63 | el.setAttribute('title', str) 64 | el.setAttribute('aria-label', str) 65 | } else { 66 | throw new Error('invalid data-label value: ' + str) 67 | } 68 | }) 69 | } 70 | if (typeof window !== 'undefined') { 71 | window.l = l 72 | window.userLanguage = userLanguage 73 | window.getCurrentLanguage = getCurrentLanguage 74 | } 75 | -------------------------------------------------------------------------------- /js/searchbar/placeSuggestionsPlugin.js: -------------------------------------------------------------------------------- 1 | var searchbarPlugins = require('searchbar/searchbarPlugins.js') 2 | var searchbarUtils = require('searchbar/searchbarUtils.js') 3 | 4 | function showPlaceSuggestions (text, input, event, container) { 5 | // use the current tab's url for history suggestions, or the previous tab if the current tab is empty 6 | var url = tabs.get(tabs.getSelected()).url 7 | 8 | if (!url || url === 'about:blank') { 9 | var previousTab = tabs.getAtIndex(tabs.getIndex(tabs.getSelected()) - 1) 10 | if (previousTab) { 11 | url = previousTab.url 12 | } 13 | } 14 | 15 | bookmarks.getPlaceSuggestions(url, function (results) { 16 | empty(container) 17 | 18 | var tabList = tabs.get().map(function (tab) { 19 | return tab.url 20 | }) 21 | 22 | results = results.filter(function (item) { 23 | return tabList.indexOf(item.url) === -1 24 | }) 25 | 26 | results.slice(0, 4).forEach(function (result) { 27 | var item = searchbarUtils.createItem({ 28 | title: urlParser.prettyURL(result.url), 29 | secondaryText: searchbarUtils.getRealTitle(result.title), 30 | url: result.url, 31 | delete: function () { 32 | bookmarks.deleteHistory(result.url) 33 | } 34 | }) 35 | 36 | container.appendChild(item) 37 | }) 38 | }) 39 | } 40 | 41 | searchbarPlugins.register('placeSuggestions', { 42 | index: 1, 43 | trigger: function (text) { 44 | return !text 45 | }, 46 | showResults: showPlaceSuggestions 47 | }) 48 | 49 | // when we get keywords data from the page, we show those results in the searchbar 50 | 51 | webviews.bindIPC('keywordsData', function (webview, tabId, args) { 52 | var data = args[0] 53 | 54 | var itemsCt = 0 55 | var itemsShown = [] 56 | 57 | var container = searchbarPlugins.getContainer('searchSuggestions') 58 | 59 | data.entities.forEach(function (item, index) { 60 | // ignore one-word items, they're usually useless 61 | if (!/\s/g.test(item.trim())) { 62 | return 63 | } 64 | 65 | if (itemsCt >= 5 || itemsShown.indexOf(item.trim()) !== -1) { 66 | return 67 | } 68 | 69 | var div = searchbarUtils.createItem({ 70 | icon: 'fa-search', 71 | title: item, 72 | url: item, 73 | classList: ['iadata-onfocus'] 74 | }) 75 | 76 | container.appendChild(div) 77 | 78 | itemsCt++ 79 | itemsShown.push(item.trim()) 80 | }) 81 | }) 82 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/qq/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |

转播到腾讯微博

DeepMind新电脑已可利用记忆自学 人工智能迈上新台阶 6 |
7 |

TNW中文站 10月14日报道

8 |

谷歌(微博) 在2014年收购的人工智能公司DeepMind开发出一款能够用自己的记忆学习新知识并利用这些知识来回答问题的计算机。

9 |

这款产品具有极其重要的意义,因为这意味着未来的人工智能技术可能不需要人类来教它就能回答人类提出的问题。

10 |

DeepMind表示,这款名为DNC(可微神经计算机)的AI模型可以接受家谱和伦敦地铁网络地图这样的信息,还可以回答与那些数据结构中的不同项目之间的关系有关的复杂问题。

11 |

例如,它可以回答“从邦德街开始,沿着中央线坐一站,环线坐四站,然后转朱比利线坐两站,你会到达哪个站?”这样的问题。

12 |

DeepMind称,DNC还可以帮你规划从沼泽门到皮卡迪利广场的最佳路线。

13 |

同样,它还可以理解和回答某个大家族中的成员之间的关系这样的复杂问题,比如“张三的大舅是谁?”。

14 |

DNC建立在神经网络的概念之上,神经网络可以模拟人类思想活动的方式。这种AI技术很适合与机器习得配套使用。

15 |

DeepMind的AlphaGo AI能够打败围棋冠军也跟这些神经网络有很大关系。但是AlphaGo必须进行训练才行,开发人员向AlphaGo提供了历史对弈中的大约3000万记录。让人工智能技术具备通过记忆学习的能力,就可以让它独自完成更复杂的任务。

16 |

DeepMind希望DNC可以推动计算行业实现更多突破。DeepMind已将其研究结果发表在科学刊物《自然》(Nature)上。(编译/林靖东)

17 |

精彩视频推荐 18 |

19 |
20 |
21 |
22 |
23 |
24 |

转播到腾讯微博

25 |
26 |
27 |
28 |
29 |

【美国The Next Web作品的中文相关权益归腾讯公司独家所有。未经授权,不得转载、摘编等。】

30 |
31 |
32 |
33 | -------------------------------------------------------------------------------- /scripts/buildBrowser.js: -------------------------------------------------------------------------------- 1 | const browserify = require('browserify') 2 | const renderify = require('electron-renderify') 3 | const path = require('path') 4 | const fs = require('fs') 5 | 6 | const rootDir = path.resolve(__dirname, '../js') 7 | 8 | const intermediateOutput = path.resolve(__dirname, '../dist/build.js') 9 | const outFile = path.resolve(__dirname, '../dist/bundle.js') 10 | 11 | /* avoid adding modules to this list, require() them from the correct place instead */ 12 | const legacyModules = [ 13 | 'dist/localization.build.js', 14 | 'js/default.js', 15 | 'js/windowsCaptionButtons.js', 16 | 'js/util/database.js', 17 | 'js/util/defaultKeyMap.js', 18 | 'js/util/settings.js', 19 | 'js/util/searchEngine.js', 20 | 'js/tabState.js', 21 | 'js/util/urlParser.js', 22 | 'js/filteringRenderer.js', 23 | 'js/webviews.js', 24 | 'js/phishingWarning.js', 25 | 'js/webviewMenu.js', 26 | 'js/bookmarksHistory/bookmarksHistory.js', 27 | 'js/searchbar/placesPlugin.js', 28 | 'js/searchbar/instantAnswerPlugin.js', 29 | 'js/searchbar/openTabsPlugin.js', 30 | 'js/searchbar/bangsPlugin.js', 31 | 'js/searchbar/customBangs.js', 32 | 'js/searchbar/searchSuggestionsPlugin.js', 33 | 'js/searchbar/placeSuggestionsPlugin.js', 34 | 'js/searchbar/hostsSuggestionsPlugin.js', 35 | 'js/readerview.js', 36 | 'js/navbar/tabColor.js', 37 | 'js/navbar/tabBar.js', 38 | 'js/taskOverlay/taskOverlay.js', 39 | 'js/taskOverlay/taskOverlayBuilder.js', 40 | 'js/navbar/addTabButton.js', 41 | 'js/navbar/goBackButton.js', 42 | 'js/navbar/menuButton.js', 43 | 'js/keybindings.js', 44 | 'js/pdfViewer.js', 45 | 'js/findinpage.js', 46 | 'js/userscripts.js', 47 | 'js/sessionRestore.js', 48 | 'js/tabRestore.js', 49 | 'js/util/theme.js', 50 | 'js/webviewGestures.js' 51 | ] 52 | 53 | function buildBrowser () { 54 | 55 | // build localization support first, since it is included in the browser bundle 56 | require('./buildLocalization.js')() 57 | 58 | /* concatenate legacy modules */ 59 | let output = '' 60 | legacyModules.forEach(function (script) { 61 | output += fs.readFileSync(path.resolve(__dirname, '../', script)) + ';\n' 62 | }) 63 | 64 | fs.writeFileSync(intermediateOutput, output, 'utf-8') 65 | 66 | let instance = browserify(intermediateOutput, { 67 | paths: [rootDir], 68 | ignoreMissing: false, 69 | node: true, 70 | detectGlobals: false 71 | }) 72 | 73 | instance.transform(renderify) 74 | let stream = fs.createWriteStream(outFile, {encoding: 'utf-8'}) 75 | instance.bundle() 76 | .on('error', function (e) { 77 | console.warn('\x1b[31m' + 'Error while building: ' + e.message + '\x1b[30m') 78 | }) 79 | .pipe(stream) 80 | } 81 | 82 | if (module.parent) { 83 | module.exports = buildBrowser 84 | } else { 85 | buildBrowser() 86 | } 87 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/missing-paragraphs/expected.html: -------------------------------------------------------------------------------- 1 |
2 |

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

3 |

Secondary header

4 |

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

5 |

Secondary header

6 |

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

7 |
-------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/heise/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |

1Password scannt auch QR-Codes.

6 |

(Bild: Hersteller)

7 |
8 |
9 |

Das in der iOS-Version bereits enthaltene TOTP-Feature ist nun auch für OS X 10.10 verfügbar. Zudem gibt es neue Zusatzfelder in der Datenbank und weitere Verbesserungen.

10 |

AgileBits hat Version 5.3 seines bekannten Passwortmanagers 1Password für OS X freigegeben. Mit dem Update wird eine praktische Funktion nachgereicht, die die iOS-Version der Anwendung bereits seit längerem beherrscht: Das direkte Erstellen von Einmal-Passwörtern. Unterstützt wird dabei der TOTP-Standard (Time-Based One-Time Passwords), den unter anderem Firmen wie Evernote, Dropbox oder Google einsetzen, um ihre Zugänge besser abzusichern. Neben Account und regulärem Passwort wird dabei dann ein Zusatzcode verlangt, der nur kurze Zeit gilt.

11 |

Zur TOTP-Nutzung muss zunächst ein Startwert an 1Password übergeben werden. Das geht unter anderem per QR-Code, den die App über ein neues Scanfenster selbst einlesen kann – etwa aus dem Webbrowser. Eine Einführung in die Technik gibt ein kurzes Video. Die TOTP-Unterstützung in 1Password erlaubt es, auf ein zusätzliches Gerät (z.B. ein iPhone) neben dem Mac zu verzichten, das den Code liefert – was allerdings auch die Sicherheit verringert, weil es keinen "echten" zweiten Faktor mehr gibt.

12 |

Update 5.3 des Passwortmanagers liefert auch noch weitere Verbesserungen. So gibt es die Möglichkeit, FaceTime-Audio- oder Skype-Anrufe aus 1Password zu starten, die Zahl der Zusatzfelder in der Datenbank wurde erweitert und der Umgang mit unterschiedlichen Zeitzonen klappt besser. Die Engine zur Passworteingabe im Browser soll beschleunigt worden sein.

13 |

1Password kostet aktuell knapp 50 Euro im Mac App Store und setzt in seiner aktuellen Version mindestens OS X 10.10 voraus. (bsc) 14 |

15 |
16 |
-------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/svg-parsing/expected.html: -------------------------------------------------------------------------------- 1 |
2 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

3 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

15 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

16 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

17 |
18 | -------------------------------------------------------------------------------- /js/searchbar/openTabsPlugin.js: -------------------------------------------------------------------------------- 1 | var browserUI = require('api-wrapper.js') 2 | var searchbarPlugins = require('searchbar/searchbarPlugins.js') 3 | var searchbarUtils = require('searchbar/searchbarUtils.js') 4 | 5 | var stringScore = require('string_score') 6 | 7 | var searchOpenTabs = function (text, input, event, container) { 8 | empty(container) 9 | 10 | var matches = [] 11 | var searchText = text.toLowerCase() 12 | var currentTab = currentTask.tabs.getSelected() 13 | 14 | tasks.get().forEach(function (task) { 15 | task.tabs.get().forEach(function (tab) { 16 | if (tab.id === currentTab || !tab.title || tab.url === 'about:blank') { 17 | return 18 | } 19 | 20 | var tabUrl = urlParser.basicURL(tab.url) // don't search protocols 21 | 22 | var exactMatch = tab.title.toLowerCase().indexOf(searchText) !== -1 || tabUrl.toLowerCase().indexOf(searchText) !== -1 23 | var fuzzyTitleScore = tab.title.substring(0, 50).score(text, 0.5) 24 | var fuzzyUrlScore = tabUrl.score(text, 0.5) 25 | 26 | if (exactMatch || fuzzyTitleScore > 0.4 || fuzzyUrlScore > 0.4) { 27 | matches.push({ 28 | task: task, 29 | tab: tab, 30 | score: fuzzyTitleScore + fuzzyUrlScore 31 | }) 32 | } 33 | }) 34 | }) 35 | 36 | if (matches.length === 0) { 37 | return 38 | } 39 | 40 | var finalMatches = matches.sort(function (a, b) { 41 | if (a.task.id === currentTask.id) { 42 | a.score += 0.2 43 | } 44 | if (b.task.id === currentTask.id) { 45 | b.score += 0.2 46 | } 47 | return b.score - a.score 48 | }).slice(0, 2) 49 | 50 | finalMatches.forEach(function (match) { 51 | var data = { 52 | icon: 'fa-external-link-square', 53 | title: match.tab.title, 54 | secondaryText: urlParser.basicURL(match.tab.url) 55 | } 56 | 57 | if (match.task.id !== currentTask.id) { 58 | var taskName = match.task.name || l('taskN').replace('%n', (tasks.getIndex(match.task.id) + 1)) 59 | data.metadata = [taskName] 60 | } 61 | 62 | var item = searchbarUtils.createItem(data) 63 | 64 | item.addEventListener('click', function () { 65 | // if we created a new tab but are switching away from it, destroy the current (empty) tab 66 | var currentTabUrl = tabs.get(tabs.getSelected()).url 67 | if (!currentTabUrl || currentTabUrl === 'about:blank') { 68 | browserUI.closeTab(tabs.getSelected()) 69 | } 70 | 71 | if (match.task.id !== currentTask.id) { 72 | browserUI.switchToTask(match.task.id) 73 | } 74 | 75 | browserUI.switchToTab(match.tab.id) 76 | }) 77 | 78 | container.appendChild(item) 79 | }) 80 | 81 | searchbarPlugins.addResults(finalMatches.length) 82 | } 83 | 84 | searchbarPlugins.register('openTabs', { 85 | index: 4, 86 | trigger: function (text) { 87 | return text.length > 2 88 | }, 89 | showResults: searchOpenTabs 90 | }) 91 | -------------------------------------------------------------------------------- /js/pdfViewer.js: -------------------------------------------------------------------------------- 1 | /* handles viewing pdf files using pdf.js. Recieves events from main.js will-download */ 2 | 3 | var browserUI = require('api-wrapper.js') 4 | 5 | var PDFViewer = { 6 | url: { 7 | base: 'file://' + __dirname + '/pages/pdfViewer/index.html', 8 | queryString: '?url=%l' 9 | }, 10 | isPDFViewer: function (tabId) { 11 | return tabs.get(tabId).url.startsWith(PDFViewer.url.base) 12 | }, 13 | printPDF: function (viewerTabId) { 14 | if (!PDFViewer.isPDFViewer(viewerTabId)) { 15 | throw new Error("attempting to print in a tab that isn't a PDF viewer") 16 | } 17 | 18 | webviews.get(viewerTabId).executeJavaScript('parentProcessActions.printPDF()', false) 19 | }, 20 | savePDF: function (viewerTabId) { 21 | if (!PDFViewer.isPDFViewer(viewerTabId)) { 22 | throw new Error("attempting to save in a tab that isn't a PDF viewer") 23 | } 24 | 25 | webviews.get(viewerTabId).executeJavaScript('parentProcessActions.downloadPDF()', false) 26 | }, 27 | startFindInPage: function (viewerTabId) { 28 | if (!PDFViewer.isPDFViewer(viewerTabId)) { 29 | throw new Error("attempting to call startFindInPage in a tab that isn't a PDF viewer") 30 | } 31 | 32 | webviews.get(viewerTabId).executeJavaScript('parentProcessActions.startFindInPage()', false) 33 | }, 34 | endFindInPage: function (viewerTabId) { 35 | if (!PDFViewer.isPDFViewer(viewerTabId)) { 36 | throw new Error("attempting to call endFindInPage in a tab that isn't a PDF viewer") 37 | } 38 | 39 | webviews.get(viewerTabId).executeJavaScript('parentProcessActions.endFindInPage()', false) 40 | }, 41 | handlePDFOpenEvent: function (event, data) { 42 | var PDFurl = PDFViewer.url.base + PDFViewer.url.queryString.replace('%l', encodeURIComponent(data.url)) 43 | 44 | // we don't know which tab the event came from, so we loop through each tab to find out. 45 | 46 | tabs.get().forEach(function (tab) { 47 | var webview = webviews.get(tab.id) 48 | if (webview && webview.id === data.webContentsId) { 49 | browserUI.navigate(tab.id, PDFurl) 50 | } 51 | }) 52 | } 53 | } 54 | 55 | ipc.on('openPDF', PDFViewer.handlePDFOpenEvent) 56 | 57 | /* 58 | migrate legacy bookmarked PDFs to the new viewer URL 59 | TODO remove this in a future version 60 | */ 61 | 62 | var legacyPDFViewerURL = 'file://' + __dirname + '/pdfjs/web/viewer.html?url=' 63 | 64 | db.transaction('rw', db.places, function () { 65 | db.places.where('url').startsWith(legacyPDFViewerURL).each(function (item) { 66 | var oldItemURL = item.url 67 | 68 | var pdfBaseURL = oldItemURL.replace(legacyPDFViewerURL, '') 69 | var newViewerURL = PDFViewer.url.base + PDFViewer.url.queryString.replace('%l', encodeURIComponent(pdfBaseURL)) 70 | 71 | item.url = newViewerURL 72 | 73 | db.places.put(item).then(function () { 74 | db.places.where('url').equals(oldItemURL).delete() 75 | }) 76 | }) 77 | }) 78 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/svg-parsing/source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SVG parsing 5 | 6 | 7 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 8 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 9 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 10 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 11 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 12 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

13 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 14 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 15 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 16 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 17 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 18 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

19 | 20 | 21 | 22 | 23 | 24 | 25 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 26 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 27 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 28 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 29 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 30 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

31 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 32 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 33 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 34 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 35 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 36 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

37 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 38 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 39 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 40 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 41 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 42 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

43 | 44 | 45 | -------------------------------------------------------------------------------- /main/filtering.js: -------------------------------------------------------------------------------- 1 | var thingsToFilter = { 2 | trackers: false, 3 | contentTypes: [] // script, image 4 | } 5 | 6 | var filterContentTypes = thingsToFilter.contentTypes.length !== 0 7 | 8 | var parser = require('./ext/abp-filter-parser-modified/abp-filter-parser.js') 9 | var parsedFilterData = {} 10 | 11 | function initFilterList () { 12 | var data = require('fs').readFile(__dirname + '/ext/filterLists/easylist+easyprivacy-noelementhiding.txt', 'utf8', function (err, data) { 13 | if (err) { 14 | return 15 | } 16 | 17 | // data = data.replace(/.*##.+\n/g, '') // remove element hiding rules 18 | 19 | parser.parse(data, parsedFilterData) 20 | }) 21 | } 22 | 23 | function handleRequest (details, callback) { 24 | if (!(details.url.startsWith('http://') || details.url.startsWith('https://')) || details.resourceType === 'mainFrame') { 25 | callback({ 26 | cancel: false, 27 | requestHeaders: details.requestHeaders 28 | }) 29 | return 30 | } 31 | 32 | // block javascript and images if needed 33 | 34 | if (filterContentTypes) { 35 | for (var i = 0; i < thingsToFilter.contentTypes.length; i++) { 36 | if (details.resourceType === thingsToFilter.contentTypes[i]) { 37 | callback({ 38 | cancel: true, 39 | requestHeaders: details.requestHeaders 40 | }) 41 | return 42 | } 43 | } 44 | } 45 | 46 | if (details.webContentsId) { 47 | var domain = parser.getUrlHost(webContents.fromId(details.webContentsId).getURL()) 48 | } else { 49 | var domain = undefined 50 | } 51 | 52 | if (thingsToFilter.trackers) { 53 | if (parser.matches(parsedFilterData, details.url, { 54 | domain: domain, 55 | elementType: details.resourceType 56 | })) { 57 | callback({ 58 | cancel: true, 59 | requestHeaders: details.requestHeaders 60 | }) 61 | return 62 | } 63 | } 64 | 65 | callback({ 66 | cancel: false, 67 | requestHeaders: details.requestHeaders 68 | }) 69 | } 70 | 71 | function setFilteringSettings (settings) { 72 | if (!settings) { 73 | settings = {} 74 | } 75 | 76 | if (settings.trackers && !thingsToFilter.trackers) { // we're enabling tracker filtering 77 | initFilterList() 78 | } 79 | 80 | thingsToFilter.contentTypes = settings.contentTypes || [] 81 | thingsToFilter.trackers = settings.trackers || false 82 | 83 | filterContentTypes = thingsToFilter.contentTypes.length !== 0 84 | } 85 | 86 | function registerFiltering (ses) { 87 | if (ses) { 88 | ses = session.fromPartition(ses) 89 | } else { 90 | ses = session.defaultSession 91 | } 92 | 93 | ses.webRequest.onBeforeRequest(handleRequest) 94 | } 95 | 96 | ipc.on('setFilteringSettings', function (e, settings) { 97 | setFilteringSettings(settings) 98 | }) 99 | 100 | ipc.on('registerFiltering', function (e, ses) { 101 | registerFiltering(ses) 102 | }) 103 | -------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/liberation-1/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |

Un troisième Français a été tué dans le tremblement de terre samedi au Népal, emporté par une avalanche, a déclaré jeudi le ministre des Affaires étrangères. Les autorités françaises sont toujours sans nouvelles «d’encore plus de 200» personnes. «Pour certains d’entre eux on est très interrogatif», a ajouté Laurent Fabius. Il accueillait à Roissy un premier avion spécial ramenant des rescapés. L’Airbus A350 affrété par les autorités françaises s’est posé peu avant 5h45 avec à son bord 206 passagers, dont 12 enfants et 26 blessés, selon une source du Quai d’Orsay. Quasiment tous sont français, à l’exception d’une quinzaine de ressortissants allemands, suisses, italiens, portugais ou encore turcs. Des psychologues, une équipe médicale et des personnels du centre de crise du Quai d’Orsay les attendent.

7 |

L’appareil, mis à disposition par Airbus, était arrivé à Katmandou mercredi matin avec 55 personnels de santé et humanitaires, ainsi que 25 tonnes de matériel (abris, médicaments, aide alimentaire). Un deuxième avion dépêché par Paris, qui était immobilisé aux Emirats depuis mardi avec 20 tonnes de matériel, est arrivé jeudi à Katmandou, dont le petit aéroport est engorgé par le trafic et l’afflux d’aide humanitaire. Il devait lui aussi ramener des Français, «les plus éprouvés» par la catastrophe et les «plus vulnérables (blessés, familles avec enfants)», selon le ministère des Affaires étrangères.

8 |

2 209 Français ont été localisés sains et saufs tandis que 393 n’ont pas encore pu être joints, selon le Quai d’Orsay. Environ 400 Français ont demandé à être rapatriés dans les vols mis en place par la France.

9 |

Le séisme a fait près de 5 500 morts et touche huit des 28 millions d’habitants du Népal. Des dizaines de milliers de personnes sont sans abri.

10 |

11 | 12 |

13 |
14 |
15 |
16 |
17 |
-------------------------------------------------------------------------------- /ext/readability-master/test/test-pages/webmd-1/expected.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Feb. 23, 2015 -- Life-threatening peanut allergies have mysteriously been on the rise in the past decade, with little hope for a cure.

4 |

But a groundbreaking new study may offer a way to stem that rise, while another may offer some hope for those who are already allergic.

5 |

Parents have been told for years to avoid giving foods containing peanuts to babies for fear of triggering an allergy. Now research shows the opposite is true: Feeding babies snacks made with peanuts before their first birthday appears to prevent that from happening.

6 |

The study is published in the New England Journal of Medicine, and it was presented at the annual meeting of the American Academy of Allergy, Asthma and Immunology in Houston. It found that among children at high risk for getting peanut allergies, eating peanut snacks by 11 months of age and continuing to eat them at least three times a week until age 5 cut their chances of becoming allergic by more than 80% compared to kids who avoided peanuts. Those at high risk were already allergic to egg, they had the skin condition eczema, or both.

7 |

Overall, about 3% of kids who ate peanut butter or peanut snacks before their first birthday got an allergy, compared to about 17% of kids who didn’t eat them.

8 |

“I think this study is an astounding and groundbreaking study, really,” says Katie Allen, MD, PhD. She's the director of the Center for Food and Allergy Research at the Murdoch Children’s Research Institute in Melbourne, Australia. Allen was not involved in the research.

9 |

Experts say the research should shift thinking about how kids develop food allergies, and it should change the guidance doctors give to parents.

10 |

Meanwhile, for children and adults who are already allergic to peanuts, another study presented at the same meeting held out hope of a treatment.

11 |

A new skin patch called Viaskin allowed people with peanut allergies to eat tiny amounts of peanuts after they wore it for a year.

12 | 13 |

A Change in Guidelines?

14 |

Allergies to peanuts and other foods are on the rise. In the U.S., more than 2% of people react to peanuts, a 400% increase since 1997. And reactions to peanuts and other tree nuts can be especially severe. Nuts are the main reason people get a life-threatening problem called anaphylaxis.

15 |
16 |
-------------------------------------------------------------------------------- /js/searchbar/searchbarPlugins.js: -------------------------------------------------------------------------------- 1 | var searchbar = document.getElementById('searchbar') 2 | 3 | var searchbarPlugins = [] // format is {name, container, trigger, showResults} 4 | var URLHandlers = [] // format is {trigger, action} 5 | var resultCount = 0 6 | var topAnswerArea = searchbar.querySelector('.top-answer-area') 7 | 8 | // empties all containers in the searchbar 9 | function clearAll () { 10 | empty(topAnswerArea) 11 | for (var i = 0; i < searchbarPlugins.length; i++) { 12 | empty(searchbarPlugins[i].container) 13 | } 14 | } 15 | 16 | function getTopAnswer (pluginName) { 17 | if (pluginName) { 18 | // TODO a template string would be useful here, but UglifyJS doesn't support them yet 19 | return topAnswerArea.querySelector('[data-plugin={plugin}]'.replace('{plugin}', pluginName)) 20 | } else { 21 | return topAnswerArea.firstChild 22 | } 23 | } 24 | 25 | function setTopAnswer (pluginName, item) { 26 | empty(topAnswerArea) 27 | if (item) { 28 | item.setAttribute('data-plugin', pluginName) 29 | topAnswerArea.appendChild(item) 30 | } 31 | } 32 | 33 | function getContainer (pluginName) { 34 | for (var i = 0; i < searchbarPlugins.length; i++) { 35 | if (searchbarPlugins[i].name === pluginName) { 36 | return searchbarPlugins[i].container 37 | } 38 | } 39 | return null 40 | } 41 | 42 | function register (name, object) { 43 | // add the container 44 | var container = document.createElement('div') 45 | container.classList.add('searchbar-plugin-container') 46 | container.setAttribute('data-plugin', name) 47 | searchbar.insertBefore(container, searchbar.childNodes[object.index + 1]) 48 | 49 | searchbarPlugins.push({ 50 | name: name, 51 | container: container, 52 | trigger: object.trigger, 53 | showResults: object.showResults 54 | }) 55 | } 56 | 57 | function run (text, input, event) { 58 | resultCount = 0 59 | 60 | for (var i = 0; i < searchbarPlugins.length; i++) { 61 | if ( (!searchbarPlugins[i].trigger || searchbarPlugins[i].trigger(text))) { 62 | searchbarPlugins[i].showResults(text, input, event, searchbarPlugins[i].container) 63 | } else { 64 | empty(searchbarPlugins[i].container) 65 | 66 | // if the plugin is not triggered, remove a previously created top answer 67 | var associatedTopAnswer = getTopAnswer(searchbarPlugins[i].name) 68 | 69 | if (associatedTopAnswer) { 70 | associatedTopAnswer.remove() 71 | } 72 | } 73 | } 74 | } 75 | 76 | function registerURLHandler (object) { 77 | URLHandlers.push({ 78 | trigger: object.trigger, 79 | action: object.action 80 | }) 81 | } 82 | 83 | function runURLHandlers (text) { 84 | for (var i = 0; i < URLHandlers.length; i++) { 85 | if (URLHandlers[i].trigger(text)) { 86 | URLHandlers[i].action(text) 87 | return true 88 | } 89 | } 90 | return false 91 | } 92 | 93 | function getResultCount () { 94 | return resultCount 95 | } 96 | 97 | function addResults (ct) { 98 | resultCount += ct 99 | } 100 | 101 | module.exports = {clearAll, getTopAnswer, setTopAnswer, getContainer, register, run, registerURLHandler, runURLHandlers, getResultCount, addResults} 102 | -------------------------------------------------------------------------------- /main/viewManager.js: -------------------------------------------------------------------------------- 1 | var viewMap = {} // id: view 2 | 3 | function createView (id, webPreferencesString, boundsString, events) { 4 | let view = new electron.BrowserView(JSON.parse(webPreferencesString)) 5 | 6 | events.forEach(function (ev) { 7 | view.webContents.on(ev.event, function (e) { 8 | if (ev.options && ev.options.preventDefault) { 9 | e.preventDefault() 10 | } 11 | mainWindow.webContents.send('view-event', { 12 | id: id, 13 | name: ev.event, 14 | args: Array.prototype.slice.call(arguments).slice(1) 15 | }) 16 | }) 17 | }) 18 | 19 | view.webContents.on('ipc-message', function (e, data) { 20 | mainWindow.webContents.send('view-ipc', { 21 | id: id, 22 | name: data[0], 23 | data: data[1] 24 | }) 25 | }) 26 | 27 | view.setBounds(JSON.parse(boundsString)) 28 | 29 | viewMap[id] = view 30 | 31 | return view 32 | } 33 | 34 | function destroyView (id) { 35 | // destroy an associated partition 36 | 37 | var partition = viewMap[id].webContents.getWebPreferences().partition 38 | if (partition) { 39 | session.fromPartition(partition).destroy() 40 | } 41 | if (viewMap[id] === mainWindow.getBrowserView()) { 42 | mainWindow.setBrowserView(null) 43 | } 44 | viewMap[id].destroy() 45 | delete viewMap[id] 46 | } 47 | 48 | function setView (id) { 49 | mainWindow.setBrowserView(viewMap[id]) 50 | } 51 | 52 | function setBounds (id, bounds) { 53 | viewMap[id].setBounds(bounds) 54 | } 55 | 56 | function focusView (id) { 57 | viewMap[id].webContents.focus() 58 | } 59 | 60 | function hideCurrentView () { 61 | var view = mainWindow.getBrowserView() 62 | if (view) { 63 | view.setBounds({x: 0, y: 0, width: 0, height: 0}) 64 | } 65 | mainWindow.webContents.focus() 66 | } 67 | 68 | function getView (id) { 69 | return viewMap[id] 70 | } 71 | 72 | ipc.on('createView', function (e, args) { 73 | createView(args.id, args.webPreferencesString, args.boundsString, args.events) 74 | }) 75 | 76 | ipc.on('destroyView', function (e, id) { 77 | destroyView(id) 78 | }) 79 | 80 | ipc.on('setView', function (e, args) { 81 | setView(args.id) 82 | setBounds(args.id, args.bounds) 83 | if (args.focus) { 84 | focusView(args.id) 85 | } 86 | }) 87 | 88 | ipc.on('setBounds', function (e, args) { 89 | setBounds(args.id, args.bounds) 90 | }) 91 | 92 | ipc.on('focusView', function (e, id) { 93 | focusView(id) 94 | }) 95 | 96 | ipc.on('hideCurrentView', function (e) { 97 | hideCurrentView() 98 | }) 99 | 100 | ipc.on('callViewMethod', function (e, data) { 101 | var webContents = viewMap[data.id].webContents 102 | var result = webContents[data.method].apply(webContents, data.args) 103 | if (data.callId) { 104 | mainWindow.webContents.send('async-call-result', {callId: data.callId, data: result}) 105 | } 106 | }) 107 | 108 | ipc.on('getCapture', function (e, data) { 109 | viewMap[data.id].webContents.capturePage(function (img) { 110 | var size = img.getSize() 111 | if (size.width === 0 && size.height === 0) { 112 | return 113 | } 114 | img = img.resize({width: data.width, height: data.height}) 115 | mainWindow.webContents.send('captureData', {id: data.id, url: img.toDataURL()}) 116 | }) 117 | }) 118 | 119 | global.getView = getView 120 | -------------------------------------------------------------------------------- /js/default.js: -------------------------------------------------------------------------------- 1 | window.electron = require('electron') 2 | window.fs = require('fs') 3 | window.ipc = electron.ipcRenderer 4 | window.remote = electron.remote 5 | window.Dexie = require('dexie') 6 | 7 | window.webFrame = window.electron.webFrame 8 | window.webFrame.setVisualZoomLevelLimits(1, 1) 9 | window.webFrame.setLayoutZoomLevelLimits(0, 0) 10 | 11 | require('menuBarVisibility.js').initialize() 12 | require('navbar/tabActivity.js').init() 13 | 14 | // add a class to the body for fullscreen status 15 | 16 | ipc.on('enter-full-screen', function () { 17 | document.body.classList.add('fullscreen') 18 | }) 19 | 20 | ipc.on('leave-full-screen', function () { 21 | document.body.classList.remove('fullscreen') 22 | }) 23 | 24 | if (navigator.platform === 'MacIntel') { 25 | document.body.classList.add('mac') 26 | window.platformType = 'mac' 27 | } else if (navigator.platform === 'Win32') { 28 | document.body.classList.add('windows') 29 | window.platformType = 'windows' 30 | } else { 31 | document.body.classList.add('linux') 32 | window.platformType = 'linux' 33 | } 34 | 35 | // https://remysharp.com/2010/07/21/throttling-function-calls 36 | 37 | function throttle (fn, threshhold, scope) { 38 | threshhold || (threshhold = 250) 39 | var last, 40 | deferTimer 41 | return function () { 42 | var context = scope || this 43 | 44 | var now = new Date() 45 | var args = arguments 46 | if (last && now < last + threshhold) { 47 | // hold on to it 48 | clearTimeout(deferTimer) 49 | deferTimer = setTimeout(function () { 50 | last = now 51 | fn.apply(context, args) 52 | }, threshhold) 53 | } else { 54 | last = now 55 | fn.apply(context, args) 56 | } 57 | } 58 | } 59 | 60 | // https://remysharp.com/2010/07/21/throttling-function-calls 61 | 62 | function debounce (fn, delay) { 63 | var timer = null 64 | return function () { 65 | var context = this 66 | var args = arguments 67 | clearTimeout(timer) 68 | timer = setTimeout(function () { 69 | fn.apply(context, args) 70 | }, delay) 71 | } 72 | } 73 | 74 | window.empty = function (node) { 75 | var n 76 | while (n = node.firstElementChild) { 77 | node.removeChild(n) 78 | } 79 | } 80 | 81 | /* prevent a click event from firing after dragging the window */ 82 | 83 | window.addEventListener('load', function () { 84 | var isMouseDown = false 85 | var isDragging = false 86 | var distance = 0 87 | 88 | document.body.addEventListener('mousedown', function () { 89 | isMouseDown = true 90 | isDragging = false 91 | distance = 0 92 | }) 93 | 94 | document.body.addEventListener('mouseup', function () { 95 | isMouseDown = false 96 | }) 97 | 98 | var dragHandles = document.getElementsByClassName('windowDragHandle') 99 | 100 | for (var i = 0; i < dragHandles.length; i++) { 101 | dragHandles[i].addEventListener('mousemove', function (e) { 102 | if (isMouseDown) { 103 | isDragging = true 104 | distance += Math.abs(e.movementX) + Math.abs(e.movementY) 105 | } 106 | }) 107 | } 108 | 109 | document.body.addEventListener('click', function (e) { 110 | if (isDragging && distance >= 10.0) { 111 | e.stopImmediatePropagation() 112 | isDragging = false 113 | } 114 | }, true) 115 | }) 116 | --------------------------------------------------------------------------------