| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This Source Code is subject to the terms of the Mozilla Public License | 2 * This Source Code is subject to the terms of the Mozilla Public License |
| 3 * version 2.0 (the "License"). You can obtain a copy of the License at | 3 * version 2.0 (the "License"). You can obtain a copy of the License at |
| 4 * http://mozilla.org/MPL/2.0/. | 4 * http://mozilla.org/MPL/2.0/. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 let {Prefs} = require("prefs"); | 7 let {Prefs} = require("prefs"); |
| 8 | 8 |
| 9 // Make sure to stop selection when we are uninstalled | 9 // Make sure to stop selection when we are uninstalled |
| 10 onShutdown.add(() => Aardvark.quit()); | 10 onShutdown.add(() => Aardvark.quit()); |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 this.boxElem = null; | 565 this.boxElem = null; |
| 566 E = id => null; | 566 E = id => null; |
| 567 return false; | 567 return false; |
| 568 }, | 568 }, |
| 569 | 569 |
| 570 select: function(elem) | 570 select: function(elem) |
| 571 { | 571 { |
| 572 if (!elem) | 572 if (!elem) |
| 573 return false; | 573 return false; |
| 574 | 574 |
| 575 this.window.openDialog("chrome://elemhidehelper/content/composer.xul", "_bla
nk", | 575 this.browser.selectedBrowser.messageManager.sendAsyncMessage( |
| 576 "chrome,centerscreen,resizable,dialog=no", elem); | 576 "ElemHideHelper:GetNodeInfo", |
| 577 this.quit(); | 577 null, |
| 578 { |
| 579 element: elem, |
| 580 callback: (nodeData, host) => |
| 581 { |
| 582 this.window.openDialog("chrome://elemhidehelper/content/composer.xul",
"_blank", |
| 583 "chrome,centerscreen,resizable,dialog=no", node
Data, host); |
| 584 this.quit(); |
| 585 } |
| 586 } |
| 587 ); |
| 578 return false; | 588 return false; |
| 579 }, | 589 }, |
| 580 | 590 |
| 581 blinkElement: function(elem) | 591 blinkElement: function(elem) |
| 582 { | 592 { |
| 583 if (!elem) | 593 if (!elem) |
| 584 return false; | 594 return false; |
| 585 | 595 |
| 586 if ("blinkTimer" in this) | 596 if ("blinkTimer" in this) |
| 587 this.stopBlinking(); | 597 this.stopBlinking(); |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 // Show help box | 757 // Show help box |
| 748 helpBox.showPopup(this.browser, -1, -1, "tooltip", "topleft", "topleft"); | 758 helpBox.showPopup(this.browser, -1, -1, "tooltip", "topleft", "topleft"); |
| 749 return true; | 759 return true; |
| 750 } | 760 } |
| 751 } | 761 } |
| 752 | 762 |
| 753 // Makes sure event handlers like Aardvark.onKeyPress always have the correct | 763 // Makes sure event handlers like Aardvark.onKeyPress always have the correct |
| 754 // this pointer set. | 764 // this pointer set. |
| 755 for (let method of ["onMouseClick", "onMouseScroll", "onKeyPress", "onPageHide",
"onMouseMove", "onAfterPaint", "quit"]) | 765 for (let method of ["onMouseClick", "onMouseScroll", "onKeyPress", "onPageHide",
"onMouseMove", "onAfterPaint", "quit"]) |
| 756 Aardvark[method] = Aardvark[method].bind(Aardvark); | 766 Aardvark[method] = Aardvark[method].bind(Aardvark); |
| OLD | NEW |