Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>phonechange</title>
- </head>
- <body>
- <div class="tel ptsans">
- <div class="phones" id="phone">
- <span class="code">(029)</span>
- <span class="number">308-06-20<span>
- </div>
- <div class="phones" id="phone1">
- <span class="code">(017)</span>
- <span class="number">267-88-66</span></span>
- </div>
- </div>
- <script>
- (function(d) {
- window.addEventListener('DOMContentLoaded', function() {
- init('#phone','+375 (29)', '657-44-94');
- init('#phone1','', '');
- });
- function init(id, code, tel) {
- var r = d.referrer;
- var str = r.toString();
- var phone = d.querySelector(id);
- console.log(r.match('bosch-kotly.by') !== null)
- console.log(localStorage.getItem('bosch') !== null)
- if (r.match('bosch-kotly.by') === null && localStorage.getItem('bosch') === null) return;
- phone.querySelector('.code').innerHTML = code;
- phone.querySelector('.number').innerHTML = tel;
- localStorage.setItem('bosch', true);
- }
- }(document));
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement