Skip to content

Instantly share code, notes, and snippets.

@ZER0
Created April 7, 2014 17:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZER0/10024431 to your computer and use it in GitHub Desktop.
Save ZER0/10024431 to your computer and use it in GitHub Desktop.
Add-on SDK: to Certificate Viewer window
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