Welcome to mirror list, hosted at ThFree Co, Russian Federation.

noreferrer.js « javascripts « CoreHome « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cc3b0d35a820f0945d192b252784bdea8b55bf8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*!
 * Piwik - free/libre analytics platform
 *
 * @link http://piwik.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
$(function () {
    if ($.browser.msie && parseInt($.browser.version) === 10) {
        $(document).on('click', 'a[rel~="noreferrer"]', function (event) {
            event.preventDefault();
            var a = event.currentTarget;
            var w = window.open(a.href, a.target || '_self');
            if (/\bnoopener\b/.test(a.rel)) {
                w.opener = null;
            }
        });
    }
});