I'm working on a chrome extension that allows you to hide threads from a message board. I have it working, but the "Hide Me" link flickers into existence after the page loads. It works fine, but I'd like to load the link along with the rest of the DOM and not appear after the page load.
I tried adding "run_at": "document_start"
to manifest.json
, but it prevented the Hide Me link from even rendering.
$('a.topictitle').after(" | <a class='hideMe'>Hide Me</a>");
$('.hideMe').on('click', function(){
var thread = $(this).closest('li')
console.log(thread)
thread.remove()
});
Is this possible, or do I just have to deal with it happening after the fact?