Как мы автоматизировали ежедневный твит проекта 100DaysOfCode

Как мы автоматизировали ежедневный твит проекта 100DaysOfCode
В этом посте я покажу вам способ сделать автоматический твит о прогрессе в испытании #100DaysOfCode Challenge. После этого у вас останется больше времени на разработку. Супер, да?

Это день 007 нашего испытания 100 Days of Code. Весь код проекта хранится здесь.

Подготовка

Итак, нам понадобятся pytz, tweepy и requests. Вы можете установить их все разом командой:

pip install -r requirements.txt если вы склонировали репозиторий. Также рекомендую использовать virtualenv для изоляции окружений.

Вам также понадобятся Consumer Key/Secret и Access Token (Secret) из Twitter. Я добавил их в .bashrc, который я загружаю через os.environ в config.py. Там же запускается обработчик логгирования, записывающий исходящие твиты и все возможные ошибки.

Главный скрипт

Согласно PEP8, вначале импортируем стандартную библиотеку, затем внешние модули, а ниже — модули проекта:

import datetime
import os
import re
import sys

import requests
import pytz

from config import logging, api
Мой сервер запущен в часовом поясе Mountain Time, а мне необходимо было работать с поясами в EMEA. В этом нам поможет pytz, с ним очень легко работать с любыми часовыми поясами:

tz = pytz.timezone('Europe/Amsterdam')
now = datetime.datetime.now(tz)
start = datetime.datetime(2017, 3, 29, tzinfo=tz) # = PyBites 100 days :)

По PEP8 константы зададим символами в верхнем регистре с разделителем в виде подчёркивания. Очень удобный расчёт дат:

CURRENT_CHALLENGE_DAY = str((now - start).days).zfill(3)
LOG = 'https://raw.githubusercontent.com/pybites/100DaysOfCode/master/LOG.md'
LOG_ENTRY = re.compile(r'\[(?P.*?)\]\((?P<day>\d+)\)')<br /> REPO_URL = 'https://github.com/pybites/100DaysOfCode/tree/master/'<br /> TWEET_LEN = 140<br /> TWEET_LINK_LEN = 23</code><br /> Ну и куда без requests? Так одной строкой я получаю файл LOG.md из <a href="https://github.com/pybites/100DaysOfCode" target="_blank">репозитория</a>:</p> <p><code>def get_log():<br /> return requests.get(LOG).text.split('\n')</code><br /> Получим название скрипта и строку с соответствующей датой из LOG.md (сегодня = ‘007’):</p> <p><code>def get_day_progress(html):<br /> lines = [line.strip()<br /> for line in html<br /> if line.strip()]</p> <p> for line in lines:<br /> day_entry = line.strip('|').split('|')[0].strip()<br /> if day_entry == CURRENT_CHALLENGE_DAY:<br /> return LOG_ENTRY.search(line).groupdict()</code><br /> Создаём твит. Я добавил немного кода для сокращения названия скрипт, если он превышает допустимый размер твита:</p> <p><code>def create_tweet(m):<br /> ht1, ht2 = '#100DaysOfCode', '#Python'<br /> title = m['title']<br /> day = m['day']<br /> url = REPO_URL + day<br /> allowed_len = TWEET_LEN + len(url) - TWEET_LINK_LEN</p> <p> fmt = '{} - Day {}: {} {} {}'<br /> tweet = fmt.format(ht1, day, title, url, ht2)<br /> surplus = len(tweet) - allowed_len</p> <p> if surplus > 0:<br /> new_title = title[:-(surplus + 4)] + '...'<br /> tweet = tweet.replace(title, new_title)<br /> return tweet</code><br /> Метод tweet_status() отправляет твит. Здесь мы используем импортированный объект api (из config.py) для отправки твита, а также запишем в лог информацию об успешной отправке или об ошибке:</p> <p><code>def tweet_status(tweet):<br /> try:<br /> api.update_status(tweet)<br /> logging.info('Posted to Twitter')<br /> except Exception as exc:<br /> logging.error('Error posting to Twitter: {}'.format(exc))</code><br /> Будем запускать наш скрипт из main. Также я добавил несколько переменных для проверок:</p> <p><code>if __name__ == '__main__':<br /> import socket<br /> local = 'MacBook' in socket.gethostname()<br /> test = local or 'dry' in sys.argv[1:]</code><br /> В режиме тестирования я использую локальный файл LOG:</p> <p><code> if test:<br /> log = os.path.basename(LOG)<br /> with open(log) as f:<br /> html = f.readlines()<br /> else:<br /> html = get_log()</code><br /> Если по какой-то причине я не смогу получить данные из get_day_progress(), скрипт прекратит работу и в лог запишется ошибка:</p> <p><code> m = get_day_progress(html)<br /> if not m:<br /> logging.error('Error getting day progress from log')<br /> sys.exit(1)</code><br /> Создаём твит. В режиме тестирования просто запишем его в лог, иначе — отправляем:</p> <p><code> tweet = create_tweet(m)<br /> if test:<br /> logging.info('Test: tweet to send: {}'.format(tweet))<br /> else:<br /> tweet_status(tweet)</code></p> <h6>Деплой</h6> <p>Есть несколько вещей, которые необходимо сделать для работы нашей программы: source .bashrc для загрузки переменных среды, экспортировать PYTHONPATH, задать полный путь до python3. И как <a href="https://unix.stackexchange.com/questions/27289/how-can-i-run-a-cron-command-with-existing-environmental-variables/27291#27291" target="_blank">сказано здесь</a>: «Cron ничего не знает о вашей оболочке; он запускается системой, поэтому у него минимум данных о среде.»</p> <p><code>$ crontab -l<br /> ...<br /> 34 14 * * * source $HOME/.bashrc && export PYTHONPATH=$HOME/bin/python3/lib/python3.5/site-packages && cd $HOME/code/100days/007 && $HOME/bin/python3/bin/python3.5 100day_autotweet.py</code></p> <h6>Результат</h6> <p>Какое совпадение: твит о прогрессе за сегодня как раз ушёл 🙂</p> <p><img title="Как мы автоматизировали ежедневный твит проекта 100DaysOfCode" data-flat-attr="img" src="https://tehnojam.pro/uploads/images/00/00/24/2017/04/21/a7ac1c02ac.png" class="image-center" alt="Как мы автоматизировали ежедневный твит проекта 100DaysOfCode" /></p> <h6>Логгирование</h6> <p>Очень полезная фишка модуля логгирования — автоматическое получение лога всех внешних модулей. Посмотрите в лог, там намного больше, чем пишет моя программа:</p> <p><code>$ vi 100day_autotweet.log<br /> ...<br /> ...<br /> 14:34:02 tweepy.binder INFO PARAMS: {'status': b'#100DaysOfCode - Day 007: script to automatically tweet 100DayOfCode progress tweet https://github.com/pybites/100DaysOfCode/tree/master/007 #Python'}<br /> ...<br /> many more log entries ...<br /> ...<br /> 14:34:02 requests.packages.urllib3.connectionpool DEBUG https://api.twitter.com:443 "POST /1.1/statuses/update.json?status=%23100DaysOfCode+-+Day+007%3A+script+to+automatically+tweet+100DayOfCode+progress+tweet+https%3A%2F%2Fgithub.com%2Fpybites%2F100DaysOfCode%2Ftree%2Fmaster%2F007+%23Python HTTP/1.1" 200 2693<br /> 14:34:02 root INFO Posted to Twitter ==> my message</code><br /> Конечно, это можно отключить, повысив уровень логгирования (INFO или ещё выше) в logging.basicConfig (в config.py). Ну и почитайте <a href="https://docs.python.org/3/library/logging.html" target="_blank">документацию</a> про это.</p> <p>По материалам «How we Automated our 100DaysOfCode Daily Tweet».</p> <div class="flat_pm_end"></div> <div class="saboxplugin-wrap" itemtype="http://schema.org/Person" itemscope itemprop="author"><div class="saboxplugin-gravatar"><img title="Как мы автоматизировали ежедневный твит проекта 100DaysOfCode" alt="Как мы автоматизировали ежедневный твит проекта 100DaysOfCode" alt='' src='https://secure.gravatar.com/avatar/3c9a724edc3d5745342294aed20872a8?s=100&d=mm&r=g' srcset='https://secure.gravatar.com/avatar/3c9a724edc3d5745342294aed20872a8?s=200&d=mm&r=g 2x' class='avatar avatar-100 photo' height='100' width='100' itemprop="image"/></div><div class="saboxplugin-authorname"><a href="https://tehnojam.pro/category/author/fokusov" class="vcard author" rel="author" itemprop="url"><span class="fn" itemprop="name">Фокусов Игорь</span></a></div><div class="saboxplugin-desc"><div itemprop="description"><p>Разработчик: java, kotlin, c#, javascript, dart, 1C, python, php.</p> <p>Пишите: <a href="https://t.me/ighar">@ighar</a>. <a href="https://money.yandex.ru/to/410011020365993">Buy me a coffee, please</a> :).</p> </div></div><div class="clearfix"></div><div class="saboxplugin-socials "><a target="_self" href="mailto:igor@fokusov.com" rel="nofollow" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-user_email" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"></path></svg></span></a></div></div><div class="post-views post-504 entry-meta"> <span class="post-views-icon fa fa-eye"></span> <span class="post-views-count">0</span> </div> </div><!-- .entry-content --> <div id="post-ratings-504" class="post-ratings" itemscope itemtype="http://schema.org/Article" data-nonce="cfc5422626"><img id="rating_504_1" src="https://tehnojam.pro/wp-content/plugins/wp-postratings/images/rating_off.svg" alt="Звёзд: 1" title="Звёзд: 1" onmouseover="current_rating(504, 1, 'Звёзд: 1');" onmouseout="ratings_off(0, 0, 0);" onclick="rate_post();" onkeypress="rate_post();" style="cursor: pointer; border: 0px;" /><img id="rating_504_2" src="https://tehnojam.pro/wp-content/plugins/wp-postratings/images/rating_off.svg" alt="Звёзд: 2" title="Звёзд: 2" onmouseover="current_rating(504, 2, 'Звёзд: 2');" onmouseout="ratings_off(0, 0, 0);" onclick="rate_post();" onkeypress="rate_post();" style="cursor: pointer; border: 0px;" /><img id="rating_504_3" src="https://tehnojam.pro/wp-content/plugins/wp-postratings/images/rating_off.svg" alt="" title="" onmouseover="current_rating(504, 3, '');" onmouseout="ratings_off(0, 0, 0);" onclick="rate_post();" onkeypress="rate_post();" style="cursor: pointer; border: 0px;" /><img id="rating_504_4" src="https://tehnojam.pro/wp-content/plugins/wp-postratings/images/rating_off.svg" alt="" title="" onmouseover="current_rating(504, 4, '');" onmouseout="ratings_off(0, 0, 0);" onclick="rate_post();" onkeypress="rate_post();" style="cursor: pointer; border: 0px;" /><img id="rating_504_5" src="https://tehnojam.pro/wp-content/plugins/wp-postratings/images/rating_off.svg" alt="" title="" onmouseover="current_rating(504, 5, '');" onmouseout="ratings_off(0, 0, 0);" onclick="rate_post();" onkeypress="rate_post();" style="cursor: pointer; border: 0px;" /> (Пока оценок нет)<br /><span class="post-ratings-text" id="ratings_504_text"></span><meta itemprop="headline" content="Как мы автоматизировали ежедневный твит проекта 100DaysOfCode" /><meta itemprop="description" content=" В этом посте я покажу вам способ сделать автоматический твит о прогрессе в испытании #100DaysOfCode Challenge. После этого у вас останется больше времени на разработку. Супер, да? Это день 007 на..." /><meta itemprop="datePublished" content="2017-04-21T13:09:38+00:00" /><meta itemprop="dateModified" content="2019-01-04T17:28:00+00:00" /><meta itemprop="url" content="https://tehnojam.pro/category/development/kak-my-avtomatizirovali-ezhednevnyj-tvit-proekta-100daysofcode.html" /><meta itemprop="author" content="Фокусов Игорь" /><meta itemprop="mainEntityOfPage" content="https://tehnojam.pro/category/development/kak-my-avtomatizirovali-ezhednevnyj-tvit-proekta-100daysofcode.html" /><div style="display: none;" itemprop="publisher" itemscope itemtype="https://schema.org/Organization"><meta itemprop="name" content="Техноджем" /><div itemprop="logo" itemscope itemtype="https://schema.org/ImageObject"><meta itemprop="url" content="" /></div></div></div><div id="post-ratings-504-loading" class="post-ratings-loading"> <img src="https://tehnojam.pro/wp-content/plugins/wp-postratings/images/loading.gif" width="16" height="16" class="post-ratings-image" /> Загрузка...</div> <footer class="entry-meta"> <span class="cat-links"><span class="screen-reader-text">Categories </span><a href="https://tehnojam.pro/category/category/development" rel="category tag">Разработка</a></span> <nav id="nav-below" class="post-navigation"> <span class="screen-reader-text">Post navigation</span> <div class="nav-previous"><span class="prev" title="Previous"><a href="https://tehnojam.pro/category/development/generirovanie-dokumentov-odt-s-secretary-v-django.html" rel="prev">Генерирование документов ODT с Secretary в Django</a></span></div><div class="nav-next"><span class="next" title="Next"><a href="https://tehnojam.pro/category/back-to-the-future/baidu-vypustit-svobodnuju-operacionnuju-sistemu-dlja-bespilotnyh-avtomobilej.html" rel="next">Baidu выпустит свободную операционную систему для беспилотных автомобилей</a></span></div> </nav><!-- #nav-below --> </footer><!-- .entry-meta --> </div><!-- .inside-article --> </article><!-- #post-## --> <div class="comments-area"> <div id="comments"> <div id="respond" class="comment-respond"> <h3 id="reply-title" class="comment-reply-title">Leave a Comment <small><a rel="nofollow" id="cancel-comment-reply-link" href="/category/development/kak-my-avtomatizirovali-ezhednevnyj-tvit-proekta-100daysofcode.html#respond" style="display:none;">Отменить ответ</a></small></h3> <form action="https://tehnojam.pro/wp-comments-post.php" method="post" id="commentform" class="comment-form" novalidate> <p class="comment-form-comment"><label for="comment" class="screen-reader-text">Comment</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p><label for="author" class="screen-reader-text">Name</label><input placeholder="Name *" id="author" name="author" type="text" value="" size="30" /> <label for="email" class="screen-reader-text">Email</label><input placeholder="Email *" id="email" name="email" type="email" value="" size="30" /> <label for="url" class="screen-reader-text">Website</label><input placeholder="Website" id="url" name="url" type="url" value="" size="30" /> <div class="gglcptch gglcptch_v2"><div id="gglcptch_recaptcha_1975269131" class="gglcptch_recaptcha"></div> <noscript> <div style="width: 302px;"> <div style="width: 302px; height: 422px; position: relative;"> <div style="width: 302px; height: 422px; position: absolute;"> <iframe src="https://www.google.com/recaptcha/api/fallback?k=6LdLqnYUAAAAAKcMT7b_RIlsSEvVHpIWIBaI6X-x" frameborder="0" scrolling="no" style="width: 302px; height:422px; border-style: none;"></iframe> </div> </div> <div style="border-style: none; bottom: 12px; left: 25px; margin: 0px; padding: 0px; right: 25px; background: #f9f9f9; border: 1px solid #c1c1c1; border-radius: 3px; height: 60px; width: 300px;"> <textarea id="g-recaptcha-response" name="g-recaptcha-response" class="g-recaptcha-response" style="width: 250px !important; height: 40px !important; border: 1px solid #c1c1c1 !important; margin: 10px 25px !important; padding: 0px !important; resize: none !important;"></textarea> </div> </div> </noscript></div><p class="form-submit"><input name="submit" type="submit" id="submit" class="submit" value="Post Comment" /> <input type='hidden' name='comment_post_ID' value='504' id='comment_post_ID' /> <input type='hidden' name='comment_parent' id='comment_parent' value='0' /> </p><p style="display: none;"><input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="1612ad467f" /></p><p style="display: none;"><input type="hidden" id="ak_js" name="ak_js" value="231"/></p> </form> </div><!-- #respond --> </div><!-- #comments --> </div> </main><!-- #main --> </div><!-- #primary --> <div id="right-sidebar" itemtype="https://schema.org/WPSideBar" itemscope="itemscope" class="widget-area grid-25 tablet-grid-25 grid-parent sidebar"> <div class="inside-right-sidebar"> <aside id="social_icon_widget-2" class="widget inner-padding widget_social_icon_widget"><h2 class="widget-title">Подпишись на нас</h2><a title="Twitter" target="_blank" href="https://twitter.com/tehnojampro"><i class="fa fa-twitter"></i></a><a title="Facebook" target="_blank" href="https://www.facebook.com/tehnojam"><i class="fa fa-facebook"></i></a><a title="Google Plus" target="_blank" href="https://plus.google.com/communities/101049307081024540315"><i class="fa fa-google-plus"></i></a><a title="Telegram" target="_blank" href="http://t.me/tehnojam"><i class="fa fa-telegram"></i></a><a title="VK" target="_blank" href="https://vk.com/tehnojam"><i class="fa fa-vk"></i></a></aside><aside id="custom_html-4" class="widget_text widget inner-padding widget_custom_html"><h2 class="widget-title">Реклама</h2><div class="textwidget custom-html-widget"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Медийка справа в виджете --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5559417666721130" data-ad-slot="9069015476" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script></div></aside><aside id="categories-2" class="widget inner-padding widget_categories"><h2 class="widget-title">Категории</h2> <ul> <li class="cat-item cat-item-113"><a href="https://tehnojam.pro/category/category/it-comics" title="В Этой категории размещаются юморные картинки и комиксы из мира IT">IT Комиксы</a> </li> <li class="cat-item cat-item-1"><a href="https://tehnojam.pro/category/category/%d0%b1%d0%b5%d0%b7-%d1%80%d1%83%d0%b1%d1%80%d0%b8%d0%ba%d0%b8" >Без рубрики</a> </li> <li class="cat-item cat-item-12"><a href="https://tehnojam.pro/category/category/secure" title="В этой категории размещаются статьи о компьютерной и интернет безопасности">Безопасность</a> </li> <li class="cat-item cat-item-8"><a href="https://tehnojam.pro/category/category/hardware" title="Категория о компьютерном железе, презентации нового оборудования и обсуждения старого оборудования.">Железо</a> </li> <li class="cat-item cat-item-10"><a href="https://tehnojam.pro/category/category/internet-of-things" title="Интернет вещей всё плотнее входит в нашу жизнь, потому эта рубрика об этом.">Интернет вещей</a> </li> <li class="cat-item cat-item-9"><a href="https://tehnojam.pro/category/category/back-to-the-future" title="Статьи о новейших технологиях">Назад в будущее</a> </li> <li class="cat-item cat-item-6"><a href="https://tehnojam.pro/category/category/it-news" title="Здесь размещаются Новости мира информационных технологий">Новости IT</a> </li> <li class="cat-item cat-item-5"><a href="https://tehnojam.pro/category/category/development" title="Статьи так или иначе касающиеся разработки программного обеспечения. Здесь размещаются мануалы и практическое руководство мира разработки.">Разработка</a> </li> <li class="cat-item cat-item-4"><a href="https://tehnojam.pro/category/category/software" title="Категория со статьями о программном обеспечении">Софт</a> </li> <li class="cat-item cat-item-11"><a href="https://tehnojam.pro/category/category/itagregator" >Техноагрегатор</a> </li> <li class="cat-item cat-item-7"><a href="https://tehnojam.pro/category/category/technologies" title="Статьи о новых технологиях и инновациях">Технологии</a> </li> </ul> </aside><aside id="better_recent_comments-2" class="widget inner-padding widget_recent_comments"><h2 class="widget-title">Свежие комментарии</h2><ul id="better-recent-comments" class="recent-comments-list with-avatars"><li class="recentcomments recent-comment"><div class="comment-wrap" style="padding-left:50px; min-height:44px;"><span class="comment-avatar"><img alt='' src='https://secure.gravatar.com/avatar/62fb696295b595ebfb83e4df903cf085?s=40&d=mm&r=g' srcset='https://secure.gravatar.com/avatar/62fb696295b595ebfb83e4df903cf085?s=80&d=mm&r=g 2x' class='avatar avatar-40 photo' height='40' width='40' /></span> <span class="comment-author-link">Viktor</span> on <span class="comment-post"><a href="https://tehnojam.pro/category/software/esli-treshit-zvuk-v-hackintosh-i-speshat-chasy.html#comment-399">Eсли трещит звук в hackintosh и спешат часы</a></span></div></li><li class="recentcomments recent-comment"><div class="comment-wrap" style="padding-left:50px; min-height:44px;"><span class="comment-avatar"><img alt='' src='https://secure.gravatar.com/avatar/0cac5b32966eaea613c5c04553c315b5?s=40&d=mm&r=g' srcset='https://secure.gravatar.com/avatar/0cac5b32966eaea613c5c04553c315b5?s=80&d=mm&r=g 2x' class='avatar avatar-40 photo' height='40' width='40' /></span> <span class="comment-author-link">Nikolay</span> on <span class="comment-post"><a href="https://tehnojam.pro/category/software/delaem-krasivye-shrifty-s-novym-freetype2-v-linux.html#comment-396">Делаем красивые шрифты с новым freetype2 в Linux</a></span></div></li><li class="recentcomments recent-comment"><div class="comment-wrap" style="padding-left:50px; min-height:44px;"><span class="comment-avatar"><img alt='' src='https://secure.gravatar.com/avatar/0c40ffbd3645e1b4478470fe161e91cf?s=40&d=mm&r=g' srcset='https://secure.gravatar.com/avatar/0c40ffbd3645e1b4478470fe161e91cf?s=80&d=mm&r=g 2x' class='avatar avatar-40 photo' height='40' width='40' /></span> <span class="comment-author-link"><span data-link='https://t.me/Doorway4ik' data-rel='external nofollow' class='link url'>manjarqo</span></span> on <span class="comment-post"><a href="https://tehnojam.pro/category/software/kak-perenesti-mac-os-khakintosh-na-ssd.html#comment-389">Перенос системы Mac OS Mojave на SSD или новый жесткий диск</a></span></div></li><li class="recentcomments recent-comment"><div class="comment-wrap" style="padding-left:50px; min-height:44px;"><span class="comment-avatar"><img alt='' src='https://secure.gravatar.com/avatar/1834192d3ae1a326193ce6a1e3f1a545?s=40&d=mm&r=g' srcset='https://secure.gravatar.com/avatar/1834192d3ae1a326193ce6a1e3f1a545?s=80&d=mm&r=g 2x' class='avatar avatar-40 photo' height='40' width='40' /></span> <span class="comment-author-link">HiJacker</span> on <span class="comment-post"><a href="https://tehnojam.pro/category/software/kak-perenesti-mac-os-khakintosh-na-ssd.html#comment-388">Перенос системы Mac OS Mojave на SSD или новый жесткий диск</a></span></div></li><li class="recentcomments recent-comment"><div class="comment-wrap" style="padding-left:50px; min-height:44px;"><span class="comment-avatar"><img alt='' src='https://secure.gravatar.com/avatar/0c40ffbd3645e1b4478470fe161e91cf?s=40&d=mm&r=g' srcset='https://secure.gravatar.com/avatar/0c40ffbd3645e1b4478470fe161e91cf?s=80&d=mm&r=g 2x' class='avatar avatar-40 photo' height='40' width='40' /></span> <span class="comment-author-link"><span data-link='https://t.me/Doorway4ik' data-rel='external nofollow' class='link url'>manjarqo</span></span> on <span class="comment-post"><a href="https://tehnojam.pro/category/software/3-krutie-programmy-pc.html#comment-386">Три маст хэв программы для Windows 10 и не только</a></span></div></li><li class="recentcomments recent-comment"><div class="comment-wrap" style="padding-left:50px; min-height:44px;"><span class="comment-avatar"><img alt='' src='https://secure.gravatar.com/avatar/bc1c06e1e5a686a2530c186d0dfc070a?s=40&d=mm&r=g' srcset='https://secure.gravatar.com/avatar/bc1c06e1e5a686a2530c186d0dfc070a?s=80&d=mm&r=g 2x' class='avatar avatar-40 photo' height='40' width='40' /></span> <span class="comment-author-link">Бульк Водичкович</span> on <span class="comment-post"><a href="https://tehnojam.pro/category/software/3-krutie-programmy-pc.html#comment-385">Три маст хэв программы для Windows 10 и не только</a></span></div></li></ul></aside><aside id="recent-posts-widget-with-thumbnails-2" class="widget inner-padding recent-posts-widget-with-thumbnails"><div id="rpwwt-recent-posts-widget-with-thumbnails-2" class="rpwwt-widget"> <h2 class="widget-title">Свежие записи</h2> <ul> <li><a href="https://tehnojam.pro/category/software/3-krutie-programmy-pc.html"><img width="70" height="70" src="https://tehnojam.pro/wp-content/uploads/2019/02/musthaveprilojeniya-150x150.jpg" class="attachment-70x70 size-70x70 wp-post-image" alt="" /><span class="rpwwt-post-title">Три маст хэв программы для Windows 10 и не только</span></a></li> <li><a href="https://tehnojam.pro/category/software/chuvak-kak-sdelat-dorvej.html"><img width="70" height="70" src="https://tehnojam.pro/wp-content/uploads/2019/01/open-doors-150x150.jpg" class="attachment-70x70 size-70x70 wp-post-image" alt="Дорвеи путь к свободе" /><span class="rpwwt-post-title">Чувак, как сделать дорвей?</span></a></li> <li><a href="https://tehnojam.pro/category/software/esli-ne-podhodit-parol-k-adminke-wordpress.html"><img width="70" height="70" src="https://tehnojam.pro/wp-content/uploads/2019/01/wordpress-password-150x150.png" class="attachment-70x70 size-70x70 wp-post-image" alt="забыт парол wordpress" /><span class="rpwwt-post-title">Если не подходит пароль к админке wordpress</span></a></li> <li><a href="https://tehnojam.pro/category/software/saity-dorvei-chto-eto.html"><img width="70" height="70" src="https://tehnojam.pro/wp-content/uploads/2019/01/doorway-150x150.jpg" class="attachment-70x70 size-70x70 wp-post-image" alt="дорвеи для нищебродов" /><span class="rpwwt-post-title">Дорвеи — путь к финансовой свободе?</span></a></li> <li><a href="https://tehnojam.pro/category/software/pokazat-skritie-fayli.html"><img width="70" height="70" src="https://tehnojam.pro/wp-content/uploads/2018/12/hiddenfilesmac-150x150.jpg" class="attachment-70x70 size-70x70 wp-post-image" alt="скрытые папки mac os" /><span class="rpwwt-post-title">Отображение скрытых файлов и папок в Mac OS X</span></a></li> <li><a href="https://tehnojam.pro/category/software/kak-uznat-versiju-linuks.html"><img width="70" height="70" src="https://tehnojam.pro/wp-content/uploads/2018/12/uznatversiyulinux-150x150.jpg" class="attachment-70x70 size-70x70 wp-post-image" alt="как посмотреть версию linux команда" /><span class="rpwwt-post-title">Как узнать версию Линукс? Как узнать версию ядра Linux?</span></a></li> </ul> </div><!-- .rpwwt-widget --> </aside> </div><!-- .inside-right-sidebar --> </div><!-- #secondary --> </div><!-- #content --> </div><!-- #page --> <div class="site-footer grid-container grid-parent "> <footer class="site-info" itemtype="https://schema.org/WPFooter" itemscope="itemscope"> <div class="inside-site-info grid-container grid-parent"> <div class="copyright-bar"> © 2018 All rights reserved Tehnojam.pro </div> </div> </footer><!-- .site-info --> </div><!-- .site-footer --> <a title="Scroll back to top" rel="nofollow" href="#" class="koromo-back-to-top" style="opacity:0;visibility:hidden;" data-scroll-speed="400" data-start-scroll="300"> <span class="screen-reader-text">Scroll back to top</span> </a> <div class="koromo-side-left-cover"></div> <div class="koromo-side-right-cover"></div> </div> <link rel='stylesheet' id='hljstheme-css' href='https://tehnojam.pro/wp-content/plugins/wp-code-highlightjs/styles/atom-one-dark.css?ver=0.6.2' type='text/css' media='all' /> <link rel='stylesheet' id='gglcptch-css' href='https://tehnojam.pro/wp-content/plugins/google-captcha/css/gglcptch.css?ver=1.42' type='text/css' media='all' /> <script type='text/javascript'> /* <![CDATA[ */ var wpcf7 = {"apiSettings":{"root":"https:\/\/tehnojam.pro\/wp-json\/contact-form-7\/v1","namespace":"contact-form-7\/v1"}}; /* ]]> */ </script> <script type='text/javascript' src='https://tehnojam.pro/wp-content/plugins/contact-form-7/includes/js/scripts.js?ver=5.1.1'></script> <script type='text/javascript'> /* <![CDATA[ */ var PT_CV_PUBLIC = {"_prefix":"pt-cv-","page_to_show":"5","_nonce":"734e3b8b5c","is_admin":"","is_mobile":"","ajaxurl":"https:\/\/tehnojam.pro\/wp-admin\/admin-ajax.php","lang":"","loading_image_src":"data:image\/gif;base64,R0lGODlhDwAPALMPAMrKygwMDJOTkz09PZWVla+vr3p6euTk5M7OzuXl5TMzMwAAAJmZmWZmZszMzP\/\/\/yH\/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgAPACwAAAAADwAPAAAEQvDJaZaZOIcV8iQK8VRX4iTYoAwZ4iCYoAjZ4RxejhVNoT+mRGP4cyF4Pp0N98sBGIBMEMOotl6YZ3S61Bmbkm4mAgAh+QQFCgAPACwAAAAADQANAAAENPDJSRSZeA418itN8QiK8BiLITVsFiyBBIoYqnoewAD4xPw9iY4XLGYSjkQR4UAUD45DLwIAIfkEBQoADwAsAAAAAA8ACQAABC\/wyVlamTi3nSdgwFNdhEJgTJoNyoB9ISYoQmdjiZPcj7EYCAeCF1gEDo4Dz2eIAAAh+QQFCgAPACwCAAAADQANAAAEM\/DJBxiYeLKdX3IJZT1FU0iIg2RNKx3OkZVnZ98ToRD4MyiDnkAh6BkNC0MvsAj0kMpHBAAh+QQFCgAPACwGAAAACQAPAAAEMDC59KpFDll73HkAA2wVY5KgiK5b0RRoI6MuzG6EQqCDMlSGheEhUAgqgUUAFRySIgAh+QQFCgAPACwCAAIADQANAAAEM\/DJKZNLND\/kkKaHc3xk+QAMYDKsiaqmZCxGVjSFFCxB1vwy2oOgIDxuucxAMTAJFAJNBAAh+QQFCgAPACwAAAYADwAJAAAEMNAs86q1yaWwwv2Ig0jUZx3OYa4XoRAfwADXoAwfo1+CIjyFRuEho60aSNYlOPxEAAAh+QQFCgAPACwAAAIADQANAAAENPA9s4y8+IUVcqaWJ4qEQozSoAzoIyhCK2NFU2SJk0hNnyEOhKR2AzAAj4Pj4GE4W0bkJQIAOw==","is_mobile_tablet":"","sf_no_post_found":"\u0417\u0430\u043f\u0438\u0441\u0435\u0439 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e."}; var PT_CV_PAGINATION = {"first":"\u00ab","prev":"\u2039","next":"\u203a","last":"\u00bb","goto_first":"\u041d\u0430 \u043f\u0435\u0440\u0432\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443","goto_prev":"\u041d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443","goto_next":"\u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443","goto_last":"\u041d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443","current_page":"\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","goto_page":"\u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443"}; /* ]]> */ </script> <script type='text/javascript' src='https://tehnojam.pro/wp-content/plugins/content-views-query-and-display-post-page/public/assets/js/cv.js?ver=2.1.3.2'></script> <script type='text/javascript' src='https://tehnojam.pro/wp-content/plugins/pt-content-views-pro/public/assets/js/cvpro.min.js?ver=5.4.1'></script> <script type='text/javascript'> /* <![CDATA[ */ var pvcArgsFrontend = {"mode":"ajax","requestURL":"https:\/\/tehnojam.pro\/wp-content\/plugins\/post-views-counter\/includes\/ajax.php","postID":"504","nonce":"b0ea627b1b"}; /* ]]> */ </script> <script type='text/javascript' src='https://tehnojam.pro/wp-content/plugins/post-views-counter/js/frontend.js?ver=1.2.14'></script> <script type='text/javascript'> /* <![CDATA[ */ var sticky_anything_engage = {"element":".main-nav","topspace":"0","minscreenwidth":"760","maxscreenwidth":"999999","zindex":"99999999999999999","legacymode":"","dynamicmode":"","debugmode":"","pushup":"","adminbar":"1"}; /* ]]> */ </script> <script type='text/javascript' src='https://tehnojam.pro/wp-content/plugins/sticky-menu-or-anything-on-scroll/assets/js/stickThis.js?ver=2.1.1'></script> <script type='text/javascript'> /* <![CDATA[ */ var ratingsL10n = {"plugin_url":"https:\/\/tehnojam.pro\/wp-content\/plugins\/wp-postratings","ajax_url":"https:\/\/tehnojam.pro\/wp-admin\/admin-ajax.php","text_wait":"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043d\u0435 \u0433\u043e\u043b\u043e\u0441\u0443\u0439\u0442\u0435 \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e.","image":"","image_ext":"svg","max":"5","show_loading":"1","show_fading":"1","custom":"0"}; var ratings_mouseover_image=new Image();ratings_mouseover_image.src="https://tehnojam.pro/wp-content/plugins/wp-postratings/images//rating_over.svg";; /* ]]> */ </script> <script type='text/javascript' src='https://tehnojam.pro/wp-content/plugins/wp-postratings/js/postratings-js.js?ver=1.86.2'></script> <script type='text/javascript' src='https://tehnojam.pro/wp-content/plugins/yuzo-related-post/assets/js/jquery.equalizer.js?ver=5.12.89'></script> <!--[if lte IE 11]> <script type='text/javascript' src='https://tehnojam.pro/wp-content/themes/Koromo/js/classList.min.js?ver=1.0.1'></script> <![endif]--> <script type='text/javascript' src='https://tehnojam.pro/wp-content/themes/Koromo/js/menu.min.js?ver=1.0.1'></script> <script type='text/javascript' src='https://tehnojam.pro/wp-content/themes/Koromo/js/a11y.min.js?ver=1.0.1'></script> <script type='text/javascript' src='https://tehnojam.pro/wp-content/themes/Koromo/js/navigation-search.min.js?ver=1.0.1'></script> <script type='text/javascript' src='https://tehnojam.pro/wp-content/themes/Koromo/js/back-to-top.min.js?ver=1.0.1'></script> <script type='text/javascript' src='https://tehnojam.pro/wp-includes/js/comment-reply.min.js?ver=5.1.1'></script> <script type='text/javascript' src='https://tehnojam.pro/wp-content/plugins/q2w3-fixed-widget/js/q2w3-fixed-widget.min.js?ver=5.1.5'></script> <script type='text/javascript' src='https://tehnojam.pro/wp-includes/js/wp-embed.min.js?ver=5.1.1'></script> <script type='text/javascript' src='https://tehnojam.pro/wp-content/plugins/wp-code-highlightjs/highlight.common.pack.js?ver=0.6.2'></script> <script async="async" type='text/javascript' src='https://tehnojam.pro/wp-content/plugins/akismet/_inc/form.js?ver=4.1.1'></script> <script type='text/javascript' data-cfasync="false" async="async" defer="defer" src='https://www.google.com/recaptcha/api.js?render=explicit&ver=1.42'></script> <script type='text/javascript'> /* <![CDATA[ */ var gglcptch = {"options":{"version":"v2","sitekey":"6LdLqnYUAAAAAKcMT7b_RIlsSEvVHpIWIBaI6X-x","theme":"dark","error":"<strong>\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/strong>: \u0412 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0444\u043e\u0440\u043c\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 reCAPTCHA. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u0432\u0441\u0435 \u043b\u0438\u0448\u043d\u0438\u0435 \u0431\u043b\u043e\u043a\u0438 reCAPTCHA \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b."},"vars":{"visibility":false}}; /* ]]> */ </script> <script type='text/javascript' src='https://tehnojam.pro/wp-content/plugins/google-captcha/js/script.js?ver=1.42'></script> <style>code.hljs { /*margin: 5px;*/ }</style> <script type="text/javascript"> (function($, window) { var init_fn_flag = false; var init_fn = (function() { if (init_fn_flag) return; init_fn_flag = true; hljs.configure({"tabReplace":" "}); $('pre code').each(function(i, block) { hljs.highlightBlock(block); }); }); $(document).ready(init_fn); $(window).on("load", init_fn); })(jQuery, window); </script> <script type="text/javascript"> /*<![CDATA[*/ jQuery(document).ready(function($){ $('.link').replaceWith(function(){ var id = ( null != $(this).attr('id') ) ? ' id="' + $(this).attr('id') + '"' : '', target = ( null != $(this).attr('data-target') ) ? ' target="' + $(this).attr('data-target') + '"' : ' target="_blank"', title = ( null != $(this).attr('title') ) ? ' title="' + $(this).attr('title') + '"' : '', style = ( null != $(this).attr('style') ) ? ' style="' + $(this).attr('style') + '"' : '', rel = ( null != $(this).attr('data-rel') ) ? ' rel="' + $(this).attr('data-rel') + '"' : ' rel="noopener"', cl = ( null != $(this).attr('class') ) ? $(this).attr('class').replace('link','').trim() : ''; cl = ( '' != cl ) ? ' class="' + cl + '"' : ''; return '<a href="' + $(this).attr('data-link') + '" ' + title + id + cl + target + style + rel + ' >' + $(this).html() + '</a>'; }); }); /*]]>*/ </script> <div id="adsense" style="position:absolute;left:-9999px;" >Adblock detector</div> <script type="text/javascript"> var detectAdb_var=!1;function detectAdb(){var e=document.getElementById("adsense"),t=e.currentStyle||window.getComputedStyle(e,null);t=parseInt(t.height),(isNaN(t)||0==t)&&(detectAdb_var=!0),e.style.display="none"}detectAdb(); </script> <style> .arcticmodal-overlay,.arcticmodal-container{position:fixed;left:0;top:0;right:0;bottom:0;z-index:1000}.arcticmodal-container{overflow:auto;margin:0;padding:0;border:0;border-collapse:collapse}:first-child+html .arcticmodal-container{height:100%}.arcticmodal-container_i{height:100%;margin:0 auto}.arcticmodal-container_i2{padding:24px;margin:0;border:0;vertical-align:middle}.arcticmodal-error{padding:20px;border-radius:10px;background:#000;color:#fff}.arcticmodal-loading{width:80px;height:80px;border-radius:10px;background:#000 no-repeat 50% 50%}.box-modal{position:relative;width:655px;min-height:120px;padding:20px;background:#fff;color:#3c3c3c;border-radius:5px}.light-modal{position:relative;width:0;height:0;box-shadow:0 0 0 6px rgba(153,153,153,.3);border-radius:5px;opacity:0}#big-modal{width:655px}#middle-modal{width:455px}#small-modal{width:255px}#feedback-modal-box{width:300px}#feedback-modal-box #feedback-infolist{list-style:none;display:table;width:100%;height:100%;margin:0;padding:0}#feedback-modal-box #feedback-infolist li{text-align:center;font-size:110%;display:table-cell;vertical-align:middle;height:120px}#light-box{border-radius:5px}.modal-close{width:26px;height:26px;position:absolute;right:6px;top:6px;font-size:16px;font-weight:700;text-align:center;line-height:26px;color:#fff;background:#4497c6;cursor:pointer;border-radius:13px;font-family:Verdana}.modal-close:hover{background:#4aa5d8}.flat_pm_arcticmodal{min-width:100px;min-height:50px;position:relative;padding:10px;background:#fff}.flat_pm_cross{transition:background .2s ease;position:absolute;top:0;right:0;width:34px;height:34px;background:#000;display:block;cursor:pointer;z-index:99999}.flat_pm_cross:hover{background:#777}.flat_pm_cross:after,.flat_pm_cross:before{transition:transform .3s ease;content:'';display:block;position:absolute;top:0;left:0;right:0;bottom:0;width:16px;height:4px;background:#fff;transform-origin:center;transform:rotate(45deg);margin:auto}.flat_pm_cross:before{transform:rotate(-45deg)}.flat_pm_cross:hover:after{transform:rotate(225deg)}.flat_pm_cross:hover:before{transform:rotate(135deg)}.flat_pm_outgoing{transition:transform .3s ease;position:fixed;min-width:100px;min-height:50px}.flat_pm_outgoing.top .flat_pm_cross{top:auto;bottom:0}.flat_pm_outgoing.right .flat_pm_cross{right:auto;left:0}.flat_pm_outgoing.top{bottom:100%;left:50%;transform:translateY(0) translateX(-50%)}.flat_pm_outgoing.bottom{top:100%;left:50%;transform:translateY(0) translateX(-50%)}.flat_pm_outgoing.left{bottom:0;right:100%;transform:translateX(0)}.flat_pm_outgoing.right{bottom:0;left:100%;transform:translateX(0)}.flat_pm_outgoing.show.top{transform:translateY(100%) translateX(-50%)}.flat_pm_outgoing.show.bottom{transform:translateY(-100%) translateX(-50%)}.flat_pm_outgoing.show.left{transform:translateX(100%)}.flat_pm_outgoing.show.right{transform:translateX(-100%)} </style> <script type="text/javascript"> function flat_pm_arcticmodal_load(){ if(typeof jQuery.arcticmodal == "undefined"){ !function(a){var b={type:"html",content:"",url:"",ajax:{},ajax_request:null,closeOnEsc:!0,closeOnOverlayClick:!0,clone:!1,overlay:{block:void 0,tpl:'<div class="arcticmodal-overlay"></div>',css:{backgroundColor:"#000",opacity:.6}},container:{block:void 0,tpl:'<div class="arcticmodal-container"><table class="arcticmodal-container_i"><tr><td class="arcticmodal-container_i2"></td></tr></table></div>'},wrap:void 0,body:void 0,errors:{tpl:'<div class="arcticmodal-error arcticmodal-close"></div>',autoclose_delay:2e3,ajax_unsuccessful_load:"Error"},openEffect:{type:"fade",speed:400},closeEffect:{type:"fade",speed:400},beforeOpen:a.noop,afterOpen:a.noop,beforeClose:a.noop,afterClose:a.noop,afterLoading:a.noop,afterLoadingOnShow:a.noop,errorLoading:a.noop},c=0,d=a([]),e={isEventOut:function(b,c){var d=!0;return a(b).each(function(){a(c.target).get(0)==a(this).get(0)&&(d=!1),0==a(c.target).closest("HTML",a(this).get(0)).length&&(d=!1)}),d}},f={getParentEl:function(b){var c=a(b);return c.data("arcticmodal")?c:(c=a(b).closest(".arcticmodal-container").data("arcticmodalParentEl"),!!c&&c)},transition:function(b,c,d,e){switch(e=void 0==e?a.noop:e,d.type){case"fade":"show"==c?b.fadeIn(d.speed,e):b.fadeOut(d.speed,e);break;case"none":"show"==c?b.show():b.hide(),e()}},prepare_body:function(b,c){a(".arcticmodal-close",b.body).unbind("click.arcticmodal").bind("click.arcticmodal",function(){return c.arcticmodal("close"),!1})},init_el:function(b,h){var i=b.data("arcticmodal");if(!i){if(i=h,c++,i.modalID=c,i.overlay.block=a(i.overlay.tpl),i.overlay.block.css(i.overlay.css),i.container.block=a(i.container.tpl),i.body=a(".arcticmodal-container_i2",i.container.block),h.clone?i.body.html(b.clone(!0)):(b.before('<div id="arcticmodalReserve'+i.modalID+'" style="display: none" />'),i.body.html(b)),f.prepare_body(i,b),i.closeOnOverlayClick&&i.overlay.block.add(i.container.block).click(function(c){e.isEventOut(a(">*",i.body),c)&&b.arcticmodal("close")}),i.container.block.data("arcticmodalParentEl",b),b.data("arcticmodal",i),d=a.merge(d,b),a.proxy(g.show,b)(),"html"==i.type)return b;if(void 0!=i.ajax.beforeSend){var j=i.ajax.beforeSend;delete i.ajax.beforeSend}if(void 0!=i.ajax.success){var k=i.ajax.success;delete i.ajax.success}if(void 0!=i.ajax.error){var l=i.ajax.error;delete i.ajax.error}var m=a.extend(!0,{url:i.url,beforeSend:function(){void 0==j?i.body.html('<div class="arcticmodal-loading" />'):j(i,b)},success:function(a){b.trigger("afterLoading"),i.afterLoading(i,b,a),void 0==k?i.body.html(a):k(i,b,a),f.prepare_body(i,b),b.trigger("afterLoadingOnShow"),i.afterLoadingOnShow(i,b,a)},error:function(){b.trigger("errorLoading"),i.errorLoading(i,b),void 0==l?(i.body.html(i.errors.tpl),a(".arcticmodal-error",i.body).html(i.errors.ajax_unsuccessful_load),a(".arcticmodal-close",i.body).click(function(){return b.arcticmodal("close"),!1}),i.errors.autoclose_delay&&setTimeout(function(){b.arcticmodal("close")},i.errors.autoclose_delay)):l(i,b)}},i.ajax);i.ajax_request=a.ajax(m),b.data("arcticmodal",i)}},init:function(c){if(c=a.extend(!0,{},b,c),!a.isFunction(this))return this.each(function(){f.init_el(a(this),a.extend(!0,{},c))});if(void 0==c)return void a.error("jquery.arcticmodal: Uncorrect parameters");if(""==c.type)return void a.error('jquery.arcticmodal: Don\'t set parameter "type"');switch(c.type){case"html":if(""==c.content)return void a.error('jquery.arcticmodal: Don\'t set parameter "content"');var d=c.content;return c.content="",f.init_el(a(d),c);case"ajax":return""==c.url?void a.error('jquery.arcticmodal: Don\'t set parameter "url"'):f.init_el(a("<div />"),c)}}},g={show:function(){var b=f.getParentEl(this);if(b===!1)return void a.error("jquery.arcticmodal: Uncorrect call");var c=b.data("arcticmodal");if(c.overlay.block.hide(),c.container.block.hide(),a("BODY").append(c.overlay.block),a("BODY").append(c.container.block),c.beforeOpen(c,b),b.trigger("beforeOpen"),"hidden"!=c.wrap.css("overflow")){c.wrap.data("arcticmodalOverflow",c.wrap.css("overflow"));var e=c.wrap.outerWidth(!0);c.wrap.css("overflow","hidden");var g=c.wrap.outerWidth(!0);g!=e&&c.wrap.css("marginRight",g-e+"px")}return d.not(b).each(function(){var b=a(this).data("arcticmodal");b.overlay.block.hide()}),f.transition(c.overlay.block,"show",d.length>1?{type:"none"}:c.openEffect),f.transition(c.container.block,"show",d.length>1?{type:"none"}:c.openEffect,function(){c.afterOpen(c,b),b.trigger("afterOpen")}),b},close:function(){return a.isFunction(this)?void d.each(function(){a(this).arcticmodal("close")}):this.each(function(){var b=f.getParentEl(this);if(b===!1)return void a.error("jquery.arcticmodal: Uncorrect call");var c=b.data("arcticmodal");c.beforeClose(c,b)!==!1&&(b.trigger("beforeClose"),d.not(b).last().each(function(){var b=a(this).data("arcticmodal");b.overlay.block.show()}),f.transition(c.overlay.block,"hide",d.length>1?{type:"none"}:c.closeEffect),f.transition(c.container.block,"hide",d.length>1?{type:"none"}:c.closeEffect,function(){c.afterClose(c,b),b.trigger("afterClose"),c.clone||a("#arcticmodalReserve"+c.modalID).replaceWith(c.body.find(">*")),c.overlay.block.remove(),c.container.block.remove(),b.data("arcticmodal",null),a(".arcticmodal-container").length||(c.wrap.data("arcticmodalOverflow")&&c.wrap.css("overflow",c.wrap.data("arcticmodalOverflow")),c.wrap.css("marginRight",0))}),"ajax"==c.type&&c.ajax_request.abort(),d=d.not(b))})},setDefault:function(c){a.extend(!0,b,c)}};a(function(){b.wrap=a(document.all&&!document.querySelector?"html":"body")}),a(document).bind("keyup.arcticmodal",function(a){var b=d.last();if(b.length){var c=b.data("arcticmodal");c.closeOnEsc&&27===a.keyCode&&b.arcticmodal("close")}}),a.arcticmodal=a.fn.arcticmodal=function(b){return g[b]?g[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void a.error("jquery.arcticmodal: Method "+b+" does not exist"):f.init.apply(this,arguments)}}(jQuery); } } function randomFlat(min,max){return Math.floor(Math.random()*(max - min + 1))+min} var ajax_url_now_me = 'https://tehnojam.pro/wp-admin/admin-ajax.php'; function flat_func_before(e,t,r){setTimeout(function(){e.before(t)},r)}function flat_func_after(e,t,r){setTimeout(function(){e.after(t)},r)}function flatlsTest(){var e="test_56445";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}function flatgetCookie(e){var t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):void 0}function flatsetCookie(e,t,r){var a=(r=r||{}).expires;if("number"==typeof a&&a){var n=new Date;n.setTime(n.getTime()+1e3*a),a=r.expires=n}a&&a.toUTCString&&(r.expires=a.toUTCString());var o=e+"="+(t=encodeURIComponent(t));for(var i in r){o+="; "+i;var l=r[i];!0!==l&&(o+="="+l)}document.cookie=o}var flatDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||!1,this.OS=this.searchString(this.dataOS)||!1,this.referer=this.cookieReferer()},cookieReferer:function(){return parent!==window?"///:iframe":!0!==flatlsTest()?""!=document.referrer?document.referrer:"///:direct":(void 0===flatgetCookie("flat_r_mb")&&flatsetCookie("flat_r_mb",~window.location.search.indexOf("zen.yandex")?"///:zen":(""!=document.referrer?document.referrer:"///:direct"),{path:"/"}),flatgetCookie("flat_r_mb"))},searchString:function(e){for(var t=0;t<e.length;t++){var r=e[t].string,a=e[t].prop;if(this.versionSearchString=e[t].versionSearch||e[t].identity,r){if(-1!=r.indexOf(e[t].subString))return e[t].identity}else if(a)return e[t].identity}},dataBrowser:[{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.userAgent,subString:"YaBrowser",identity:"YaBrowser"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{string:navigator.userAgent,subString:"OPR",identity:"Opera",versionSearch:"Version"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.userAgent,subString:".NET CLR",identity:"Internet Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Edge",identity:"Edge",versionSearch:"rv"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};function next_flat_stage(e,t){if(""==e.chapter_limit||t.content_until.text().length>parseInt(e.chapter_limit)){for(var r=[],a="",n=0;n<e.html.length;n++)("∞"==e.html[n].resolution_from||e.html[n].resolution_from<=t.client_width)&&("∞"==e.html[n].resolution_to||e.html[n].resolution_to>=t.client_width)&&("0"!=e.html[n].group?t.client_block?(null==r["group_"+e.html[n].group]&&(r["group_"+e.html[n].group]=[]),r["group_"+e.html[n].group].push(e.html[n].html_block)):(null==r["group_"+e.html[n].group]&&(r["group_"+e.html[n].group]=[]),r["group_"+e.html[n].group].push(e.html[n].html_main)):t.client_block?r.push(e.html[n].html_block):r.push(e.html[n].html_main));for(var o in r)a="object"==typeof r[o]?a+"\n"+r[o][randomFlat(0,r[o].length-1)]:a+"\n"+r[o];if(""!=a){if(void 0!==e.how.simple&&("1"==e.how.simple.position&&jQuery(".flat_pm_start").after(a),"2"==e.how.simple.position&&jQuery(t.content_until[Math.round(t.content_until.length/2)]).after(a),"3"==e.how.simple.position&&jQuery(".flat_pm_end").before(a)),void 0!==e.how.onсe){if("true"==e.how.onсe.search_all)var i=jQuery("body").children();else i=t.content_until;(i=i.find(e.how.onсe.selector).add(i.filter(e.how.onсe.selector))).length>0&&(l="bottom_to_top"==e.how.onсe.direction?i.length-e.how.onсe.N:e.how.onсe.N-1,"before"==e.how.onсe.before_after?jQuery(jQuery.grep(i,function(e,t){return t==l})).before(a):jQuery(jQuery.grep(i,function(e,t){return t==l})).after(a))}if(void 0!==e.how.iterable&&(i=(i="true"==e.how.iterable.search_all?jQuery("body").children():t.content_until).find(e.how.iterable.selector).add(i.filter(e.how.iterable.selector))).length>0){var l=e.how.iterable.N,_=0;"bottom_to_top"==e.how.iterable.direction&&(i=i.get().reverse()),"before"==e.how.iterable.before_after?jQuery(jQuery.grep(i,function(e,t){return(t+1)%l==0})).each(function(){flat_func_before(jQuery(this),a,_),_+=10}):jQuery(jQuery.grep(i,function(e,t){return(t+1)%l==0})).each(function(){flat_func_after(jQuery(this),a,_),_+=10})}if(void 0!==e.how.popup){var s=!0;jQuery.arcticmodal("close"),"px"==e.how.popup.px_s?jQuery(window).scroll(function(){jQuery(this).scrollTop()>e.how.popup.after&&s&&(s=!1,jQuery('<div class="flat_pm_arcticmodal">'+("true"==e.how.popup.cross?'<div class="flat_pm_cross" onclick=""></div>':"")+a+"</div>").arcticmodal())}):setTimeout(function(){jQuery('<div class="flat_pm_arcticmodal">'+("true"==e.how.popup.cross?'<div class="flat_pm_cross" onclick=""></div>':"")+a+"</div>").arcticmodal()},1e3*e.how.popup.after),jQuery("body").on("click",".flat_pm_arcticmodal .flat_pm_cross",function(){jQuery.arcticmodal("close")})}if(void 0!==e.how.outgoing){var f;switch(s=!0,e.how.outgoing.whence){case"1":f="top";break;case"2":f="bottom";break;case"3":f="left";break;case"4":f="right"}jQuery("body").append('<div class="flat_pm_outgoing '+f+'"'+("0"!=e.how.outgoing.indent?' style="bottom:'+e.how.outgoing.indent+'px"':"")+">"+("true"==e.how.outgoing.cross?'<div class="flat_pm_cross" onclick=""></div>':"")+a+"</div>"),"px"==e.how.outgoing.px_s?jQuery(window).scroll(function(){jQuery(this).scrollTop()>e.how.outgoing.after&&s&&(s=!1,jQuery(".flat_pm_outgoing."+f).addClass("show"))}):setTimeout(function(){jQuery(".flat_pm_outgoing."+f).addClass("show")},1e3*e.how.outgoing.after),jQuery("body").on("click",".flat_pm_outgoing .flat_pm_cross",function(){jQuery(this).parent().removeClass("show")})}}}}function flat_jQuery_is_load(){if(flat_pm_arcticmodal_load(),flat_pm_arr.length>0){jQuery('[data-flat-attr="img"]').each(function(){var e=jQuery(this);e.parent().is("a")&&e.parent().attr("data-flat-attr","a-img"),e.parent().is("p")&&e.parent().attr("data-flat-attr","p-img"),e.parent().parent().is("p")&&e.parent().parent().attr("data-flat-attr","p-img")});var e=new Date,t={},r=!0;t.client_width=window.innerWidth,t.client_date=e.getFullYear()+"-"+(2==(e.getMonth()+1+"").length?e.getMonth()+1:"0"+(e.getMonth()+1))+"-"+(2==(e.getDate()+"").length?e.getDate():"0"+e.getDate()),t.client_time=(2==(e.getHours()+"").length?e.getHours():"0"+e.getHours())+":"+(2==(e.getMinutes()+"").length?e.getMinutes():"0"+e.getMinutes()),t.client_block=detectAdb_var,t.client_country,t.client_city,t.content_until=jQuery(".flat_pm_start").nextUntil(".flat_pm_end"),t.client_os=flatDetect.OS,t.client_browser=flatDetect.browser,t.client_referer=flatDetect.referer;for(var a=0;a<flat_pm_arr.length;a++){var n=!1;if(void 0!==flat_pm_arr[a].date&&("true"==flat_pm_arr[a].date.date_time_enabled&&(new Date(t.client_date+"T"+t.client_time+":00")>new Date(t.client_date+"T"+flat_pm_arr[a].date.time_to+":00")||new Date(t.client_date+"T"+t.client_time+":00")<new Date(t.client_date+"T"+flat_pm_arr[a].date.time_from+":00"))&&(n=!0),"true"==flat_pm_arr[a].date.date_date_enabled&&(new Date(t.client_date+"T00:00:00")>new Date(flat_pm_arr[a].date.date_to+"T00:00:00")||new Date(t.client_date+"T00:00:00")<new Date(flat_pm_arr[a].date.date_from+"T00:00:00"))&&(n=!0)),void 0!==flat_pm_arr[a].referer&&(""==flat_pm_arr[a].referer.referer_enabled[0]&&(flat_pm_arr[a].referer.referer_enabled=[]),""==flat_pm_arr[a].referer.referer_disabled[0]&&(flat_pm_arr[a].referer.referer_disabled=[]),(0!=flat_pm_arr[a].referer.referer_enabled.length&&-1==flat_pm_arr[a].referer.referer_enabled.findIndex(function(e){return-1!=t.client_referer.indexOf(e)})||0!=flat_pm_arr[a].referer.referer_disabled.length&&-1!=flat_pm_arr[a].referer.referer_disabled.findIndex(function(e){return-1!=t.client_referer.indexOf(e)}))&&(n=!0)),void 0!==flat_pm_arr[a].os&&(""==flat_pm_arr[a].os.os_enabled[0]&&(flat_pm_arr[a].os.os_enabled=[]),""==flat_pm_arr[a].os.os_disabled[0]&&(flat_pm_arr[a].os.os_disabled=[]),(0!=flat_pm_arr[a].os.os_enabled.length&&-1==flat_pm_arr[a].os.os_enabled.indexOf(t.client_os)||0!=flat_pm_arr[a].os.os_disabled.length&&-1!=flat_pm_arr[a].os.os_disabled.indexOf(t.client_os))&&(n=!0)),void 0!==flat_pm_arr[a].browser&&(""==flat_pm_arr[a].browser.browser_enabled[0]&&(flat_pm_arr[a].browser.browser_enabled=[]),""==flat_pm_arr[a].browser.browser_disabled[0]&&(flat_pm_arr[a].browser.browser_disabled=[]),(0!=flat_pm_arr[a].browser.browser_enabled.length&&-1==flat_pm_arr[a].browser.browser_enabled.indexOf(t.client_browser)||0!=flat_pm_arr[a].browser.browser_disabled.length&&-1!=flat_pm_arr[a].browser.browser_disabled.indexOf(t.client_browser))&&(n=!0)),void 0!==flat_pm_arr[a].global&&void 0!==flat_pm_arr[a].global.referer&&(""==flat_pm_arr[a].global.referer.referer_enabled[0]&&(flat_pm_arr[a].global.referer.referer_enabled=[]),""==flat_pm_arr[a].global.referer.referer_disabled[0]&&(flat_pm_arr[a].global.referer.referer_disabled=[]),(0!=flat_pm_arr[a].global.referer.referer_enabled.length&&-1==flat_pm_arr[a].global.referer.referer_enabled.findIndex(function(e){return-1!=t.client_referer.indexOf(e)})||0!=flat_pm_arr[a].global.referer.referer_disabled.length&&-1!=flat_pm_arr[a].global.referer.referer_disabled.findIndex(function(e){return-1!=t.client_referer.indexOf(e)}))&&(n=!0)),void 0===flat_pm_arr[a].geo||n)n||next_flat_stage(flat_pm_arr[a],t);else{function o(e){void 0!==t.client_country&&void 0!==t.client_country?(""==e.geo.city_enabled[0]&&(e.geo.city_enabled=[]),""==e.geo.city_disabled[0]&&(e.geo.city_disabled=[]),""==e.geo.country_enabled[0]&&(e.geo.country_enabled=[]),""==e.geo.country_disabled[0]&&(e.geo.country_disabled=[]),0!=e.geo.city_enabled.length&&-1==e.geo.city_enabled.indexOf(t.client_city)||0!=e.geo.city_disabled.length&&-1!=e.geo.city_disabled.indexOf(t.client_city)||0!=e.geo.country_enabled.length&&-1==e.geo.country_enabled.indexOf(t.client_country)||0!=e.geo.country_disabled.length&&-1!=e.geo.country_disabled.indexOf(t.client_country)||next_flat_stage(e,t)):setTimeout(function(){o(e)},50)}r&&(r=!1,jQuery.ajax({type:"POST",url:ajax_url_now_me,dataType:"json",data:{action:"flat_pm_geo",data_me:{method:"flat_pm_block_geo",arr:{}}},success:function(e){switch(e[0]){case"flat_pm_block_geo":t.client_country=e[1].country,t.client_city=e[1].city;break;default:console.log("Ошибочка №2")}},error:function(){console.log("Ошибочка №1")}})),o(flat_pm_arr[a])}}}}flatDetect.init(); function flat_jQuery_loading(){if(window.jQuery){flat_jQuery_is_load()}else{setTimeout(function(){flat_jQuery_loading()},50)}}setTimeout(function(){flat_jQuery_loading()},50) </script> </body> </html>