Index: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js |
— | — | @@ -661,7 +661,7 @@ |
662 | 662 | if ( data.redirect !== undefined ) { |
663 | 663 | var targetBaseUrl = mw.util.wikiGetlink( data.redirect.pageName ), |
664 | 664 | // currentBaseUrl is the current URL minus the hash fragment |
665 | | - currentBaseUrl = window.location.href.substr( 0, location.href.length - (location.hash || '').length ); |
| 665 | + currentBaseUrl = window.location.href.split("#")[0]; |
666 | 666 | |
667 | 667 | // Set window location to user talk page URL + WikiLove anchor hash. |
668 | 668 | // Unfortunately, in the most common scenario (starting from the user talk |