Angular modifies the DOM after the page loads, so you need to wait a bit for the events or nodes you care about.
In addition, you must prevent your code (especially jQuery) from interfering with the page code. This means that you should try to keep the sandbox enabled.
For Firefox + Greasemonkey or Chrome + Tampermonkey (or the majority of engines that support the directive @require), you can use waitForKeyElements tool () , and @grantto achieve these goals.
This full sample script will work with both FF + GM and Chrome + TM:
waitForKeyElements (".nav", addTestDiv);
function addTestDiv (jNode) {
jNode.after ('<div>test</div>');
}
, @require (, Chrome), ! Tampermonkey .