Left: | ||
Right: |
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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
605 ); | 605 ); |
606 | 606 |
607 if (!response.nodeData) | 607 if (!response.nodeData) |
608 return; | 608 return; |
609 | 609 |
610 this.window.openDialog("chrome://elemhidehelper/content/composer.xul", | 610 this.window.openDialog("chrome://elemhidehelper/content/composer.xul", |
611 "_blank", "chrome,centerscreen,resizable,dialog=no", response); | 611 "_blank", "chrome,centerscreen,resizable,dialog=no", response); |
612 this.quit(); | 612 this.quit(); |
613 }; | 613 }; |
614 | 614 |
615 | |
saroyanm
2015/08/11 13:50:14
Nit: please remove new line here.
Wladimir Palant
2015/08/11 13:57:06
Done.
| |
616 this.browser.selectedBrowser.messageManager.addMessageListener( | 615 this.browser.selectedBrowser.messageManager.addMessageListener( |
617 "ElemHideHelper:GetNodeInfo:Response", | 616 "ElemHideHelper:GetNodeInfo:Response", |
618 callback | 617 callback |
619 ); | 618 ); |
620 this.browser.selectedBrowser.messageManager.sendAsyncMessage( | 619 this.browser.selectedBrowser.messageManager.sendAsyncMessage( |
621 "ElemHideHelper:GetNodeInfo", | 620 "ElemHideHelper:GetNodeInfo", |
622 messageId, | 621 messageId, |
623 { | 622 { |
624 element: elem | 623 element: elem |
625 } | 624 } |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
796 // Show help box | 795 // Show help box |
797 helpBox.showPopup(this.browser, -1, -1, "tooltip", "topleft", "topleft"); | 796 helpBox.showPopup(this.browser, -1, -1, "tooltip", "topleft", "topleft"); |
798 return true; | 797 return true; |
799 } | 798 } |
800 } | 799 } |
801 | 800 |
802 // Makes sure event handlers like Aardvark.onKeyPress always have the correct | 801 // Makes sure event handlers like Aardvark.onKeyPress always have the correct |
803 // this pointer set. | 802 // this pointer set. |
804 for (let method of ["onMouseClick", "onMouseScroll", "onKeyPress", "onPageHide", "onMouseMove", "onAfterPaint", "quit"]) | 803 for (let method of ["onMouseClick", "onMouseScroll", "onKeyPress", "onPageHide", "onMouseMove", "onAfterPaint", "quit"]) |
805 Aardvark[method] = Aardvark[method].bind(Aardvark); | 804 Aardvark[method] = Aardvark[method].bind(Aardvark); |
LEFT | RIGHT |