Created
April 7, 2014 17:19
-
-
Save ZER0/10024431 to your computer and use it in GitHub Desktop.
Add-on SDK: to Certificate Viewer window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let { events: windowEvents } = require('sdk/window/events'); | |
let { on } = require('sdk/event/core'); | |
let { filter } = require('sdk/event/utils'); | |
let ready = filter(windowEvents, ({type}) => type === 'DOMContentLoaded'); | |
let certificateWindows = filter(ready, ({target}) => | |
target.document.documentElement.mozMatchesSelector('dialog#certDetails')); | |
on(certificateWindows, 'data', ({target: window}) => { | |
let { document } = window; | |
console.log(document.documentElement.outerHTML) | |
}, true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment