| Index: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js |
| — | — | @@ -685,12 +685,15 @@ |
| 686 | 686 | |
| 687 | 687 | // If we were already on the user talk page, then reload the page so that the |
| 688 | 688 | // new WikiLove message is displayed. |
| | 689 | + // @todo: an expandUrl() would be very nice indeed! |
| 689 | 690 | if ( |
| 690 | | - targetBaseUrl === currentBaseUrl |
| 691 | | - // Compatibility with 1.17, 1.18 |
| 692 | | - || mw.config.get( 'wgServer' ) + targetBaseUrl === currentBaseUrl |
| 693 | | - // Compatibility with protocol-relative URLs |
| | 691 | + mw.config.get( 'wgServer' ) + targetBaseUrl === currentBaseUrl |
| | 692 | + // Compatibility with 1.17 (mw.util.wikiGetlink prepends wgServer in 1.17) |
| | 693 | + || targetBaseUrl === currentBaseUrl |
| | 694 | + // Compatibility with protocol-relative URLs in 1.18+ |
| 694 | 695 | || window.location.protocol + mw.config.get( 'wgServer' ) + targetBaseUrl === currentBaseUrl |
| | 696 | + // Compatibility with protocol-relative URLs in 1.17 |
| | 697 | + || window.location.protocol + targetBaseUrl === currentBaseUrl |
| 695 | 698 | ) { |
| 696 | 699 | window.location.reload(); |
| 697 | 700 | } |