/diffDomainNewTab

Open links in new tab if on different domain

Primary LanguageJavaScriptMIT LicenseMIT

diffDomainNewTab

Save Your Visitors

Open links in new tab if on different domain and not in the exception list.

WordPress Version

https://github.com/alaanasssar/WP-diffDomainNewTab ( Thanks to Alaa Nassar )

Bugs

If you encounter any issues using this plugin please open an issue here and I'll try my best to fix it.

Developers are more than welcome to improve this plugin.

Thanks.

Note

This is a jQuery Plugin so it needs to be loaded first

Usage:

without exception list:

jQuery("a").diffDomainNewTab();

with exception list:

jQuery("a").diffDomainNewTab({
    exceptionList: [
        "www.google.com",
        "www.facebook.com"
    ]
});