Skip to content
This repository has been archived by the owner on Sep 18, 2018. It is now read-only.

Commit

Permalink
Fix bar replacement issue spotted by Pappenheimer.
Browse files Browse the repository at this point in the history
  • Loading branch information
chromakode committed Aug 30, 2009
1 parent 731233c commit 4b15fd2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion NEWS
@@ -1,7 +1,7 @@
== Version 1.3.3.7 ==
* Fix "preload" reddit scraping to work with updated reddit DOM.
* Ignore "www." domain prefix when determining bar persistence.
* Fix bar display upon redirects. Thanks Pappenheimer!
* Fix multiple issues with redirects and bar replacement. Thanks Pappenheimer!

== Version 1.3.3.1 ==
* Compatibility bump to satisfy Firefox 3.5.1.
Expand Down
12 changes: 6 additions & 6 deletions content/socialite.js
Expand Up @@ -196,18 +196,18 @@ var SocialiteWindow = (function() {
// Handle an existing bar
if (socialiteBar) {
let isFromRedirect = Socialite.watchedURLs.isRedirect(socialiteBar.originalURL, URL);
let isPersistenceChange = persistence.onLocationChange(socialiteBar.URL, URL);
// Handle persistence changes, if any.
if (!isFromRedirect && !isPersistenceChange) {
socialiteBar.close();
socialiteBar = null;
} else {
let barPersists = persistence.onLocationChange(socialiteBar.URL, URL);
// Retain the bar if this was a redirect, or if the current URL isn't watched and the bar persists.
if (isFromRedirect || (!isWatched && barPersists)) {
// If we got redirected, update the bar URL so persistence rules are followed correctly.
if (isFromRedirect) {
socialiteBar.URL = URL;
}
// If we're not closing the bar, refresh it.
socialiteBar.refresh();
} else {
socialiteBar.close();
socialiteBar = null;
}
}

Expand Down

0 comments on commit 4b15fd2

Please sign in to comment.