File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -247,11 +247,17 @@ The JavaScript tests can only be run by going to the [`Special:JavaScriptTest` p
247247
248248## Release notes
249249
250+ ### Version 1.1.2
251+
252+ Released on September 7, 2020.
253+
254+ * Fixed MediaWiki 1.31 compatibility (1.1.0 regression)
255+
250256### Version 1.1.1
251257
252258Released on September 7, 2020.
253259
254- * Fixed error happening when giving invalid page names to ` #network `
260+ * Made code more robust against invalid titles
255261
256262### Version 1.1.0
257263
Original file line number Diff line number Diff line change 11{
22 "name" : " Network" ,
33
4- "version" : " 1.1.1 " ,
4+ "version" : " 1.1.2 " ,
55
66 "author" : [
77 " [https://www.entropywins.wtf/mediawiki Jeroen De Dauw]" ,
Original file line number Diff line number Diff line change @@ -26,9 +26,15 @@ module.PageBlacklist = ( function ( mw ) {
2626 let title = mw . Title . newFromText ( pageName ) ;
2727
2828 return title === null
29- || ( this . excludeTalk && title . isTalkPage ( ) )
29+ || ( this . excludeTalk && this . _isTalkPage ( title ) )
3030 || this . namespaces . includes ( title . getNamespaceId ( ) ) ;
31- }
31+ } ;
32+
33+ PageBlacklist . prototype . _isTalkPage = function ( title ) {
34+ // Can replace this function with title.isTalkPage() on MW 1.35+
35+ let namespaceId = title . getNamespaceId ( ) ;
36+ return ! ! ( namespaceId > 0 && namespaceId % 2 ) ;
37+ } ;
3238
3339 return PageBlacklist ;
3440
You can’t perform that action at this time.
0 commit comments