correct agrotop counter
This commit is contained in:
@@ -50,14 +50,6 @@
|
||||
?>
|
||||
<div class="socials footer__socials">
|
||||
<?php get_template_part('partials/menu-socials'); ?>
|
||||
<a href="https://agroserver.ru/" target="_blank">
|
||||
<script language="javascript">
|
||||
var r = escape(document.referrer);
|
||||
var rd = Math.random();
|
||||
var pr = 'https://top.agroserver.ru/ct/';
|
||||
document.write('<img src="'+pr+'?uid=18819&ref='+r+'&rd='+rd+'" width="88" height="31" border="0">');
|
||||
</script></a>
|
||||
<!--// Rating::top.agroserver.ru counter-->
|
||||
</div>
|
||||
|
||||
<div class="footer-bottom__text mobile">
|
||||
@@ -79,6 +71,9 @@ document.write('<img src="'+pr+'?uid=18819&ref='+r+'&rd='+rd+'" width="88" heigh
|
||||
<div>
|
||||
<p>When reproducing or utilizing content from the AgroExpert website, providing a valid link to the original material is required. For printed media use, AgroExpert should be credited as the source.</p>
|
||||
</div>
|
||||
|
||||
<div id="counter-container"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
13
footer.php
13
footer.php
@@ -41,15 +41,6 @@
|
||||
<?php get_template_part('partials/menu-footer-bottom'); ?>
|
||||
<div class="socials footer__socials">
|
||||
<?php get_template_part('partials/menu-socials'); ?>
|
||||
<!--Rating::top.agroserver.ru counter-->
|
||||
<a href="https://agroserver.ru/" target="_blank">
|
||||
<script language="javascript">
|
||||
var r = escape(document.referrer);
|
||||
var rd = Math.random();
|
||||
var pr = 'https://top.agroserver.ru/ct/';
|
||||
document.write('<img src="'+pr+'?uid=18819&ref='+r+'&rd='+rd+'" width="88" height="31" border="0">');
|
||||
</script></a>
|
||||
<!--// Rating::top.agroserver.ru counter-->
|
||||
</div>
|
||||
|
||||
<div class="footer-bottom__text mobile">
|
||||
@@ -71,7 +62,11 @@ document.write('<img src="'+pr+'?uid=18819&ref='+r+'&rd='+rd+'" width="88" heigh
|
||||
<div>
|
||||
<p>При перепечатке и использовании информации с сайта «Агроэксперт» активная ссылка на использованный материал обязательна. При использовании материалов в печатных СМИ указывать источник — «Агроэксперт».</p>
|
||||
</div>
|
||||
|
||||
<div id="counter-container"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import './scripts/scroll-to-top.js';
|
||||
import './scripts/search-form.js';
|
||||
import './scripts/select.js';
|
||||
import './scripts/subscription-form.js';
|
||||
import './scripts/agroserver.js';
|
||||
import './styles/components/about.css';
|
||||
import './styles/components/banner.css';
|
||||
import './styles/components/breadcrumbs.css';
|
||||
|
||||
20
frontend/src/scripts/agroserver.js
Normal file
20
frontend/src/scripts/agroserver.js
Normal file
@@ -0,0 +1,20 @@
|
||||
(function() {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var container = document.getElementById('counter-container');
|
||||
if (!container) return;
|
||||
|
||||
var r = encodeURIComponent(document.referrer);
|
||||
var rd = Math.random();
|
||||
var pr = 'https://top.agroserver.ru/ct/';
|
||||
|
||||
var img = new Image();
|
||||
img.src = pr + '?uid=18819&ref=' + r + '&rd=' + rd;
|
||||
img.width = 88;
|
||||
img.height = 31;
|
||||
img.alt = 'Agroserver Counter';
|
||||
img.loading = 'lazy'; // если поддерживается — ещё быстрее
|
||||
|
||||
container.appendChild(img);
|
||||
});
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user