| LEFT | RIGHT |
| 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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 if (!elem) | 572 if (!elem) |
| 573 return false; | 573 return false; |
| 574 | 574 |
| 575 this.browser.selectedBrowser.messageManager.sendAsyncMessage( | 575 this.browser.selectedBrowser.messageManager.sendAsyncMessage( |
| 576 "ElemHideHelper:GetNodeInfo", | 576 "ElemHideHelper:GetNodeInfo", |
| 577 null, | 577 null, |
| 578 { | 578 { |
| 579 element: elem, | 579 element: elem, |
| 580 callback: (nodeData, host) => | 580 callback: (nodeData, host) => |
| 581 { | 581 { |
| 582 this.window.openDialog("chrome://elemhidehelper/content/composer.xul",
"_blank", | 582 this.window.openDialog("chrome://elemhidehelper/content/composer.xul", |
| 583 "chrome,centerscreen,resizable,dialog=no", node
Data, host); | 583 "_blank", "chrome,centerscreen,resizable,dialog=no", nodeData, |
| 584 host); |
| 584 this.quit(); | 585 this.quit(); |
| 585 } | 586 } |
| 586 } | 587 } |
| 587 ); | 588 ); |
| 588 return false; | 589 return false; |
| 589 }, | 590 }, |
| 590 | 591 |
| 591 blinkElement: function(elem) | 592 blinkElement: function(elem) |
| 592 { | 593 { |
| 593 if (!elem) | 594 if (!elem) |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 757 // Show help box | 758 // Show help box |
| 758 helpBox.showPopup(this.browser, -1, -1, "tooltip", "topleft", "topleft"); | 759 helpBox.showPopup(this.browser, -1, -1, "tooltip", "topleft", "topleft"); |
| 759 return true; | 760 return true; |
| 760 } | 761 } |
| 761 } | 762 } |
| 762 | 763 |
| 763 // Makes sure event handlers like Aardvark.onKeyPress always have the correct | 764 // Makes sure event handlers like Aardvark.onKeyPress always have the correct |
| 764 // this pointer set. | 765 // this pointer set. |
| 765 for (let method of ["onMouseClick", "onMouseScroll", "onKeyPress", "onPageHide",
"onMouseMove", "onAfterPaint", "quit"]) | 766 for (let method of ["onMouseClick", "onMouseScroll", "onKeyPress", "onPageHide",
"onMouseMove", "onAfterPaint", "quit"]) |
| 766 Aardvark[method] = Aardvark[method].bind(Aardvark); | 767 Aardvark[method] = Aardvark[method].bind(Aardvark); |
| LEFT | RIGHT |