i would like to know whether there is any option to find or check whether a link is opened in any of the tabs in the browser ,My situation is like ... ,i have created a company website, many of its links are opening to a website(let it be www.wellitsmine.com) on a new tab ,as there are many tabs opening the focus of the company site is not reflecting,i would like to check whether there is any tab have opened up with this link(www.wellitsmine.com),if it is opened then restricting all the links in the company site that have to open www.wellitsmine.com link in new tab.
You can use window.postMessage.
From Your Main Tab,
window.postMessage("Your Url As Message", "http://yourcompany.com");
Some other tab,
window.onmessage = function(e) { if(e.origin == "http://yourcompany.com") /* do your stuff*/};
Refer https://developer.mozilla.org/en-US/docs/Web/API/window.postMessage
Normally i would recommend using iframes to manage this... But since all the tabs are opening pages from the same domain... what you could do is as such:
var wd = window.open('url to your target page');
Then the wd object actually is the tab/window that opened.. then you can check if it's closed.. or close it with wd.close(). So insteead of letting links to open up in new tab/window. Use a handler to use window.open and handle those window objects yourself.