File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ const Browser = Module("browser", {
178
178
if ( path ) {
179
179
if ( path = getParentPath ( path ) )
180
180
parent = scheme + host + "/" + path ;
181
- else
181
+ else
182
182
parent = scheme + host + "/" ;
183
183
}
184
184
else {
@@ -207,6 +207,16 @@ const Browser = Module("browser", {
207
207
liberator . assert ( ! / ( a b o u t | m a i l t o ) : / . test ( uri . protocol ) ) ; // exclude these special protocols for now
208
208
liberator . open ( uri . protocol + "//" + ( uri . host || "" ) + "/" ) ;
209
209
} ) ;
210
+ mappings . add ( [ modes . NORMAL ] , [ "gr" ] ,
211
+ "View current tab in Reader View" ,
212
+ function ( ) {
213
+ let uri = content . document . location . href ;
214
+ if ( ! uri . startsWith ( "about:reader" ) ) {
215
+ liberator . open ( 'about:reader?url=' + uri ) ;
216
+ } else {
217
+ liberator . open ( uri . substr ( "about:reader?url=" . length ) ) ;
218
+ }
219
+ } ) ;
210
220
} ,
211
221
212
222
commands : function ( ) {
Original file line number Diff line number Diff line change @@ -358,6 +358,19 @@ have the following possibilities:
358
358
</description >
359
359
</item >
360
360
361
+ <item >
362
+ <tags >gr</tags >
363
+ <spec >gr</spec >
364
+ <description >
365
+ <p >View current tab in Reader View.</p >
366
+
367
+ <p >
368
+ <k >gr</k > on <tt >http://www.example.com</tt > opens
369
+ <tt >about:reader?url=http://www.example.com/</tt >.
370
+ Not all pages are compatible with Reader View, so the page will sometimes fail to load.
371
+ </p >
372
+ </description >
373
+ </item >
361
374
362
375
<h2 tag =" reloading" >Reloading</h2 >
363
376
Original file line number Diff line number Diff line change 6
6
browser.tabs.closeWindowWithLastTab, which means those who are used to :tabclose never closing
7
7
the window when closing the last tab, should set this option to false (either through about:config
8
8
or with :set! browser.tabs.closeWindowWithLastTab=false)
9
+ * gr toggles Reader View
9
10
10
11
2015-08-25:
11
12
* Version 3.10.1
You can’t perform that action at this time.
0 commit comments