Is it might to check is there any open tab with special address in Firerfox in JavaScript?

I want to write an script to send selected text to google translate with java script. but any time that it runs the script opens a new tab of googletranslate.com.I want to add a function to check if would have existed open tab with same requested address it send to that tab and if not open a new tab with that address.

document.execCommand('copy');
window.open("https://translate.google.com/?sl=en&tl=fa&op=translate");

(it is not so important but if you help me how can I automatic paste of copied text from clipboard in last line of code you will give me a big help.)
Thanks.

42 thoughts on “Is it might to check is there any open tab with special address in Firerfox in JavaScript?”

Leave a Comment