@vJack: You can get ideas from my example below.
--[[ <HCExtension>
@name whatismyip.host hide div
@author hc.addict
@description hide div element in page
@rule whatismyip\.host
@rule whatismyip\.host\/my-ip-address-details
@event BeforeAnswerBodySend
</HCExtension> ]]
function BeforeAnswerBodySend()
local jscript = '<script type="text/javascript">$(document).ready(function(){var x=document.getElementById("ipv6");x.style.display="none";var y=document.getElementById("learnmore");y.style.display="none"});</script>'
hc.answer_body = re.replace(hc.answer_body, [[<\/body>]], jscript..'</body>')
end