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

Commit

Permalink
Use the logger element ID for updating the tooltip.
Browse files Browse the repository at this point in the history
  • Loading branch information
davehunt committed Feb 29, 2012
1 parent 608e48a commit b5304cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion extension/data/widget/widget.js
Expand Up @@ -57,7 +57,7 @@ logger.onclick = function toggle() {
};

logger.onmouseover = function update_tooltip() {
self.port.emit("update_tooltip", "logger_" + logger.className);
self.port.emit("update_tooltip", logger.id);
};

logger.onmouseout = function update_tooltip() {
Expand Down
11 changes: 6 additions & 5 deletions extension/lib/main.js
Expand Up @@ -89,11 +89,12 @@ exports.main = function (options, callbacks) {

widget.port.on("update_tooltip", function (data) {
switch(data) {
case "logger_enabled":
widget.tooltip = "MemChaser logging is currently enabled. Click to disable.";
break;
case "logger_disabled":
widget.tooltip = "MemChaser logging is currently disabled. Click to enable.";
case "logger":
if (logger.active) {
widget.tooltip = "MemChaser logging is currently enabled. Click to disable.";
} else {
widget.tooltip = "MemChaser logging is currently disabled. Click to enable.";
}
break;
default:
widget.tooltip = "MemChaser";
Expand Down

0 comments on commit b5304cc

Please sign in to comment.