I am creating a Google Chrome extension that adds a keyboard shortcut for the link "Display images below" in Gmail using jQuery.
I have tried the following to simulate the click unsuccessfully:
$("#canvas_frame").contents().find("span:contains(Display images below)").mousedown().mouseup().click();
$("#canvas_frame").contents().find("span:contains(Display images below)").click();
$("#canvas_frame").contents().find("span:contains(Display images below)").mousedown();
$("#canvas_frame").contents().find("span:contains(Display images below)").mouseup();
$("#canvas_frame").contents().find("span:contains(Display images below)").trigger('click');
Could someone point me in the right direction?
Note: don’t forget that GMail is multilingual, you may need a better method of selecting the element!