diff options
author | dizzy <diosmosis@users.noreply.github.com> | 2021-09-22 00:43:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-22 00:43:38 +0300 |
commit | 962bd82b8069af16bb5fcfcc7d2ef75731a5bf2e (patch) | |
tree | 0ad52db0320d177c255e61dd8e783b21d74a4451 /plugins/CoreHome/angularjs | |
parent | 8c3f495c64a5209f0110f49588c4840ff2cd07fe (diff) |
add warning about dropping support for users using IE (#18037)
Diffstat (limited to 'plugins/CoreHome/angularjs')
-rw-r--r-- | plugins/CoreHome/angularjs/iecheck.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/plugins/CoreHome/angularjs/iecheck.js b/plugins/CoreHome/angularjs/iecheck.js new file mode 100644 index 0000000000..234322e82d --- /dev/null +++ b/plugins/CoreHome/angularjs/iecheck.js @@ -0,0 +1,37 @@ +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ +(function () { + angular.module('piwikApp').run(['$timeout', function($timeout) { + var isIe = detectIfIeIsBeingUsed(); + if (isIe) { + $timeout(function () { + var UI = require('piwik/UI'); + var notification = new UI.Notification(); + + var message = _pk_translate('CoreHome_TechDeprecationWarning', [ + '4.6', + 'Internet Explorer', + '<a target="_blank" href="https://matomo.org/blog/2021/09/matomo-to-end-support-for-internet-explorer-11/" rel="noreferrer noopener">', + '</a>', + ]); + + notification.show(message, { + title: _pk_translate('General_Warning') + ':', + context: 'warning', + noclear: true, + type: 'persistent', + id: 'ieEndingSupportCheck' + }); + }); + } + + function detectIfIeIsBeingUsed() { + var ua = window.navigator.userAgent; + return ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1; + } + }]); +})(); |