Skip to content

Commit

Permalink
Fix embedded features and icon badging in Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispederick committed Jun 19, 2024
1 parent 6cdc9ad commit 5684a4d
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 7 deletions.
2 changes: 1 addition & 1 deletion chrome/config/config.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=3.0
version=3.0.1
11 changes: 8 additions & 3 deletions common/js/common/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,12 @@ WebDeveloper.Storage.toggleFeatureOnTab = function(feature, tab, callback)
newFeaturesOnTab = feature;
}

WebDeveloper.Storage.setItem(featureTabId, newFeaturesOnTab, callback);
WebDeveloper.Storage.updateBadgeText(featureTabId);
WebDeveloper.Storage.setItem(featureTabId, newFeaturesOnTab, function() { WebDeveloper.Storage.updateBadgeText(featureTabId, callback); });
});
};

// Updates the badge text for a tab
WebDeveloper.Storage.updateBadgeText = function(featureTabId)
WebDeveloper.Storage.updateBadgeText = function(featureTabId, callback)
{
var badgeText = "";
var badgeTooltip = "@name@";
Expand All @@ -211,6 +210,12 @@ WebDeveloper.Storage.updateBadgeText = function(featureTabId)

chrome.action.setBadgeText({ text: badgeText, tabId: featureTabId });
chrome.action.setTitle({ title: badgeTooltip, tabId: featureTabId });

// If a callback is set
if(callback)
{
callback();
}
});
};

Expand Down
3 changes: 3 additions & 0 deletions common/js/embedded/dashboard/element-information.js
Original file line number Diff line number Diff line change
Expand Up @@ -954,3 +954,6 @@ WebDeveloper.ElementInformation.selectParentElement = function(eventTarget)
}
}
};

// Fixes a non-structured-clonable data error in Firefox
""; // eslint-disable-line no-unused-expressions
3 changes: 3 additions & 0 deletions common/js/embedded/toolbar/color-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,3 +233,6 @@ WebDeveloper.ColorPicker.setColor = function(color, type)

WebDeveloper.ColorPicker.toolbarDocument.getElementById("web-developer-color-picker-" + type + "-hex").textContent = color;
};

// Fixes a non-structured-clonable data error in Firefox
""; // eslint-disable-line no-unused-expressions
3 changes: 3 additions & 0 deletions common/js/embedded/toolbar/line-guides.js
Original file line number Diff line number Diff line change
Expand Up @@ -487,3 +487,6 @@ WebDeveloper.LineGuides.updateLineGuideInformation = function(lineGuide)
WebDeveloper.LineGuides.updateInformation(position, previousPosition, nextPosition);
}
};

// Fixes a non-structured-clonable data error in Firefox
""; // eslint-disable-line no-unused-expressions
3 changes: 3 additions & 0 deletions common/js/embedded/toolbar/ruler.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,3 +561,6 @@ WebDeveloper.Ruler.updateWidth = function()
WebDeveloper.Ruler.updateInformation();
}
};

// Fixes a non-structured-clonable data error in Firefox
""; // eslint-disable-line no-unused-expressions
2 changes: 1 addition & 1 deletion edge/config/config.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=3.0
version=3.0.1
2 changes: 1 addition & 1 deletion firefox/config/config.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=3.0
version=3.0.1
2 changes: 1 addition & 1 deletion opera/config/config.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=3.0
version=3.0.1

0 comments on commit 5684a4d

Please sign in to comment.