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 {
1818 * this value should be set to null. This ensures that a generic toolbar is
1919 * used instead of the revision-specific toolbar.
2020 * @param title The title of the page to get information for. Defaults to current.
21+ * @param timeout Timeout for the page detail request.
2122 */
2223 static async getPageDetails (
2324 revision ?: number ,
24- title : mw . Title = window . deputy . currentPage
25+ title : mw . Title = window . deputy . currentPage ,
26+ timeout = 500
2527 ) : Promise < DeputyPageStatusResponseMessage | null > {
2628 return window . deputy . comms . sendAndWait ( {
2729 type : 'pageStatusRequest' ,
2830 page : title . getPrefixedText ( ) ,
2931 revision : revision
30- } ) ;
32+ } , timeout ) ;
3133 }
3234
3335 /**
@@ -83,7 +85,10 @@ export default class DeputyPageSession {
8385 mw . config . get ( 'wgDiffOldId' ) :
8486 // On a "prev" diff page
8587 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
8792 ) ;
8893
8994 const openPromise = this . appendToolbar ( {
You can’t perform that action at this time.
0 commit comments