Browse files

Ignore missing user/pass info in location.href.

Fixes #1631
  • Loading branch information...
1 parent 4a210c9 commit 01cb1d42f543a5d07493a4736e9ae7d7dccd8662 @arantius arantius committed Sep 20, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 content/browser.js
View
8 content/browser.js
@@ -78,8 +78,12 @@ GM_BrowserUI.contentLoad = function(event) {
var href = safeWin.location.href;
// Make sure we are still on the page that fired this event, see issue #1083.
- // But ignore hashes; see issue #1445.
- if (href.replace(/#.*/, '') == event.target.documentURI.replace(/#.*/, '')) {
+ // But ignore differences in formats; see issue #1445 and #1631.
+ var comparisonHref = href.replace(/#.*/, '');
+ var comparsionUri = event.target.documentURI
+ .replace(/#.*/, '')
+ .replace(/\/\/[^\/:]+:[^\/@]+@/, '//');
+ if (comparisonHref == comparsionUri) {
GM_BrowserUI.gmSvc.runScripts('document-end', safeWin);
}
};

0 comments on commit 01cb1d4

Please sign in to comment.