SUPPORT-9273: Add browser check
This commit is contained in:
parent
8b3b26d6ab
commit
32e087adbc
3 changed files with 17 additions and 1 deletions
|
|
@ -122,6 +122,11 @@ button, a.btn {
|
|||
border-radius: 4px;
|
||||
background: var(--color-link);
|
||||
}
|
||||
a.btn.disabled {
|
||||
pointer-events: none;
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
button:is(:hover, :focus, :active),
|
||||
a.btn:is(:hover, :focus, :active) {
|
||||
background: var(--color-link-hover);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
content="default-src 'self'; connect-src 'self' https://xn--1-6tb.xn--b1afabzvcegckfhg.xn--p1ai/ https://xn--2-6tb.xn--b1afabzvcegckfhg.xn--p1ai/; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:"/>
|
||||
<meta name="referrer" content="strict-origin-when-cross-origin"/>
|
||||
<script src="script/cert-checker.js"></script>
|
||||
<script src="script/browser-check.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
@ -36,7 +37,7 @@
|
|||
<div class="block-img"></div>
|
||||
<div class="block-title">Для организаций</div>
|
||||
<div class="block-description">Направление сведений через <a href="<!--#echo var="ulUrl"-->">Личный кабинет</a><br /><br /></div>
|
||||
<a href="<!--#echo var="ulLandingUrl"-->" class="btn">Подробнее</a>
|
||||
<a id="ul-lk" href="<!--#echo var="ulLandingUrl"-->" class="btn">Подробнее</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
10
html/script/browser-check.js
Normal file
10
html/script/browser-check.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
window.addEventListener('DOMContentLoaded', () => {
|
||||
const userAgent = navigator.userAgent;
|
||||
if (!(userAgent.includes("Chromium GOST") || userAgent.includes("YaBrowser"))) {
|
||||
const links = document.getElementById("ul-lk");
|
||||
links.forEach(link => {
|
||||
link.classList.add('disabled');
|
||||
link.addEventListener('click', (e) => e.preventDefault());
|
||||
});
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue