File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -18,16 +18,18 @@ export default class DeputyPageSession {
18
18
* this value should be set to null. This ensures that a generic toolbar is
19
19
* used instead of the revision-specific toolbar.
20
20
* @param title The title of the page to get information for. Defaults to current.
21
+ * @param timeout Timeout for the page detail request.
21
22
*/
22
23
static async getPageDetails (
23
24
revision ?: number ,
24
- title : mw . Title = window . deputy . currentPage
25
+ title : mw . Title = window . deputy . currentPage ,
26
+ timeout = 500
25
27
) : Promise < DeputyPageStatusResponseMessage | null > {
26
28
return window . deputy . comms . sendAndWait ( {
27
29
type : 'pageStatusRequest' ,
28
30
page : title . getPrefixedText ( ) ,
29
31
revision : revision
30
- } ) ;
32
+ } , timeout ) ;
31
33
}
32
34
33
35
/**
@@ -83,7 +85,10 @@ export default class DeputyPageSession {
83
85
mw . config . get ( 'wgDiffOldId' ) :
84
86
// On a "prev" diff page
85
87
mw . config . get ( 'wgDiffNewId' ) ) ||
86
- mw . config . get ( 'wgRevisionId' )
88
+ mw . config . get ( 'wgRevisionId' ) ,
89
+ window . deputy . currentPage ,
90
+ // Relatively low-stakes branch, we can handle a bit of a delay.
91
+ 2000
87
92
) ;
88
93
89
94
const openPromise = this . appendToolbar ( {
You can’t perform that action at this time.
0 commit comments