Skip to content

Commit

Permalink
Firefox bugfixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Connorhd committed Jan 21, 2011
1 parent 3d8ab52 commit 50afdb2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions firefox/chrome/content/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ var tabcloud = {
var afterId = "urlbar-container"; // ID of element to insert after
var navBar = document.getElementById("nav-bar");
var curSet = navBar.currentSet.split(",");

if (curSet.indexOf(myId) == -1) {
if (curSet.indexOf(myId) == -1 && document.getElementById(myId) === null) {
var pos = curSet.indexOf(afterId) + 1 || curSet.length;
var set = curSet.slice(0, pos).concat(myId).concat(curSet.slice(pos));

Expand Down Expand Up @@ -138,6 +137,10 @@ var tabcloud = {
try {
win.name = domWindowLegend.textContent = domWindowTitle.value;

if (!win.name) {
domWindowLegend.textContent = win.name = 'Window';
}

var req = new XMLHttpRequest();
req.open('POST', 'https://chrometabcloud.appspot.com/update', true);
var params = 'window='+encodeURIComponent(JSON.stringify(win))+'&windowId='+windowId;
Expand Down Expand Up @@ -324,6 +327,10 @@ var tabcloud = {
if (e.which === 13) {
try {
data.name = win._tabcloudName = domWindowLegend.textContent = domWindowTitle.value;

if (!data.name) {
data.name = win._tabcloudName = domWindowLegend.textContent = 'Window';
}

delete domWindowLegend.editing;
delete tabcloud.editing;
Expand Down
2 changes: 1 addition & 1 deletion firefox/install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<em:name>TabCloud</em:name>
<em:iconURL>chrome://tabcloud/content/icon.png</em:iconURL>
<em:icon64URL>chrome://tabcloud/content/icon64.png</em:icon64URL>
<em:version>0.4</em:version>
<em:version>0.5</em:version>
<em:creator>Connor Dunn</em:creator>
<em:contributor></em:contributor>
<em:description>Save and restore window sessions over time and across multiple computers.</em:description>
Expand Down

0 comments on commit 50afdb2

Please sign in to comment.