Greasy Fork is available in English.

SaveFrom.net helper

Youtube Downloader: all in one script to get Vimeo, Facebook, Dailymotion videos for free

// ==UserScript==
// @name        SaveFrom.net helper
// @namespace   http://savefrom.net/
// @version     5.75.2
// @date        2015-12-15
// @author      Magicbit, Inc
// @description Youtube Downloader: all in one script to get Vimeo, Facebook, Dailymotion videos for free
// @homepage    http://savefrom.net/user.php?helper=userjs
// @icon        http://savefrom.net/img/extension/icon_16.png
// @icon64      http://savefrom.net/img/extension/icon_64.png
// @include     http://*
// @include     https://*
// @exclude     *://google.*/*
// @exclude     *://*.google.*/*
// @exclude     *://acidtests.org/*
// @exclude     *://*.acidtests.org/*
// @run-at      document-end
// @grant       GM_setValue
// @grant       GM_getValue
// @grant       GM_xmlhttpRequest
// @grant       GM_info
// @grant       GM_openInTab
// @grant       GM_registerMenuCommand
// @grant       GM_unregisterMenuCommand
// @grant       GM_notification
// @grant       GM_download
// ==/UserScript==

(function() {
  if(typeof GM_getValue === 'undefined') {
    return;
  }

(function(){
  if (window.self == window.top || !location.hash) {
    return;
  }

  var params = location.hash.match(/sfh--download=([^\s\&]+)/i);
  params = params && params[1];
  if (!params) {
    return;
  }

  try {
    params = JSON.parse(decodeURIComponent(params));
  } catch (e) {
    return;
  }

  if (!params.url || !params.filename) {
    return;
  }

  var a = document.createElement('a');
  a.href = params.url;
  a.download = params.filename;
  a.appendChild(document.body);

  var event = document.createEvent('MouseEvents');
  event.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0,
    false, false, false, false, 0, null);

  setTimeout(function() {
    a.dispatchEvent(event);
    parent.postMessage('killMe:'+location.href, '*');
  });
})();

  var _moduleName = null;

  var _menu;
  var _options;
  var _modules = {};
  var _languageList = {};

  try {
    window.sessionStorage['savefrom-helper-userjs'] = '1';
  } catch (e) {
    return;
  }
/////////////////////////////////////////////////
// MENU
_menu = {
  activeDataAttr: 'data-sfh-active',
  id: 'sfh--ujs-menu',
  tooltipId: 'sfh--ujs-menu-tooltip',
  enabled: true,
  active: false,
  hover: false,
  move: false,
  title: '',
  shakeTimer: 0,
  shakeInterval: 10000,

  menu: null,
  icon: null,

  initMenu: null,

  style: {
    menu: {
      initial: {
        background: '#fff',
        borderStyle: 'solid',
        borderWidth: '2px 0 2px 2px',
        borderRadius: '5px 0 0 5px',
        display: 'none',
        boxSizing: 'content-box',
        font: '13px/18px Arial,Helvetica,sans-serif',
        width: 'auto',
        height: 'auto',
        padding: 0,
        margin: 0,
        overflow: 'visible',
        position: 'fixed',
        top: '50px',
        right: '0',
        textAlign: 'left',
        WebkitTransition: 'all 0.2s',
        transition: 'all 0.2s',
        zIndex: 99999
      },

      enabled: {
        borderColor: '#8dc50b'
      },

      disabled: {
        borderColor: '#d0d0d0'
      },

      tag: {
        display: 'block',
        width: '10px',
        height: '20px',
        overflow: 'hidden',
        opacity: 0.5
      },

      tagHover: {
        width: '20px',
        opacity: 0.8
      },

      active: {
        width: 'auto',
        height: 'auto',
        overflow: 'visible',
        opacity: 0.9
      }
    },

    icon: {
      initial: {
        display: 'inline-block',
        boxSizing: 'content-box',
        backgroundPosition: '50% 50%',
        backgroundRepeat: 'no-repeat',
        width: '16px',
        height: '16px',
        margin: 0,
        padding: '2px',
        overflow: 'hidden',
        verticalAlign: 'middle',
        cursor: 'pointer'
      },

      enabled: {
        backgroundImage: 'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABqUlEQVQ4jY2SzStEURiHf2bMl+w0SrHRZKPY+RtkYyeRspPFsEEZItLM3DCRjxofw0wyK0k+ClNGhBiEmIiwsrChZqvj/sZcznDJ4um8532f9+3ccy5isRg0Qre2V67hxyzxnfkHm5AdDcib6SvLC9e5e5v4TujuY4Dm6A4YPc684xq8sb6Fbq1CZkbNyU7aACVqdPhP8usGouZT7qcuLInpuFnITJ6bE6zRocuezwEdS/B2LuO+ewXJY44dmZ795yYhM6LmWKNDlz1pn+D0o6J5FjeMfbvGx9ETg5BhjjU6dHXvQMMdMcZ9BxAy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HynSbnHP5j27a5DPp4Op0eZjKZCgAQ/xZW1e12++Fw+Kq/p+v6l3Q6fW2bDfT7/aKiKBdDoZBQFEX1PC9JCJE45xsgIUQaDoevKKUjzrlp2zbhnP8gnU4nIcvyEaU0vQQNSZJmnued9QsopcPFYhERQuwtV911XXefMMbQbDbPJJPJN7Is38IJynXdj6PR6H4+n/+9zqDdbp9TVbWpKMqd/w1zzt+bppnPZrO//gmx0WicTyQSL0Oh0N1dw7ZtvxuPxweFQuHnOpvtLdTr9UuxWOyFqqr3/H3TNN9qmvaoWCx+3wh31xprtdqVaDT6PBKJ7C8/2hFj7HGpVPq6ze4UAEC1Wr0uy/KzZWhPyuXy513cWhCNRgkAAoACCAI4lcvlbgJAq9X6BMAC4ADwAAjGmACAvwMAXX8khNE72VIAAAAASUVORK5CYII=)'
      },

      tag: {padding: '2px'},
      active: {padding: '5px'}
    },

    title: {
      display: 'inline-block',
      font: 'bold 13px/18px Arial,Helvetica,sans-serif',
      lineHeight: '26px',
      margin: 0,
      padding: 0,
      textAlign: 'left',
      verticalAlign: 'middle',
      cursor: 'pointer'
    }
  },

  setTitle: function(title, version)
  {
    this.title = title;
    if(version)
      this.title += ' ' + version;
  },

  hide: function() {
    if(!this.menu || !document.body)
      return;
    this.menu.parentNode.removeChild(this.menu);
    this.menu = null;
    this.icon = null;
  },

  create: function(){
    if(this.menu || !document.body)
      return;

    this.moduleName = _moduleName;

    var _this = this;

    var menu = document.createElement('div');

    menu.addEventListener('mouseover', function(){
      if(!_this.active)
      {
        _this.hover = true;
        _this.setElementsStyle('tagHover');
      }
    });

    menu.addEventListener('mouseout', function(){
      if(!_this.active)
      {
        _this.hover = false;
        _this.setElementsStyle('tag');
      }
    });

    var icon = document.createElement('div');
    icon.title = this.title;

    icon.addEventListener('click', function(event){
      if (_this.move) {
        return;
      }
      event.preventDefault();
      event.stopPropagation();

      if(event.button === 0)
      {
        _this.toggleMenuItems();
      }
      else if(event.button == 2)
      {
        _this.remove();
      }

      return false;
    }, false);

    icon.addEventListener('contextmenu', function(event){
      if (_this.move) {
        return;
      }
      event.preventDefault();
      event.stopPropagation();
      _this.remove();
      return false;
    }, false);

    this.icon = menu.appendChild(icon);
    this.menu = document.body.appendChild(menu);

    var iconTopPos = parseInt(_menu.style.menu.initial.top);
    if (iconTopPos < 0) {
      iconTopPos = 0;
    } else
    if (this.moduleName === 'youtube' && iconTopPos < 92) {
      iconTopPos = 92;
    } else
    if (iconTopPos + 24 > parseInt(window.innerHeight)) {
      iconTopPos = parseInt(window.innerHeight) - parseInt(_menu.style.menu.tag.height) - 4;
    }

    _menu.style.menu.initial.top = iconTopPos + 'px';

    this.setElementsStyle('initial');
    this.setEnabled(1);
    this.showTag();
    this.enableMove();
  },

  enableMove: function() {
    var isStart = false;
    var _this = this;
    var icon = _this.icon;
    var menu = _this.menu;
    var startTimer = undefined;
    var sT = (parseInt(menu.style.height) / 2) || 0;
    var noSelectStyle = mono.create('style', {
      text: 'body {-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;user-select: none;}'
    });

    var rbIcon = function() {
      _this.move = false;
      menu.style.position = _this.style.menu.initial.position;
      menu.style.WebkitTransition = _this.style.menu.initial.WebkitTransition;
      menu.style.transition = _this.style.menu.initial.transition;
      menu.style.borderStyle = _this.style.menu.initial.borderStyle;

      if (noSelectStyle.parentNode) {
        noSelectStyle.parentNode.removeChild(noSelectStyle);
      }
    };

    var initIcon = function(e) {
      e.stopPropagation();
      e.preventDefault();

      _menu.hideMenuItems();

      _this.hover = true;
      _this.setElementsStyle('tagHover');

      _this.move = true;
      menu.style.position = 'fixed';
      var eX = e.y || e.clientY;
      menu.style.top = (eX-sT)+'px';
      menu.style.WebkitTransition = 'initial';
      menu.style.transition = 'initial';
      menu.style.borderStyle = 'dotted';

      document.body.appendChild(noSelectStyle);
    };

    var onMouseMove = function(e) {
      var eX = e.y || e.clientY;
      var topValue = eX-sT;
      if (_this.moduleName === 'youtube' && topValue < 50) {
        topValue = 50;
      } else
      if (topValue < 0) {
        topValue = 0;
      }
      menu.style.top = _this.style.menu.initial.top = topValue+'px';
    };

    var onStartTimer = function(e) {
      isStart = true;
      initIcon(e);
      document.body.addEventListener('mousemove', onMouseMove);
    };

    menu.addEventListener('dragstart', function(e) {
      e.preventDefault();
    });
    menu.addEventListener('mousedown', function(e) {
      if (e.target !== _this.icon) {
        return;
      }
      isStart = false;
      startTimer = setTimeout(onStartTimer.bind(null, e), 500);
      var ml = function () {
        clearTimeout(startTimer);
        mono.off(menu, 'mouseleave', ml);
      };
      mono.on(menu, 'mouseleave', ml);
      document.body.addEventListener('mouseup', function mu() {
        clearTimeout(startTimer);
        document.body.removeEventListener('mouseup', mu);
        mono.off(menu, 'mouseleave', ml);
        if (isStart) {
          setTimeout(rbIcon, 100);
          document.body.removeEventListener('mousemove', onMouseMove);
          mono.storage.set({gmIconTop: parseInt(_this.style.menu.initial.top)});
        }
      });
    });
  },

  setStyle: function(element, style)
  {
    if(this[element] && this.style[element] && this.style[element][style])
      SaveFrom_Utils.setStyle(this[element], this.style[element][style]);
  },

  setElementsStyle: function(style)
  {
    if(!style)
      return;

    var elements = ['menu', 'icon'];

    for(var i = 0; i < elements.length; i++)
      this.setStyle(elements[i], style);
  },

  setEnabled: function(enabled)
  {
    this.enabled = enabled;
    this.setElementsStyle(this.enabled ? 'enabled' : 'disabled');
  },

  showTag: function()
  {
    this.setElementsStyle('tag');
  },

  toggleMenuItems: function()
  {
    return _menu.active ? _menu.hideMenuItems() : _menu.showMenuItems();
  },

  remove: function()
  {
    if(_menu.menu)
      _menu.menu.parentNode.removeChild(_menu.menu);

    // _menu.removeTooltip();
  },

  menuHTML: 'PHN0eWxlIHR5cGU9InRleHQvY3NzIj4KLnNmLW1lbnUtY29udGFpbmVyIHsKICAgIHdpZHRoOiA0ODJweDsKICAgIGZvbnQ6IDEycHgvMTdweCBUYWhvbWEsIEhlbHZldGljYSwgT3BlblNhbnMsIHNhbnMtc2VyaWY7CiAgICBjb2xvcjogIzAwMDsKICAgIG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HR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48cGF0aCBkPSJtMy4wOSwuNzE5YzAsLjg1MSAwLDEuNzExIDAsMi41NjEtLjY3LDAtMS4zNCwwLTIuMDEsMCAxLjA3LDEuMDcgMi4xNSwyLjE1IDMuMjIsMy4yMiAwLTEuOTMgMC0zLjg1IDAtNS43ODEtLjQyLDAtLjgzLDAtMS4yNSwwem0xLjkxLDBjLjA0LDIuMDkxIC4wNCw0LjE5MSAuMDQsNi4yODEtMS42NywwLTMuMzMsMC01LDAgMi42NywyLjc3IDUuMzMsNS41IDgsOC4zIDIuNy0yLjggNS4zLTUuNTMgOC04LjMtMS43LDAtMy4zLDAtNSwwIDAtMi4wOSAwLTQuMTkgMC02LjI4MS0yLDAtNCwwLTYsMHptNi43LDBjMCwxLjkzMSAwLDMuODUxIDAsNS43ODEgMS4xLTEuMDcgMi4xLTIuMTUgMy4yLTMuMjItLjcsMC0xLjMsMC0yLDAgMC0uODUgMC0xLjcxIDAtMi41NjEtLjQsMC0uOCwwLTEuMiwweiIvPjwvc3ZnPgogICAgICAgIDwvZGl2PgogICAgPC9kaXY+',

  getMenu: function() {
    //todo: chrome 47 fix
    var _atob = mono.isTM ? window.atob : atob;
    var code = _atob(this.menuHTML);
    var menu = document.createElement('div');
    menu.classList.add('sf-menu-container');
    menu.setAttribute(this.activeDataAttr, '1');
    menu.style.marginTop = '-24px';
    menu.style.width = 'auto';
    menu.style.minWidth = '482px';
    menu.innerHTML = code;
    return menu;
  },

  showMenuItems: function()
  {
    if(this.active)
      return;

    this.menu.style.top = this.style.menu.initial.top;

    this.removeActiveItems();

    var menu = this.getMenu();
    if(menu) {
      this.menu.appendChild(menu);
      _menu.initMenu(this.menu);
    }

    this.active = true;
    this.setElementsStyle('active');

    document.addEventListener('click', this.onDocumentClick, false);
    document.addEventListener('keydown', this.onDocumentKeyDown, false);

    var menuHeight = this.menu.clientHeight;
    var menuTop = parseInt(this.menu.style.top);
    var winHeight = window.innerHeight;
    if (menuTop + menuHeight > winHeight) {
      this.menu.style.top = ( winHeight - menuHeight - 4 ) + 'px'
    } else
    if (menuTop < 0) {
      this.menu.style.top = '0px';
    }
  },

  hideMenuItems: function()
  {
    this.menu.style.top = this.style.menu.initial.top;

    // this.removeTooltip();
    this.removeActiveItems();
    document.removeEventListener('click', this.onDocumentClick, false);
    document.removeEventListener('keydown', this.onDocumentKeyDown, false);

    this.active = false;
    this.showTag();
  },

  onDocumentClick: function(event)
  {
    var node = event.target;
    if(node != _menu.menu && !SaveFrom_Utils.isParent(node, _menu.menu))
    {
      _menu.hideMenuItems();
    }
  },

  onDocumentKeyDown: function(event)
  {
    if(event.keyCode == 27)
    {
      _menu.hideMenuItems();
    }
  },

  removeActiveItems: function()
  {
    var e = null;
    while(e = this.menu.querySelector('div[' + this.activeDataAttr + ']'))
    {
      e.parentNode.removeChild(e);
    }
  }
};
/////////////////////////////////////////////////
// OPTIONS
_options = {
  classPrefix: 'sfh--',
  dataAttr: 'data-sfh-option',
  html: 'PHN0eWxlIHR5cGU9InRleHQvY3NzIj4KLnNmaC0tb3B0aW9ucyB7CiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmOwogICAgYm9yZGVyOiBub25lOwogICAgZm9udDogMTNweC8xIEFyaWFsLCBIZWx2ZXRpY2EsIHNhbnMtc2VyaWY7CiAgICB3aWR0aDogNTgwcHg7CiAgICBtYXJnaW46IDA7CiAgICBwYWRkaW5nOiA5cHg7CiAgICB0ZXh0LWFsaWduOiBsZWZ0Cn0KCi5zZmgtLW9wdGlvbnMgLnNmaC0tdGl0bGUgewogICAgZm9udC1zaXplOiAxLjNlbTsKICAgIG1hcmdpbjogMCAwIDEuM2VtIDAKfQoKLnNmaC0tb3B0aW9ucyBmb3JtIHsKICAgIG1hcmdpbjogMDsKICAgIHBhZGRpbmc6IDAKfQoKLnNmaC0tb3B0aW9ucyBpbn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hLXNmaC1vcHRpb249InNvdmV0bmlrRW5hYmxlZCIgY2hlY2tlZD0iMSI+Jm5ic3A7PHNwYW4gZGF0YS1pMThuPSJvcHRpb25zU292ZXRuaWtFbmFibGVkIj5FbmFibGUgc292ZXRuaWs8L3NwYW4+PC9sYWJlbD4KICAgIDwvZGl2PgogICAgPGRpdiBjbGFzcz0ic2ZoLS1ibG9jayBibG9ja0F2aWFCYXJFbmFibGVkIj4KICAgICAgPGxhYmVsPjxpbnB1dCB0eXBlPSJjaGVja2JveCIgZGF0YS1zZmgtb3B0aW9uPSJhdmlhQmFyRW5hYmxlZCIgY2hlY2tlZD0iMSI+Jm5ic3A7PHNwYW4gZGF0YS1pMThuPSJvcHRpb25zQXZpYUJhckVuYWJsZWQiPkVuYWJsZSBhdmlhQmFyPC9zcGFuPjwvbGFiZWw+CiAgICA8L2Rpdj4KICAgIDxkaXYgY2xhc3M9InNmaC0tY2xlYXIiPjwvZGl2PgogIDwvZm9ybT4KPC9kaXY+',

  translate: function(parent) {
    parent = parent || document;
    var e_list = parent.querySelectorAll('*[data-i18n]');
    for(var i = 0, len = e_list.length; i < len; i++)
    {
      var el = e_list[i];
      el.textContent = engine.language[el.dataset.i18n];
    }
  },

  onCbChange: function(event) {
    var el = event.target;
    var key = el.getAttribute(_options.dataAttr);
    mono.sendMessage({action: 'updateOption', key: key, value: el.checked ? 1 : 0 });
  },

  init: function(preference) {
    var parent = document.querySelector('.sfh--options');

    if(!parent) {
      return;
    }

    if(!mono.global.hasSovetnik) {
      var sovBlock = parent.querySelector('.blockSovetnikEnabled');
      if (sovBlock) {
        sovBlock.style.display = 'none';
      }
    }

    if(!mono.global.hasAviaBar) {
      var aviaBlock = parent.querySelector('.blockAviaBarEnabled');
      if (aviaBlock) {
        aviaBlock.style.display = 'none';
      }
    }

    if (!preference.showUmmyItem) {
      var ummyBlock = parent.querySelector('.blockUmmyInfo');
      if (ummyBlock) {
        ummyBlock.style.display = 'none';
      }
    }

    _options.translate(parent);

    var c = parent.querySelectorAll('form input[type="checkbox"]');
    for(var i = 0; i < c.length; i++) {
      var el = c[i];
      var name = el.getAttribute(_options.dataAttr);
      if(name && preference[name] !== undefined) {
        el.checked = preference[name] !== 0;
        el.addEventListener('change', _options.onCbChange, false);
      }
    }

    if (typeof GM_download !== 'undefined') {
      var blockGmNativeDownload = parent.querySelector('.blockGmNativeDownload');
      if (blockGmNativeDownload) {
        blockGmNativeDownload.style.display = 'block';
      }
    }
  },

  hideBlock: function(name, hide) {
    var node = document.querySelector('.' + _options.classPrefix + name);
    if(node)
      node.style.display = hide ? 'none' : '';
  },

  show: function()
  {
    var height = document.body.clientHeight || 0;
    if (height > 600) {
      height = 600;
    }
    SaveFrom_Utils.popupDiv(function(cnt) {
      var _atob = mono.isTM ? window.atob : atob;
      cnt.innerHTML = _atob(_options.html);
    }, null, 640, height);

    mono.initGlobal(function(resp) {
      mono.global.hasSovetnik = resp.hasSovetnik;
      mono.global.hasAviaBar = resp.hasAviaBar;

      _options.init(mono.global.preference);
    }, ['hasSovetnik', 'hasAviaBar']);
  }
};

  _languageList.de = "%7B%0A%20%22extName%22:%20%7B%22message%22:%20%22SaveFrom.net%20Helfer%22%7D,%0A%20%22extDescription%22:%20%7B%22message%22:%20%22Laden%20Sie%20von%20YouTube,%20Facebook,%20VK.com%20und%20mehr%20als%2040%20anderen%20Seiten%20mit%20einem%20Klick%20herunter.%22%7D,%0A%0A%20%22extNameLite%22:%20%7B%22message%22:%20%22SaveFrom.net%20Helfer%20Lite%22%7D,%0A%20%22extDescriptionLite%22:%20%7B%22message%22:%20%22Herunterladen%20von%20Facebook,%20VK.com%20und%20mehr%20als%2040%20weiteren%20Seiten%20mit%20einem%20Klick%20herunter.%22%7D,%0A%0A%20%22lang%22:%20%7B%22message%22:%20%22de%22%7D,%0A%0A%20%22titleDefault%22:%20%7B%22message%22:%20%22SaveFrom.net%20Helfer%22%7D,%0A%20%22titleDesabled%22:%20%7B%22message%22:%20%22SaveFrom.net%20Helfer%20deaktiviert%22%7D,%0A%0A%20%22menuEnable%22:%20%7B%22message%22:%20%22Aktivieren%22%7D,%0A%20%22menuDisable%22:%20%7B%22message%22:%20%22Deaktivieren%22%7D,%0A%0A%20%22showButton%22:%20%7B%22message%22:%20%22Erweiterungs%20Knopf%20anzeigen%22%7D,%0A%0A%20%22copy%22:%20%7B%22message%22:%20%22Kopie%22%7D,%0A%20%22download%22:%20%7B%22message%22:%20%22Herunterladen%22%7D,%0A%20%22downloadTitle%22:%20%7B%22message%22:%20%22Klicken%20Sie%20den%20Link%20w%C3%A4hrend%20Sie%20die%20Alt/Einstellung%20oder%20Ctrl/Strg%20Taste%20dr%C3%BCcken%20zum%20Herunterladen%20der%20Dateien.%22%7D,%0A%20%22noLinksFound%22:%20%7B%22message%22:%20%22Keine%20Links%20wurden%20gefunden%22%7D,%0A%20%22more%22:%20%7B%22message%22:%20%22Mehr%22%7D,%0A%20%22close%22:%20%7B%22message%22:%20%22Schlie%C3%9Fen%22%7D,%0A%20%22kbps%22:%20%7B%22message%22:%20%22kbps%22%7D,%0A%20%22withoutAudio%22:%20%7B%22message%22:%20%22without%20audio%22%7D,%0A%20%22size%22:%20%7B%22message%22:%20%22gr%C3%B6%C3%9Fe%22%7D,%0A%0A%20%22subtitles%22:%20%7B%22message%22:%20%22Untertitel%22%7D,%0A%20%22playlist%22:%20%7B%22message%22:%20%22Wiedergabliste%22%7D,%0A%20%22filelist%22:%20%7B%22message%22:%20%22List%20of%20files%22%7D,%0A%20%22downloadWholePlaylist%22:%20%7B%22message%22:%20%22Die%20komplette%20Wiedergabliste%20herunterladen%22%7D,%0A%0A%20%22getFileSizeTitle%22:%20%7B%22message%22:%20%22Dateigr%C3%B6%C3%9Fe%20bestimmen%22%20%7D,%0A%20%22getFileSizeFailTitle%22:%20%7B%22message%22:%20%22Fehler%20bei%20bestimmung%20der%20Dateigr%C3%B6%C3%9Fe.%20Bitte%20versuchen%20Sie%20es%20erneut.%22%7D,%0A%0A%20%22lmButtonTitle%22:%20%7B%22message%22:%20%22Holen%20Sie%20sich%20einen%20direkten%20Link.%22%7D,%0A%0A%20%22downloadFromCurrentPage%22:%20%7B%22message%22:%20%22Zu%20SaveFrom.net%22%7D,%0A%20%22updateLinks%22:%20%7B%22message%22:%20%22Links%20aktualisieren%22%7D,%0A%20%22updateLinksNotification%22:%20%7B%22message%22:%20%22Links%20aktualisiert%22%7D,%0A%20%22downloadMP3Files%22:%20%7B%22message%22:%20%22Download%20Audiodateien%22%7D,%0A%20%22downloadPlaylist%22:%20%7B%22message%22:%20%22Download%20Playlist%22%7D,%0A%20%22downloadPhotos%22:%20%7B%22message%22:%20%22Download%20Bilder%22%7D,%0A%20%22installFullVersion%22:%20%7B%22message%22:%20%22Install%20full%20version%22%7D,%0A%20%22disable%22:%20%7B%22message%22:%20%22Deaktivieren%22%7D,%0A%20%22showOptions%22:%20%7B%22message%22:%20%22Einstellungen%22%7D,%0A%20%22reportBug%22:%20%7B%22message%22:%20%22Fehler%20melden%22%7D,%0A%20%22openPoll%22:%20%7B%22message%22:%20%22Become%20better%22%7D,%0A%20%22disableModule%22:%20%7B%22message%22:%20%22Auf%20dieser%20Webseite%20deaktivieren%22%7D,%0A%20%22enableModule%22:%20%7B%22message%22:%20%22Auf%20dieser%20Webseite%20aktivieren%22%7D,%0A%20%22enableDisableModule%22:%20%7B%22message%22:%20%22Ein/Aus%20auf%20dieser%20Webseite%22%7D,%0A%20%22showHideButton%22:%20%7B%22message%22:%20%22Erweitern%20Ein-/Ausblenden%22%7D,%0A%20%22updateTo%22:%20%7B%22message%22:%20%22Update%20auf%20%25d%22%7D,%0A%0A%20%22aboutPage%22:%20%7B%22message%22:%20%22%C3%9Cber%22%7D,%0A%20%22aboutTitle%22:%20%7B%22message%22:%20%22SaveFrom.net%20Helfer%22%7D,%0A%20%22aboutVersion%22:%20%7B%22message%22:%20%22Version%22%7D,%0A%20%22aboutDescription%22:%20%7B%22message%22:%20%22Hilft%20den%20Nutzern%20direkte%20Links%20zu%20Herunterladen%20von%20mehr%20als%2040%20Webseiten,%20inklusive%20Dailymotion.com,%20YouTube.com,%20VK.com%20und%20weiteren%20zu%20bekommen.%22%7D,%0A%20%22aboutDescriptionLite%22:%20%7B%22message%22:%20%22Hilft%20den%20Nutzern%20direkte%20Links%20zu%20Herunterladen%20von%20mehr%20als%2040%20Webseiten,%20inklusive%20Dailymotion.com,%20VK.com%20und%20weiteren%20zu%20bekommen.%22%7D,%0A%20%22aboutSupported%22:%20%7B%22message%22:%20%22Unterst%C3%BCtzte%20Ressourcen%22%7D,%0A%20%22homePage%22:%20%7B%22message%22:%20%22Homepage%22%7D,%0A%0A%20%22optionsTitle%22:%20%7B%22message%22:%20%22SaveFrom.net%20Helfer%20-%20Einstellungen%22%7D,%0A%20%22optionsHandleLinks%22:%20%7B%22message%22:%20%22Links%20handhaben%22%7D,%0A%20%22optionsFileHostings%22:%20%7B%22message%22:%20%22Zu%20Dateihoster%22%7D,%0A%20%22optionsMediaHostings%22:%20%7B%22message%22:%20%22Zu%20Medienhoster%22%7D,%0A%20%22optionsModules%22:%20%7B%22message%22:%20%22Module%22%7D,%0A%20%22optionsYoutube%22:%20%7B%22message%22:%20%22YouTube%22%7D,%0A%20%22optionsYTHideLinks%22:%20%7B%22message%22:%20%22Links%20ausblenden%22%7D,%0A%20%22optionsDailymotion%22:%20%7B%22message%22:%20%22Dailymotion%22%7D,%0A%20%22optionsVimeo%22:%20%7B%22message%22:%20%22Vimeo%22%7D,%0A%20%22optionsFacebook%22:%20%7B%22message%22:%20%22Facebook%22%7D,%0A%20%22optionsSoundcloud%22:%20%7B%22message%22:%20%22SoundCloud%22%7D,%0A%20%22optionsVkontakte%22:%20%7B%22message%22:%20%22VK%22%7D,%0A%20%22optionsOdnoklassniki%22:%20%7B%22message%22:%20%22Odnoklassniki%22%7D,%0A%20%22optionsMailru%22:%20%7B%22message%22:%20%22Moy%20Mir%22%7D,%0A%20%22optionsInstagram%22:%20%7B%22message%22:%20%22Instagram%22%7D,%0A%20%22optionsRutube%22:%20%7B%22message%22:%20%22Rutube%22%7D,%0A%20%22optionsBitrate%22:%20%7B%22message%22:%20%22Bitrate%20sofort%20zeigen%22%7D,%0A%20%22optionsSovetnikEnabled%22:%20%7B%22message%22:%20%22Advisor%22%7D,%0A%20%22optionsShowUmmyInfo%22:%20%7B%22message%22:%20%22Tipps%20f%C3%BCr%20UVD%20einblenden%22%7D,%0A%20%22optionsGmNativeDownload%22:%20%7B%22message%22:%20%22Erweiterter%20Download-Modus%22%7D,%0A%20%22optionsShowUmmyBtn%22:%20%7B%22message%22:%20%22Schaltfl%C3%A4che%20Ummy%20anzeigen%22%7D,%0A%20%22optionsAviaBarEnabled%22:%20%7B%22message%22:%20%22Cheap%20Flights%20Advisor%22%7D,%0A%0A%20%22menuDownloadFromCurrentPage%22:%20%7B%22message%22:%20%22Laden%20Sie%20die%20Dateien%20mit%20SaveFrom.net%20von%20der%20aktuellen%20Seite%22%7D,%0A%20%22menuUpdateLinks%22:%20%7B%22message%22:%20%22Hier%20klicken,%20wenn%20die%20Download-Taste%20nicht%20erscheint%22%7D,%0A%20%22menuDownloadMP3Files%22:%20%7B%22message%22:%20%22Alle%20auf%20dieser%20Seite%20gefundenen%20Audiodateien%20herunterladen%22%7D,%0A%20%22menuDownloadPlaylist%22:%20%7B%22message%22:%20%22Playliste%20mit%20den%20Links%20zu%20den%20Audiodateien%20generieren%20und%20downloaden%22%7D,%0A%20%22menuDownloadPhotos%22:%20%7B%22message%22:%20%22Alle%20auf%20der%20aktuellen%20Seite%20gefundenen%20Bilder%20herunterladen%22%7D,%0A%20%22menuReportBug%22:%20%7B%22message%22:%20%22Schreiben%20Sie%20uns,%20wenn%20Probleme%20auftreten%22%7D,%0A%20%22menuShowOptions%22:%20%7B%22message%22:%20%22AN/AUS%20unterst%C3%BCtzte%20Ressourcen%20und%20Helperoptionen%22%7D,%0A%20%22menuEnableExtension%22:%20%7B%22message%22:%20%22%22%7D,%0A%20%22menuOpenPoll%22:%20%7B%22message%22:%20%22%22%7D,%0A%0A%20%22quality%22:%20%7B%22message%22:%20%22Qualit%C3%A4t%22%7D,%0A%20%22qualityNote%22:%20%7B%22message%22:%20%22Wenn%20es%20nicht%20um%20Qualit%C3%A4t%20geht,%20wird%20das%20n%C3%A4chste%20verf%C3%BCgbare%20Video%20heruntergeladen.%22%7D,%0A%20%22filelistTitle%22:%20%7B%22message%22:%20%22Die%20Liste%20der%20gefundenen%20dateien%22%7D,%0A%20%22filelistInstruction%22:%20%7B%22message%22:%20%22%5B'Zum%20Herunterladen%20aller%20datien%20kopieren%20Sie%20die%20liste%20der%20Links%20in%20Ihren%20',%7Ba:%7Bhref:'http://en.wikipedia.org/wiki/Download_manager',text:'Download%20Manager'%7D%7D,'.%20Wenn%20Sie%20noch%20keinen%20Download%20Manager%20haben%20we%20empfehlen%20wir%20Ihnen%20die%20Installation%20des%20',%7Ba:%7Bhref:'http://www.freedownloadmanager.org/',text:'Free%20Download%20Manager'%7D%7D,'.'%5D%22%7D,%0A%20%22playlistTitle%22:%20%7B%22message%22:%20%22Wiedergabliste%22%7D,%0A%20%22playlistInstruction%22:%20%7B%22message%22:%20%22Zur%20Wiedergabe%20Ihrer%20gespeicherten%20Wiedergabliste%20kann%20es%20nun%20mit%20einem%20Musik-Player%20ge%C3%B6ffnet%20werden.%22%7D,%0A%0A%20%22ummySfTitle%22:%20%7B%22message%22:%20%22HD%20oder%20MP3%22%7D,%0A%20%22ummyMenuItem%22:%20%7B%22message%22%20:%20%22%5B%7Bspan:%7B%7D%7D,'%20mithilfe%20von%20Ummy%20herunterladen'%5D%22%7D,%0A%20%22ummyMenuInfo%22:%20%7B%22message%22:%20%22%5B'Ein%20Video%20mit%20dem%20kostenlosen%20',%7Ba:%7Bhref:'%7Burl%7D',target:'_blank',text:'Ummy%20Video%20Downloader'%7D%7D,'%20herunterladen'%5D%22%7D,%0A%20%22warningPopupTitle%22:%20%7B%22message%22:%20%22%C3%9Cberpr%C3%BCfen%20Sie%20die%20Browsereinstellungen%22%7D,%0A%20%22warningPopupDesc%22:%20%7B%22message%22:%20%22Die%20Option%20%5C%22Jedes%20Mal%20nachfragen,%20wo%20eine%20Datei%20gespeichert%20werden%20soll%5C%22%20muss%20deaktiviert%20sein.%22%7D,%0A%20%22readMore%22:%20%7B%22message%22:%20%22Mehr%22%7D,%0A%20%22noWarning%22:%20%7B%22message%22:%20%22Nicht%20benachrichtigen%22%7D,%0A%20%22cancel%22:%20%7B%22message%22:%20%22Abbrechen%22%7D,%0A%20%22continue%22:%20%7B%22message%22:%20%22Fortsetzen%22%7D,%0A%20%22beforeDownloadPopupWarn%22:%20%7B%22message%22:%20%22Achtung!%20Der%20Download%20kann%20nicht%20abgebrochen%20oder%20angehalten%20werden.%22%7D,%0A%0A%20%22vkInfo%22:%20%7B%22message%22:%20%22Info%22%7D,%0A%20%22vkInfoTitle%22:%20%7B%22message%22:%20%22Dateigr%C3%B6%C3%9Fe%20und%20Bitrate%22%7D,%0A%20%22vkMp3LinksNotFound%22:%20%7B%22message%22:%20%22Links%20zu%20MP3%20Dateien%20wurden%20nicht%20gefunden%22%7D,%0A%20%22vkPhotoLinksNotFound%22:%20%7B%22message%22:%20%22Photos%20are%20not%20found%22%7D,%0A%20%22vkDownloadPhotoAlbum%22:%20%7B%22message%22:%20%22Album%20herunterladen%22%7D,%0A%20%22vkDownloadAllPhotoAlbums%22:%20%7B%22message%22:%20%22Alle%20Alben%20herunterladen%22%7D,%0A%20%22vkFoundPhotos%22:%20%7B%22message%22:%20%22Gefundene%20Fotos%22%7D,%0A%20%22vkNotAvailablePhotos%22:%20%7B%22message%22:%20%22%25d%20Foto(s)%20vor%C3%BCbergehend%20nicht%20verf%C3%BCgbar%22%7D,%0A%20%22vkFoundLinks%22:%20%7B%22message%22:%20%22Gefundene%20Links%22%7D,%0A%20%22vkFoundOf%22:%20%7B%22message%22:%20%22von%22%7D,%0A%20%22vkShowAs%22:%20%7B%22message%22:%20%22Zeigen%20als%22%7D,%0A%20%22vkListOfLinks%22:%20%7B%22message%22:%20%22Liste%20der%20Links%22%7D,%0A%20%22vkListOfLinksInstruction%22:%20%7B%22message%22:%20%22%5B'Um%20alle%20Fotos%20herunterzuladen,%20kopieren%20Sie%20die%20Links%20aus%20der%20Liste%20und%20f%C3%BCgen%20Sie%20diese%20in%20Ihren%20',%7Ba:%7Bhref:'http://en.wikipedia.org/wiki/Download_manager',text:'Download%20Manager'%7D%7D,'%20ein.%20Wenn%20Sie%20noch%20keinen%20Download%20Manager%20haben%20we%20empfehlen%20wir%20Ihnen%20die%20Installation%20des%20',%7Ba:%7Bhref:'http://www.freedownloadmanager.org/',text:'Free%20Download%20Manager'%7D%7D,'.'%5D%22%7D,%0A%20%22vkTableOfThumbnails%22:%20%7B%22message%22:%20%22Tabelle%20der%20Thumbnails%22%7D,%0A%20%22vkListOfPhotos%22:%20%7B%22message%22:%20%22Liste%20der%20Fotos%22%7D,%0A%20%22vkListOfPhotosInstruction%22:%20%7B%22message%22:%20%22Klicken%20Sie%20auf%20ein%20Foto%20um%20es%20herunterzuladen.%22%7D,%0A%20%22vkKbps%22:%20%7B%22message%22:%20%22kbps%22%7D,%0A%20%22vkFileSizeByte%22:%20%7B%22message%22:%20%22B%22%7D,%0A%20%22vkFileSizeKByte%22:%20%7B%22message%22:%20%22kB%22%7D,%0A%20%22vkFileSizeMByte%22:%20%7B%22message%22:%20%22MB%22%7D,%0A%20%22vkFileSizeGByte%22:%20%7B%22message%22:%20%22GB%22%7D,%0A%20%22vkFileSizeTByte%22:%20%7B%22message%22:%20%22TB%22%7D,%0A%20%22vkDownloadFromYoutube%22:%20%7B%22message%22:%20%22%5B'Herunterladen:%20%C3%96ffnen%20Sie%20',%7Ba:%7Bhref:'%7Burl%7D',text:'die%20Video%20Seite'%7D%7D,'%20und%20dr%C3%BCcken%20Sie%20den%20%5C%22Herunterladen%5C%22%20Knopf%20%C3%BCber%20dem%20Video-Spieler'%5D%22%7D,%0A%20%22vkFoundFiles%22:%20%7B%22message%22:%20%22Dateien%20gefunden:%20%25d%22%7D,%0A%0A%20%22shareIn%22:%20%7B%22message%22:%20%22In%20%25w%20teilen%22%7D,%0A%20%22socialDesc%22:%20%7B%22message%22:%20%22Der%20SaveFrom.net%20Helper%20erm%C3%B6glicht%20es%20Ihnen%20Dateien%20YouTube.com,%20Facebook.com,%20VK.com%20und%20mehr%20als%2040%20andere%20Seiten%20mit%20einem%20Klick%20herunterzuladen%22%7D,%0A%0A%20%22tutorialS1Title%22:%20%7B%22message%22:%20%22Gute%20Nachrichten!%22%7D,%0A%20%22tutorialS1Main%22:%20%7B%22message%22:%20%22%5B'SaveFrom.net%20Helper%20',%7Bimg:%20%7Bsrc:%20'#logo'%7D%7D,'%20wurde%20erfolgreich%20installiert.%20Jetzt%20kannst%20due%20jedes%20Video%20mit%20einem%20Klick%20von%20YouTube%20herunterladen'%5D%22%7D,%0A%20%22tutorialS1Arrow%22:%20%7B%22message%22:%20%22%5B'Wie%20das%20geht?',%7Bbr:%7B%7D%7D,'Hier%20erf%C3%A4hrst%20du%20es'%5D%22%7D,%0A%20%22tutorialS2Main%22:%20%7B%22message%22:%20%22W%C3%A4hle%20das%20Format%20des%20Videos,%20das%20du%20herunterladen%20m%C3%B6chtest%20und%20klicken%20auf%20%5C%22Herunterladen%5C%22%22%7D,%0A%20%22tutorialS3History%22:%20%7B%22message%22:%20%22Historie%22%7D,%0A%20%22tutorialS3Main%22:%20%7B%22message%22:%20%22%5B'Du%20m%C3%B6chtest%20ein%20Video%20aus%20Historie%20herunterladen?%20Klicken%20einfach%20in%20der%20Vorschau%20des%20zuletzt%20gesehenen%20Videos%20auf%20',%20%7Bimg:%20%7Bsrc:%20'#arrow'%7D%7D%5D%22%7D,%0A%20%22tutorialS4Main%22:%20%7B%22message%22:%20%22%5B'Du%20musst%20dir%20das%20Video%20nicht%20ansehen%20%E2%80%94%20klicke%20einfach%20auf%20',%20%7Bimg:%20%7Bsrc:%20'#arrow'%7D%7D,%20',%20w%C3%A4hle%20die%20Qualit%C3%A4t%20und%20lade%20es%20herunter.%20Ganz%20einfach,%20oder?'%5D%22%7D,%0A%20%22tutorialS5Title%22:%20%7B%22message%22:%20%22Viel%20Spa%C3%9F%20mit%20SaveFrom.net%20Helper!%22%7D,%0A%20%22tutorialS5Main%22:%20%7B%22message%22:%20%22%5B'Noch%20Fragen?%20Vorschl%C3%A4ge?%20Willkommen%20auf%20unserer%20',%20%7Ba:%20%7Btext:%20'Support-Seite',%20href:%20'#support'%7D%7D%20,'.%20Schlie%C3%9Fe%20dich%20uns%20bei%20',%20%7Ba:%20%7Btext:%20'Facebook',%20href:%20'#fb'%7D%7D%20,'%20an'%5D%22%7D,%0A%0A%20%22tutorialTooltipText%22:%20%7B%22message%22:%20%22%5B'Klicken%20Sie%20zum%20',%7Bb:%20%7Btext:%20'Download'%7D%7D,',%20einfach%20auf%20die%20Schaltfl%C3%A4che'%5D%22%7D,%0A%0A%20%22ummyTooltipConfirm%22:%20%7B%22message%22:%20%22%5B'Hatten%20Sie%20',%7Bimg:%7B%7D%7D,'%20Ummy%20Video%20Downloader%20bereits%20zuvor%20installiert?'%5D%22%7D,%0A%20%22yes%22:%20%7B%22message%22:%20%22Ja%22%7D,%0A%20%22no%22:%20%7B%22message%22:%20%22Nein%22%7D,%0A%20%22tooltipHide%22:%20%7B%22message%22:%20%22Diese%20Meldung%20nicht%20wieder%20anzeigen%22%7D%0A%7D";
_languageList.en = "%7B%0A%20%22extName%22:%20%7B%22message%22:%20%22SaveFrom.net%20helper%22%7D,%0A%20%22extDescription%22:%20%7B%22message%22:%20%22Download%20YouTube,%20Facebook,%20VK.com%20and%2040+%20sites%20in%20one%20click.%22%7D,%0A%0A%20%22extNameLite%22:%20%7B%22message%22:%20%22SaveFrom.net%20helper%20lite%22%7D,%0A%20%22extDescriptionLite%22:%20%7B%22message%22:%20%22Download%20Facebook,%20VK.com%20and%2040+%20sites%20in%20one%20click.%22%7D,%0A%0A%20%22lang%22:%20%7B%22message%22:%20%22en%22%7D,%0A%0A%20%22titleDefault%22:%20%7B%22message%22:%20%22SaveFrom.net%20helper%22%7D,%0A%20%22titleDesabled%22:%20%7B%22message%22:%20%22SaveFrom.net%20helper%20disabled%22%7D,%0A%0A%20%22menuEnable%22:%20%7B%22message%22:%20%22Enable%22%7D,%0A%20%22menuDisable%22:%20%7B%22message%22:%20%22Disable%22%7D,%0A%0A%20%22showButton%22:%20%7B%22message%22:%20%22Show%20extension%20button%22%7D,%0A%0A%20%22copy%22:%20%7B%22message%22:%20%22Copy%22%7D,%0A%20%22download%22:%20%7B%22message%22:%20%22Download%22%7D,%0A%20%22downloadTitle%22:%20%7B%22message%22:%20%22Click%20the%20link%20while%20holding%20Alt/Option%20or%20Ctrl%20key%20to%20download%20the%20file.%22%7D,%0A%20%22noLinksFound%22:%20%7B%22message%22:%20%22No%20links%20were%20found%22%7D,%0A%20%22more%22:%20%7B%22message%22:%20%22More%22%7D,%0A%20%22close%22:%20%7B%22message%22:%20%22Close%22%7D,%0A%20%22kbps%22:%20%7B%22message%22:%20%22kbps%22%7D,%0A%20%22withoutAudio%22:%20%7B%22message%22:%20%22without%20audio%22%7D,%0A%20%22size%22:%20%7B%22message%22:%20%22size%22%7D,%0A%0A%20%22subtitles%22:%20%7B%22message%22:%20%22Subtitles%22%7D,%0A%20%22playlist%22:%20%7B%22message%22:%20%22Playlist%22%7D,%0A%20%22filelist%22:%20%7B%22message%22:%20%22List%20of%20files%22%7D,%0A%20%22downloadWholePlaylist%22:%20%7B%22message%22:%20%22Download%20the%20whole%20playlist%22%7D,%0A%0A%20%22getFileSizeTitle%22:%20%7B%22message%22:%20%22Get%20file%20size%22%20%7D,%0A%20%22getFileSizeFailTitle%22:%20%7B%22message%22:%20%22Unable%20to%20get%20the%20file%20size.%20Please%20try%20again.%22%7D,%0A%0A%20%22lmButtonTitle%22:%20%7B%22message%22:%20%22Get%20a%20direct%20link%22%7D,%0A%0A%20%22downloadFromCurrentPage%22:%20%7B%22message%22:%20%22Go%20to%20SaveFrom.net%22%7D,%0A%20%22updateLinks%22:%20%7B%22message%22:%20%22Refresh%20links%22%7D,%0A%20%22updateLinksNotification%22:%20%7B%22message%22:%20%22Links%20updated%22%7D,%0A%20%22downloadMP3Files%22:%20%7B%22message%22:%20%22Download%20audio%20files%22%7D,%0A%20%22downloadPlaylist%22:%20%7B%22message%22:%20%22Download%20a%20playlist%22%7D,%0A%20%22downloadPhotos%22:%20%7B%22message%22:%20%22Download%20pictures%22%7D,%0A%20%22installFullVersion%22:%20%7B%22message%22:%20%22Install%20full%20version%22%7D,%0A%20%22disable%22:%20%7B%22message%22:%20%22Disable%22%7D,%0A%20%22showOptions%22:%20%7B%22message%22:%20%22Settings%22%7D,%0A%20%22reportBug%22:%20%7B%22message%22:%20%22Report%20a%20bug%22%7D,%0A%20%22openPoll%22:%20%7B%22message%22:%20%22Become%20better%22%7D,%0A%20%22disableModule%22:%20%7B%22message%22:%20%22Disable%20on%20this%20website%22%7D,%0A%20%22enableModule%22:%20%7B%22message%22:%20%22Enable%20on%20this%20website%22%7D,%0A%20%22enableDisableModule%22:%20%7B%22message%22:%20%22Turn%20On/Off%20on%20this%20website%22%7D,%0A%20%22showHideButton%22:%20%7B%22message%22:%20%22Show/hide%20extension%20button%22%7D,%0A%20%22updateTo%22:%20%7B%22message%22:%20%22Update%20to%20%25d%22%7D,%0A%0A%20%22aboutPage%22:%20%7B%22message%22:%20%22About%22%7D,%0A%20%22aboutTitle%22:%20%7B%22message%22:%20%22SaveFrom.net%20Helper%22%7D,%0A%20%22aboutVersion%22:%20%7B%22message%22:%20%22Version%22%7D,%0A%20%22aboutDescription%22:%20%7B%22message%22:%20%22Helps%20users%20to%20get%20direct%20links%20to%20download%20from%20more%20than%2040%20websites,%20including%20Dailymotion.com,%20YouTube.com,%20VK.com%20and%20others.%22%7D,%0A%20%22aboutDescriptionLite%22:%20%7B%22message%22:%20%22Helps%20users%20to%20get%20direct%20links%20to%20download%20from%20more%20than%2040%20websites,%20including%20Dailymotion.com,%20VK.com%20and%20others.%22%7D,%0A%20%22aboutSupported%22:%20%7B%22message%22:%20%22Supported%20resources%22%7D,%0A%20%22homePage%22:%20%7B%22message%22:%20%22Home%20page%22%7D,%0A%0A%20%22optionsTitle%22:%20%7B%22message%22:%20%22SaveFrom.net%20Helper%20-%20Preferences%22%7D,%0A%20%22optionsHandleLinks%22:%20%7B%22message%22:%20%22Handle%20links%22%7D,%0A%20%22optionsFileHostings%22:%20%7B%22message%22:%20%22To%20filehostings%22%7D,%0A%20%22optionsMediaHostings%22:%20%7B%22message%22:%20%22To%20mediahostings%22%7D,%0A%20%22optionsModules%22:%20%7B%22message%22:%20%22Modules%22%7D,%0A%20%22optionsYoutube%22:%20%7B%22message%22:%20%22YouTube%22%7D,%0A%20%22optionsYTHideLinks%22:%20%7B%22message%22:%20%22Hide%20links%22%7D,%0A%20%22optionsDailymotion%22:%20%7B%22message%22:%20%22Dailymotion%22%7D,%0A%20%22optionsVimeo%22:%20%7B%22message%22:%20%22Vimeo%22%7D,%0A%20%22optionsFacebook%22:%20%7B%22message%22:%20%22Facebook%22%7D,%0A%20%22optionsSoundcloud%22:%20%7B%22message%22:%20%22SoundCloud%22%7D,%0A%20%22optionsVkontakte%22:%20%7B%22message%22:%20%22VK%22%7D,%0A%20%22optionsOdnoklassniki%22:%20%7B%22message%22:%20%22Odnoklassniki%22%7D,%0A%20%22optionsMailru%22:%20%7B%22message%22:%20%22Moy%20Mir%22%7D,%0A%20%22optionsInstagram%22:%20%7B%22message%22:%20%22Instagram%22%7D,%0A%20%22optionsRutube%22:%20%7B%22message%22:%20%22Rutube%22%7D,%0A%20%22optionsBitrate%22:%20%7B%22message%22:%20%22Show%20bitrate%20instantly%22%7D,%0A%20%22optionsSovetnikEnabled%22:%20%7B%22message%22:%20%22Advisor%22%7D,%0A%20%22optionsShowUmmyInfo%22:%20%7B%22message%22:%20%22Show%20tips%20for%20Ummy%20Video%20Downloader%22%7D,%0A%20%22optionsGmNativeDownload%22:%20%7B%22message%22:%20%22Advanced%20download%20mode%22%7D,%0A%20%22optionsShowUmmyBtn%22:%20%7B%22message%22:%20%22Show%20the%20Ummy%20button%22%7D,%0A%20%22optionsAviaBarEnabled%22:%20%7B%22message%22:%20%22Cheap%20Flights%20Advisor%22%7D,%0A%0A%20%22menuDownloadFromCurrentPage%22:%20%7B%22message%22:%20%22Download%20files%20from%20the%20current%20page%20using%20SaveFrom.net%22%7D,%0A%20%22menuUpdateLinks%22:%20%7B%22message%22:%20%22Press%20if%20Download%20button%20doesn't%20appear%22%7D,%0A%20%22menuDownloadMP3Files%22:%20%7B%22message%22:%20%22Download%20all%20audio%20files%20found%20on%20the%20current%20page%22%7D,%0A%20%22menuDownloadPlaylist%22:%20%7B%22message%22:%20%22Generates%20and%20downloads%20the%20playlist%20consisting%20of%20links%20to%20audio%20files%22%7D,%0A%20%22menuDownloadPhotos%22:%20%7B%22message%22:%20%22Download%20all%20pictures%20found%20on%20the%20current%20page%22%7D,%0A%20%22menuReportBug%22:%20%7B%22message%22:%20%22Let%20us%20know%20if%20you%20have%20any%20problems%22%7D,%0A%20%22menuShowOptions%22:%20%7B%22message%22:%20%22ON/OFF%20supported%20resources%20and%20Helper%20options%22%7D,%0A%20%22menuEnableExtension%22:%20%7B%22message%22:%20%22%22%7D,%0A%20%22menuOpenPoll%22:%20%7B%22message%22:%20%22We%20work%20hard%20to%20become%20better.%20Please,%20give%20us%20a%20hand!%22%7D,%0A%0A%20%22quality%22:%20%7B%22message%22:%20%22Quality%22%7D,%0A%20%22qualityNote%22:%20%7B%22message%22:%20%22The%20best%20available%20video%20will%20be%20downloaded%20If%20there%20is%20no%20chosen%20quality.%22%7D,%0A%20%22filelistTitle%22:%20%7B%22message%22:%20%22The%20list%20of%20the%20found%20files%22%7D,%0A%20%22filelistInstruction%22:%20%7B%22message%22:%20%22%5B'To%20download%20all%20files%20copy%20the%20list%20of%20links%20and%20paste%20it%20into%20the%20',%7Ba:%7Bhref:'http://en.wikipedia.org/wiki/Download_manager',text:'download%20manager'%7D%7D,'.%20If%20you%20do%20not%20have%20a%20download%20manager%20installed%20we%20recommend%20installing%20',%7Ba:%7Bhref:'http://www.freedownloadmanager.org/',text:'Free%20Download%20Manager'%7D%7D,'.'%5D%22%7D,%0A%20%22playlistTitle%22:%20%7B%22message%22:%20%22Playlist%22%7D,%0A%20%22playlistInstruction%22:%20%7B%22message%22:%20%22To%20playback%20the%20saved%20playlist%20it%20may%20be%20now%20opened%20in%20the%20music%20player.%22%7D,%0A%0A%20%22ummySfTitle%22:%20%7B%22message%22:%20%22HD%20or%20MP3%22%7D,%0A%20%22ummyMenuItem%22:%20%7B%22message%22%20:%20%22%5B%7Bspan:%7B%7D%7D,'%20via%20Ummy'%5D%22%7D,%0A%20%22ummyMenuInfo%22:%20%7B%22message%22:%20%22%5B%7Bp:%7Btext:'Fast%20and%20easy%20download%20HD%20videos%20and%20MP3%20via%20Ummy%20Video%20Downloader!'%7D%7D,%7Bp:%7Bclass:'center',append:%5B%7Ba:%7Bclass:'green-btn-2%20arrow',href:'%7Burl%7D',target:'_blank',text:'Install%20Now'%7D%7D%5D%7D%7D,%7Bp:%7Bappend:%5B'When%20installed,%20a%20download%20will%20start%20anytime%20you%20click%20on%20',%7Bimg:%7Bsrc:'#'%7D%7D%5D%7D%7D%5D%22%7D,%0A%20%22warningPopupTitle%22:%20%7B%22message%22:%20%22Check%20browser%20settings%22%7D,%0A%20%22warningPopupDesc%22:%20%7B%22message%22:%20%22The%20option%20%5C%22Always%20ask%20me%20where%20to%20save%20files%5C%22%20must%20be%20turned%20off.%22%7D,%0A%20%22readMore%22:%20%7B%22message%22:%20%22More%22%7D,%0A%20%22noWarning%22:%20%7B%22message%22:%20%22Don't%20notify%22%7D,%0A%20%22cancel%22:%20%7B%22message%22:%20%22Cancel%22%7D,%0A%20%22continue%22:%20%7B%22message%22:%20%22Continue%22%7D,%0A%20%22beforeDownloadPopupWarn%22:%20%7B%22message%22:%20%22Warning!%20Downloading%20cannot%20be%20canceled%20or%20suspended.%22%7D,%0A%0A%20%22vkInfo%22:%20%7B%22message%22:%20%22Info%22%7D,%0A%20%22vkInfoTitle%22:%20%7B%22message%22:%20%22File%20size%20and%20bitrate%22%7D,%0A%20%22vkMp3LinksNotFound%22:%20%7B%22message%22:%20%22Links%20to%20MP3%20files%20are%20not%20found%22%7D,%0A%20%22vkPhotoLinksNotFound%22:%20%7B%22message%22:%20%22Photos%20are%20not%20found%22%7D,%0A%20%22vkDownloadPhotoAlbum%22:%20%7B%22message%22:%20%22Download%20album%22%7D,%0A%20%22vkDownloadAllPhotoAlbums%22:%20%7B%22message%22:%20%22Download%20all%20albums%22%7D,%0A%20%22vkFoundPhotos%22:%20%7B%22message%22:%20%22Found%20photos%22%7D,%0A%20%22vkNotAvailablePhotos%22:%20%7B%22message%22:%20%22%25d%20photos%20are%20temporarily%20unavailable%22%7D,%0A%20%22vkFoundLinks%22:%20%7B%22message%22:%20%22Found%20links%22%7D,%0A%20%22vkFoundOf%22:%20%7B%22message%22:%20%22of%22%7D,%0A%20%22vkShowAs%22:%20%7B%22message%22:%20%22Show%20as%22%7D,%0A%20%22vkListOfLinks%22:%20%7B%22message%22:%20%22List%20of%20links%22%7D,%0A%20%22vkListOfLinksInstruction%22:%20%7B%22message%22:%20%22%5B'To%20download%20all%20photos%20copy%20the%20list%20of%20links%20and%20paste%20it%20into%20the%20',%7Ba:%7Bhref:'http://en.wikipedia.org/wiki/Download_manager',text:'download%20manager'%7D%7D,'.%20If%20you%20do%20not%20have%20a%20download%20manager%20installed%20we%20recommend%20installing%20',%7Ba:%7Bhref:'http://www.freedownloadmanager.org/',text:'Free%20Download%20Manager'%7D%7D,'.'%5D%22%7D,%0A%20%22vkTableOfThumbnails%22:%20%7B%22message%22:%20%22Table%20of%20thumbnails%22%7D,%0A%20%22vkListOfPhotos%22:%20%7B%22message%22:%20%22List%20of%20photos%22%7D,%0A%20%22vkListOfPhotosInstruction%22:%20%7B%22message%22:%20%22Click%20on%20the%20photo%20to%20download%20it.%22%7D,%0A%20%22vkKbps%22:%20%7B%22message%22:%20%22kbps%22%7D,%0A%20%22vkFileSizeByte%22:%20%7B%22message%22:%20%22B%22%7D,%0A%20%22vkFileSizeKByte%22:%20%7B%22message%22:%20%22kB%22%7D,%0A%20%22vkFileSizeMByte%22:%20%7B%22message%22:%20%22MB%22%7D,%0A%20%22vkFileSizeGByte%22:%20%7B%22message%22:%20%22GB%22%7D,%0A%20%22vkFileSizeTByte%22:%20%7B%22message%22:%20%22TB%22%7D,%0A%20%22vkDownloadFromYoutube%22:%20%7B%22message%22:%20%22%5B'Download:%20open%20',%7Ba:%7Bhref:'%7Burl%7D',text:'the%20video%20page'%7D%7D,'%20and%20press%20the%20%5C%22Download%5C%22%20button%20above%20the%20player'%5D%22%7D,%0A%20%22vkFoundFiles%22:%20%7B%22message%22:%20%22Files%20found:%20%25d%22%7D,%0A%0A%20%22shareIn%22:%20%7B%22message%22:%20%22Share%20on%20%25w%22%7D,%0A%20%22socialDesc%22:%20%7B%22message%22:%20%22SaveFrom.net%20helper%20enables%20you%20to%20download%20files%20from%20YouTube.com,%20Facebook.com,%20VK.com%20and%20more%20than%2040%20other%20just%20in%20one%20click%20for%20free%22%7D,%0A%0A%20%22tutorialS1Title%22:%20%7B%22message%22:%20%22Good%20news!%22%7D,%0A%20%22tutorialS1Main%22:%20%7B%22message%22:%20%22%5B'SaveFrom.net%20Helper%20',%7Bimg:%20%7Bsrc:%20'#logo'%7D%7D,'%20has%20been%20successfully%20installed%20and%20now%20you%20can%20download%20any%20video%20from%20YouTube%20in%20one%20click'%5D%22%7D,%0A%20%22tutorialS1Arrow%22:%20%7B%22message%22:%20%22%5B'Want%20to%20know%20how?',%7Bbr:%7B%7D%7D,'Click%20here'%5D%22%7D,%0A%20%22tutorialS2Main%22:%20%7B%22message%22:%20%22To%20download%20a%20video%20choose%20a%20format%20and%20click%20the%20%5C%22Download%5C%22%20button%22%7D,%0A%20%22tutorialS3History%22:%20%7B%22message%22:%20%22History%22%7D,%0A%20%22tutorialS3Main%22:%20%7B%22message%22:%20%22%5B'Do%20you%20want%20to%20download%20a%20video%20from%20History?',%7Bbr:%7B%7D%7D,'Just%20click%20',%20%7Bimg:%20%7Bsrc:%20'#arrow'%7D%7D,'%20on%20the%20preview%20of%20the%20previously%20watched%20video'%5D%22%7D,%0A%20%22tutorialS4Main%22:%20%7B%22message%22:%20%22%5B'No%20need%20to%20watch%20a%20video%20%E2%80%94%20just%20click%20on%20',%20%7Bimg:%20%7Bsrc:%20'#arrow'%7D%7D,',%20choose%20the%20quality,%20and%20download.%20Quite%20easy,%20isn%E2%80%99t%20it?'%5D%22%7D,%0A%20%22tutorialS5Title%22:%20%7B%22message%22:%20%22Enjoy%20SaveFrom.net%20Helper!%22%7D,%0A%20%22tutorialS5Main%22:%20%7B%22message%22:%20%22%5B'Still%20have%20questions?%20Want%20to%20share%20your%20ideas?%20Welcome%20to%20',%7Ba:%20%7Btext:%20'our%20support%20page',%20href:%20'#support'%7D%7D,'%20or%20join%20us%20on%20',%20%7Ba:%20%7Btext:%20'Facebook',%20href:%20'#fb'%7D%7D%5D%22%7D,%0A%0A%20%22tutorialTooltipText%22:%20%7B%22message%22:%20%22%5B'Just%20click%20the%20button%20to%20',%7Bb:%20%7Btext:%20'download'%7D%7D%5D%22%7D,%0A%0A%20%22ummyTooltipConfirm%22:%20%7B%22message%22:%20%22%5B'Have%20you%20already%20installed',%7Bbr:%7B%7D%7D,%7Bimg:%7B%7D%7D,'%20Ummy%20Video%20Downloader%20earlier?'%5D%22%7D,%0A%20%22yes%22:%20%7B%22message%22:%20%22Yes%22%7D,%0A%20%22no%22:%20%7B%22message%22:%20%22No%22%7D,%0A%20%22tooltipHide%22:%20%7B%22message%22:%20%22Do%20not%20show%20this%20message%20again%22%7D%0A%7D";
_languageList.es = "%7B%0A%20%22extName%22:%20%7B%22message%22:%20%22SaveFrom.net%20helper%22%7D,%0A%20%22extDescription%22:%20%7B%22message%22:%20%22Descargas%20desde%20YouTube,%20Facebook,%20VK.com%20y%2040+%20sitios%20en%20un%20s%C3%B3lo%20clic.%22%7D,%0A%0A%20%22extNameLite%22:%20%7B%22message%22:%20%22SaveFrom.net%20helper%20lite%22%7D,%0A%20%22extDescriptionLite%22:%20%7B%22message%22:%20%22Descargas%20desde%20Facebook,%20VK.com%20y%2040+%20sitios%20en%20un%20s%C3%B3lo%20clic.%22%7D,%0A%0A%20%22lang%22:%20%7B%22message%22:%20%22es%22%7D,%0A%0A%20%22titleDefault%22:%20%7B%22message%22:%20%22SaveFrom.net%20helper%22%7D,%0A%20%22titleDesabled%22:%20%7B%22message%22:%20%22SaveFrom.net%20helper%20deshabilitado%22%7D,%0A%0A%20%22menuEnable%22:%20%7B%22message%22:%20%22Habilitar%22%7D,%0A%20%22menuDisable%22:%20%7B%22message%22:%20%22Deshabilitar%22%7D,%0A%0A%20%22showButton%22:%20%7B%22message%22:%20%22Mostrar%20bot%C3%B3n%20de%20extensi%C3%B3n%22%7D,%0A%0A%20%22copy%22:%20%7B%22message%22:%20%22Copiar%22%7D,%0A%20%22download%22:%20%7B%22message%22:%20%22Descargar%22%7D,%0A%20%22downloadTitle%22:%20%7B%22message%22:%20%22Haga%20clic%20en%20el%20enlace%20mientras%20presiona%20la%20tecla%20Alt/Opci%C3%B3n%20o%20Ctrl%20para%20descargar%20el%20archivo.%22%7D,%0A%20%22noLinksFound%22:%20%7B%22message%22:%20%22No%20se%20han%20encontrado%20enlaces%22%7D,%0A%20%22more%22:%20%7B%22message%22:%20%22M%C3%A1s%22%7D,%0A%20%22close%22:%20%7B%22message%22:%20%22Cerrar%22%7D,%0A%20%22kbps%22:%20%7B%22message%22:%20%22kbps%22%7D,%0A%20%22withoutAudio%22:%20%7B%22message%22:%20%22sin%20audio%22%7D,%0A%20%22size%22:%20%7B%22message%22:%20%22tama%C3%B1o%22%7D,%0A%0A%20%22subtitles%22:%20%7B%22message%22:%20%22Subt%C3%ADtulos%22%7D,%0A%20%22playlist%22:%20%7B%22message%22:%20%22Lista%20de%20reproducci%C3%B3n%22%7D,%0A%20%22filelist%22:%20%7B%22message%22:%20%22Lista%20de%20archivos%22%7D,%0A%20%22downloadWholePlaylist%22:%20%7B%22message%22:%20%22Descargar%20toda%20la%20lista%20de%20reproducci%C3%B3n%22%7D,%0A%0A%20%22getFileSizeTitle%22:%20%7B%22message%22:%20%22Obtener%20tama%C3%B1o%20de%20archivo%22%20%7D,%0A%20%22getFileSizeFailTitle%22:%20%7B%22message%22:%20%22No%20se%20pudo%20obtener%20el%20tama%C3%B1o%20del%20archivo.%20Por%20favor,%20int%C3%A9ntelo%20de%20nuevo.%22%7D,%0A%0A%20%22lmButtonTitle%22:%20%7B%22message%22:%20%22Obtener%20un%20enlace%20directo%22%7D,%0A%0A%20%22downloadFromCurrentPage%22:%20%7B%22message%22:%20%22Ir%20a%20SaveFrom.net%22%7D,%0A%20%22updateLinks%22:%20%7B%22message%22:%20%22Actualizar%20enlaces%22%7D,%0A%20%22updateLinksNotification%22:%20%7B%22message%22:%20%22Enlaces%20actualizados%22%7D,%0A%20%22downloadMP3Files%22:%20%7B%22message%22:%20%22Descargar%20archivos%20de%20audio%22%7D,%0A%20%22downloadPlaylist%22:%20%7B%22message%22:%20%22Descargar%20una%20lista%20de%20reproducci%C3%B3n%22%7D,%0A%20%22downloadPhotos%22:%20%7B%22message%22:%20%22Descargar%20im%C3%A1genes%22%7D,%0A%20%22installFullVersion%22:%20%7B%22message%22:%20%22Instalar%20la%20versi%C3%B3n%20completa%22%7D,%0A%20%22disable%22:%20%7B%22message%22:%20%22Deshabilitar%22%7D,%0A%20%22showOptions%22:%20%7B%22message%22:%20%22Ajustes%22%7D,%0A%20%22reportBug%22:%20%7B%22message%22:%20%22Informar%20sobre%20un%20problema%22%7D,%0A%20%22openPoll%22:%20%7B%22message%22:%20%22Mejorar%22%7D,%0A%20%22disableModule%22:%20%7B%22message%22:%20%22Desactivar%20en%20este%20sitio%20web%22%7D,%0A%20%22enableModule%22:%20%7B%22message%22:%20%22Activar%20en%20este%20sitio%20web%22%7D,%0A%20%22enableDisableModule%22:%20%7B%22message%22:%20%22Activ./Desactiv.%20en%20esta%20web%22%7D,%0A%20%22showHideButton%22:%20%7B%22message%22:%20%22Mostrar/ocultar%20bot%C3%B3n%20extens%22%7D,%0A%20%22updateTo%22:%20%7B%22message%22:%20%22Actualizar%20a%20la%20%25d%22%7D,%0A%0A%20%22aboutPage%22:%20%7B%22message%22:%20%22Acerca%20de%22%7D,%0A%20%22aboutTitle%22:%20%7B%22message%22:%20%22SaveFrom.net%20Helper%22%7D,%0A%20%22aboutVersion%22:%20%7B%22message%22:%20%22Versi%C3%B3n%22%7D,%0A%20%22aboutDescription%22:%20%7B%22message%22:%20%22Ayuda%20a%20los%20usuarios%20a%20obtener%20enlaces%20directos%20para%20descargar%20desde%20m%C3%A1s%20de%2040%20sitios%20web,%20incluidos%20Dailymotion.com,%20YouTube.com,%20VK.com%20y%20otros.%22%7D,%0A%20%22aboutDescriptionLite%22:%20%7B%22message%22:%20%22Ayuda%20a%20los%20usuarios%20a%20obtener%20enlaces%20directos%20para%20descargar%20desde%20m%C3%A1s%20de%2040%20sitios%20web,%20incluidos%20Dailymotion.com,%20VK.com%20y%20otros.%22%7D,%0A%20%22aboutSupported%22:%20%7B%22message%22:%20%22Recursos%20admitidos%22%7D,%0A%20%22homePage%22:%20%7B%22message%22:%20%22P%C3%A1gina%20de%20inicio%22%7D,%0A%0A%20%22optionsTitle%22:%20%7B%22message%22:%20%22SaveFrom.net%20Helper%20-%20Preferencias%22%7D,%0A%20%22optionsHandleLinks%22:%20%7B%22message%22:%20%22Manejar%20enlaces%22%7D,%0A%20%22optionsFileHostings%22:%20%7B%22message%22:%20%22A%20servidores%20de%20archivos%22%7D,%0A%20%22optionsMediaHostings%22:%20%7B%22message%22:%20%22A%20servidores%20multimedia%22%7D,%0A%20%22optionsModules%22:%20%7B%22message%22:%20%22M%C3%B3dulos%22%7D,%0A%20%22optionsYoutube%22:%20%7B%22message%22:%20%22YouTube%22%7D,%0A%20%22optionsYTHideLinks%22:%20%7B%22message%22:%20%22Ocultar%20enlaces%22%7D,%0A%20%22optionsDailymotion%22:%20%7B%22message%22:%20%22Dailymotion%22%7D,%0A%20%22optionsVimeo%22:%20%7B%22message%22:%20%22Vimeo%22%7D,%0A%20%22optionsFacebook%22:%20%7B%22message%22:%20%22Facebook%22%7D,%0A%20%22optionsSoundcloud%22:%20%7B%22message%22:%20%22SoundCloud%22%7D,%0A%20%22optionsVkontakte%22:%20%7B%22message%22:%20%22VK%22%7D,%0A%20%22optionsOdnoklassniki%22:%20%7B%22message%22:%20%22Odnoklassniki%22%7D,%0A%20%22optionsMailru%22:%20%7B%22message%22:%20%22Moy%20Mir%22%7D,%0A%20%22optionsInstagram%22:%20%7B%22message%22:%20%22Instagram%22%7D,%0A%20%22optionsRutube%22:%20%7B%22message%22:%20%22Rutube%22%7D,%0A%20%22optionsBitrate%22:%20%7B%22message%22:%20%22Mostrar%20velocidad%20de%20bits%20instant%C3%A1neamente%22%7D,%0A%20%22optionsSovetnikEnabled%22:%20%7B%22message%22:%20%22Consejero%22%7D,%0A%20%22optionsShowUmmyInfo%22:%20%7B%22message%22:%20%22Muestra%20consejos%20para%20Ummy%20Video%20Downloader%22%7D,%0A%20%22optionsGmNativeDownload%22:%20%7B%22message%22:%20%22M%C3%B3udlo%20de%20descarga%20avanzada%22%7D,%0A%20%22optionsShowUmmyBtn%22:%20%7B%22message%22:%20%22Mostrar%20el%20bot%C3%B3n%20Ummy%22%7D,%0A%20%22optionsAviaBarEnabled%22:%20%7B%22message%22:%20%22Cheap%20Flights%20Advisor%22%7D,%0A%0A%20%22menuDownloadFromCurrentPage%22:%20%7B%22message%22:%20%22Descargar%20archivos%20de%20la%20p%C3%A1gina%20actual%20usando%20SaveFrom.net%22%7D,%0A%20%22menuUpdateLinks%22:%20%7B%22message%22:%20%22Pulse%20si%20no%20aparece%20el%20bot%C3%B3n%20Descargar%22%7D,%0A%20%22menuDownloadMP3Files%22:%20%7B%22message%22:%20%22Descargar%20todos%20los%20archivos%20de%20audio%20de%20la%20p%C3%A1gina%20actual%22%7D,%0A%20%22menuDownloadPlaylist%22:%20%7B%22message%22:%20%22Genera%20y%20descarga%20la%20lista%20de%20reproducci%C3%B3n%20que%20consiste%20en%20enlaces%20a%20archivos%20de%20audio%22%7D,%0A%20%22menuDownloadPhotos%22:%20%7B%22message%22:%20%22Descargar%20todas%20las%20im%C3%A1genes%20encontradas%20en%20la%20p%C3%A1gina%20actual%22%7D,%0A%20%22menuReportBug%22:%20%7B%22message%22:%20%22H%C3%A1ganos%20saber%20si%20tiene%20alg%C3%BAn%20problema%22%7D,%0A%20%22menuShowOptions%22:%20%7B%22message%22:%20%22ACTIVAR/DESACTIVAR%20recursos%20admitidos%20y%20opciones%20del%20Helper%22%7D,%0A%20%22menuEnableExtension%22:%20%7B%22message%22:%20%22%22%7D,%0A%20%22menuOpenPoll%22:%20%7B%22message%22:%20%22Trabajamos%20duro%20para%20mejorar.%20%C2%A1%C3%89chenos%20una%20mano!%22%7D,%0A%0A%20%22quality%22:%20%7B%22message%22:%20%22Calidad%22%7D,%0A%20%22qualityNote%22:%20%7B%22message%22:%20%22Si%20no%20se%20elige%20ninguna%20calidad,%20se%20descargar%C3%A1%20el%20mejor%20v%C3%ADdeo%20disponible.%22%7D,%0A%20%22filelistTitle%22:%20%7B%22message%22:%20%22La%20lista%20de%20los%20archivos%20encontrados%22%7D,%0A%20%22filelistInstruction%22:%20%7B%22message%22:%20%22%5B'Para%20descargar%20todos%20los%20archivos,%20copie%20la%20lista%20de%20enlaces%20y%20p%C3%A9guela%20en%20el%20',%7Ba:%7Bhref:'http://en.wikipedia.org/wiki/Download_manager',text:'gestor%20de%20descargas'%7D%7D,'.%20Si%20no%20tiene%20instalado%20un%20gestor%20de%20descargas,%20le%20recomendamos%20que%20instale%20',%7Ba:%7Bhref:'http://www.freedownloadmanager.org/',text:'Free%20Download%20Manager'%7D%7D,'.'%5D%22%7D,%0A%20%22playlistTitle%22:%20%7B%22message%22:%20%22Lista%20de%20reproducci%C3%B3n%22%7D,%0A%20%22playlistInstruction%22:%20%7B%22message%22:%20%22Para%20reproducir%20la%20lista%20de%20reproducci%C3%B3n%20guardada,%20puede%20abrirla%20ahora%20en%20el%20reproductor%20de%20m%C3%BAsica.%22%7D,%0A%0A%20%22ummySfTitle%22:%20%7B%22message%22:%20%22HD%20o%20MP3%22%7D,%0A%20%22ummyMenuItem%22:%20%7B%22message%22%20:%20%22%5B%7Bspan:%7B%7D%7D,'%20via%20Ummy'%5D%22%7D,%0A%20%22ummyMenuInfo%22:%20%7B%22message%22:%20%22%5B%7Bp:%7Btext:'Instale%20Ummy%20Video%20Downloader%20y%20descargue%20sus%20v%C3%ADdeos%20favoritos%20en%20HD%20o%20MP3.'%7D%7D,%7Bp:%7Bclass:'center',append:%5B%7Ba:%7Bclass:'green-btn-2%20arrow',href:'%7Burl%7D',target:'_blank',text:'Descargar'%7D%7D%5D%7D%7D,%7Bp:%7Bappend:%5B'Despu%C3%A9s%20de%20la%20instalaci%C3%B3n,%20se%20iniciar%C3%A1%20una%20descarga%20autom%C3%A1ticamente%20siempre%20que%20haga%20clic%20en%20',%7Bimg:%7Bsrc:'#'%7D%7D%5D%7D%7D%5D%22%7D,%0A%20%22warningPopupTitle%22:%20%7B%22message%22:%20%22Compruebe%20la%20configuraci%C3%B3n%20de%20su%20navegador%22%7D,%0A%20%22warningPopupDesc%22:%20%7B%22message%22:%20%22La%20opci%C3%B3n%20%5C%22Preguntarme%20siempre%20d%C3%B3nde%20guardar%20los%20archivos%5C%22%20debe%20estar%20desactivada.%22%7D,%0A%20%22readMore%22:%20%7B%22message%22:%20%22M%C3%A1s%22%7D,%0A%20%22noWarning%22:%20%7B%22message%22:%20%22No%20notificar%22%7D,%0A%20%22cancel%22:%20%7B%22message%22:%20%22Cancelar%22%7D,%0A%20%22continue%22:%20%7B%22message%22:%20%22Continuar%22%7D,%0A%20%22beforeDownloadPopupWarn%22:%20%7B%22message%22:%20%22%C2%A1Advertencia!%20La%20descarga%20no%20se%20puede%20cancelar%20o%20suspender.%22%7D,%0A%0A%20%22vkInfo%22:%20%7B%22message%22:%20%22Informaci%C3%B3n%22%7D,%0A%20%22vkInfoTitle%22:%20%7B%22message%22:%20%22Tama%C3%B1o%20de%20archivo%20y%20velocidad%20de%20bits%22%7D,%0A%20%22vkMp3LinksNotFound%22:%20%7B%22message%22:%20%22No%20se%20han%20encontrado%20enlaces%20a%20archivos%20MP3%22%7D,%0A%20%22vkPhotoLinksNotFound%22:%20%7B%22message%22:%20%22No%20se%20han%20encontrado%20im%C3%A1genes%22%7D,%0A%20%22vkDownloadPhotoAlbum%22:%20%7B%22message%22:%20%22Descargar%20%C3%A1lbum%22%7D,%0A%20%22vkDownloadAllPhotoAlbums%22:%20%7B%22message%22:%20%22Descargar%20todos%20los%20%C3%A1lbums%22%7D,%0A%20%22vkFoundPhotos%22:%20%7B%22message%22:%20%22Im%C3%A1genes%20encontradas%22%7D,%0A%20%22vkNotAvailablePhotos%22:%20%7B%22message%22:%20%22%25d%20im%C3%A1genes%20est%C3%A1n%20temporalmente%20no%20disponibles%22%7D,%0A%20%22vkFoundLinks%22:%20%7B%22message%22:%20%22Enlaces%20encontrados%22%7D,%0A%20%22vkFoundOf%22:%20%7B%22message%22:%20%22de%22%7D,%0A%20%22vkShowAs%22:%20%7B%22message%22:%20%22Mostrar%20como%22%7D,%0A%20%22vkListOfLinks%22:%20%7B%22message%22:%20%22Lista%20de%20enlaces%22%7D,%0A%20%22vkListOfLinksInstruction%22:%20%7B%22message%22:%20%22%5B'Para%20descargar%20todas%20las%20im%C3%A1genes,%20copie%20la%20lista%20de%20enlaces%20y%20p%C3%A9guela%20en%20el%20',%7Ba:%7Bhref:'http://en.wikipedia.org/wiki/Download_manager',text:'gestor%20de%20descargas'%7D%7D,'.%20Si%20no%20tiene%20instalado%20un%20gestor%20de%20descargas,%20le%20recomendamos%20que%20instale%20',%7Ba:%7Bhref:'http://www.freedownloadmanager.org/',text:'Free%20Download%20Manager'%7D%7D,'.'%5D%22%7D,%0A%20%22vkTableOfThumbnails%22:%20%7B%22message%22:%20%22Tabla%20de%20miniaturas%22%7D,%0A%20%22vkListOfPhotos%22:%20%7B%22message%22:%20%22Lista%20de%20im%C3%A1genes%22%7D,%0A%20%22vkListOfPhotosInstruction%22:%20%7B%22message%22:%20%22Haga%20clic%20en%20la%20imagen%20para%20descargarla.%22%7D,%0A%20%22vkKbps%22:%20%7B%22message%22:%20%22kbps%22%7D,%0A%20%22vkFileSizeByte%22:%20%7B%22message%22:%20%22B%22%7D,%0A%20%22vkFileSizeKByte%22:%20%7B%22message%22:%20%22kB%22%7D,%0A%20%22vkFileSizeMByte%22:%20%7B%22message%22:%20%22MB%22%7D,%0A%20%22vkFileSizeGByte%22:%20%7B%22message%22:%20%22GB%22%7D,%0A%20%22vkFileSizeTByte%22:%20%7B%22message%22:%20%22TB%22%7D,%0A%20%22vkDownloadFromYoutube%22:%20%7B%22message%22:%20%22%5B'Descargar:%20abra%20',%7Ba:%7Bhref:'%7Burl%7D',text:'la%20p%C3%A1gina%20del%20v%C3%ADdeo'%7D%7D,'%20y%20pulse%20el%20bot%C3%B3n%20%5C%22Descargar%5C%22%20sobre%20el%20reproductor'%5D%22%7D,%0A%20%22vkFoundFiles%22:%20%7B%22message%22:%20%22Archivos%20encontrados:%20%25d%22%7D,%0A%0A%20%22shareIn%22:%20%7B%22message%22:%20%22Compartir%20en%20%25w%22%7D,%0A%20%22socialDesc%22:%20%7B%22message%22:%20%22SaveFrom.net%20helper%20le%20permite%20descargar%20archivos%20desde%20YouTube.com,%20Facebook.com,%20VK.com%20y%20m%C3%A1s%20de%2040%20sitios%20distintos%20con%20tan%20s%C3%B3lo%20un%20clic%20y%20gratis%22%7D,%0A%0A%20%22tutorialS1Title%22:%20%7B%22message%22:%20%22%C2%A1Excelentes%20noticias!%22%7D,%0A%20%22tutorialS1Main%22:%20%7B%22message%22:%20%22%5B'SaveFrom.net%20Helper%20',%7Bimg:%20%7Bsrc:%20'#logo'%7D%7D,%20'%20se%20instal%C3%B3%20con%20%C3%A9xito%20y%20ahora%20puedes%20descargar%20cualquier%20video%20de%20YouTube%20con%20un%20solo%20clic'%5D%22%7D,%0A%20%22tutorialS1Arrow%22:%20%7B%22message%22:%20%22%5B'%C2%BFQuieres%20saber%20c%C3%B3mo?',%20%7Bbr:%7B%7D%7D,%20'Haz%20clic%20aqu%C3%AD'%5D%22%7D,%0A%20%22tutorialS2Main%22:%20%7B%22message%22:%20%22Para%20descargar%20un%20video,%20elige%20el%20formato%20y%20haz%20clic%20en%20el%20bot%C3%B3n%20%5C%22Descargar%5C%22%22%7D,%0A%20%22tutorialS3History%22:%20%7B%22message%22:%20%22Historial%22%7D,%0A%20%22tutorialS3Main%22:%20%7B%22message%22:%20%22%5B'%C2%BFDeseas%20descargar%20un%20video%20del%20Historial?',%20%7Bbr:%7B%7D%7D,%20'Simplemente%20haz%20clic%20en%20',%20%7Bimg:%20%7Bsrc:%20'#arrow'%7D%7D,%20'%20en%20la%20vista%20previa%20del%20video%20visto%20anteriormente.'%5D%22%7D,%0A%20%22tutorialS4Main%22:%20%7B%22message%22:%20%22%5B'No%20es%20necesario%20mirar%20un%20video:%20simplemente%20haz%20clic%20en%20',%20%7Bimg:%20%7Bsrc:%20'#arrow'%7D%7D,%20',%20elige%20la%20calidad%20y%20desc%C3%A1rgalo.%20F%C3%A1cil,%20%C2%BFverdad?'%5D%22%7D,%0A%20%22tutorialS5Title%22:%20%7B%22message%22:%20%22%C2%A1Disfruta%20de%20SaveForm.net%20Helper!%22%7D,%0A%20%22tutorialS5Main%22:%20%7B%22message%22:%20%22%5B'%C2%BFTodav%C3%ADa%20tienes%20preguntas?%20%C2%BFQuieres%20compartir%20tus%20ideas?%20Puedes%20ir%20a%20nuestra%20',%7Ba:%20%7Btext:%20'p%C3%A1gina%20de%20soporte',%20href:%20'#support'%7D%7D,'%20o%20unirte%20a%20nosotros%20en%20',%20%7Ba:%20%7Btext:%20'Facebook',%20href:%20'#fb'%7D%7D%5D%22%7D,%0A%0A%20%22tutorialTooltipText%22:%20%7B%22message%22:%20%22%5B'Simplemente%20haz%20clic%20en%20el%20bot%C3%B3n%20para%20',%7Bb:%20%7Btext:%20'descargar'%7D%7D%5D%22%7D,%0A%0A%20%22ummyTooltipConfirm%22:%20%7B%22message%22:%20%22%5B'%C2%BFYa%20has%20instalado',%7Bbr:%7B%7D%7D,%7Bimg:%7B%7D%7D,'%20Ummy%20Video%20Downloader%20antes?'%5D%22%7D,%0A%20%22yes%22:%20%7B%22message%22:%20%22S%C3%AD%22%7D,%0A%20%22no%22:%20%7B%22message%22:%20%22No%22%7D,%0A%20%22tooltipHide%22:%20%7B%22message%22:%20%22No%20mostrar%20de%20nuevo%20este%20mensaje%22%7D%0A%7D";
_languageList.fr = "%7B%0A%20%22extName%22:%20%7B%22message%22:%20%22SaveFrom.net%20Helper%22%7D,%0A%20%22extDescription%22:%20%7B%22message%22:%20%22T%C3%A9l%C3%A9chargez%20YouTube,%20Facebook,%20VK.com%20et%2040+%20sites%20en%20un%20seul%20clic.%22%7D,%0A%0A%20%22extNameLite%22:%20%7B%22message%22:%20%22SaveFrom.net%20Helper%20lite%22%7D,%0A%20%22extDescriptionLite%22:%20%7B%22message%22:%20%22T%C3%A9l%C3%A9chargez%20Facebook,%20VK.com%20et%2040+%20sites%20en%20un%20seul%20clic.%22%7D,%0A%0A%20%22lang%22:%20%7B%22message%22:%20%22fr%22%7D,%0A%0A%20%22titleDefault%22:%20%7B%22message%22:%20%22SaveFrom.net%20Helper%22%7D,%0A%20%22titleDesabled%22:%20%7B%22message%22:%20%22Assistant%20SaveFrom.net%20d%C3%A9sactiv%C3%A9%22%7D,%0A%0A%20%22menuEnable%22:%20%7B%22message%22:%20%22Activer%22%7D,%0A%20%22menuDisable%22:%20%7B%22message%22:%20%22D%C3%A9sactiver%22%7D,%0A%0A%20%22showButton%22:%20%7B%22message%22:%20%22Afficher%20le%20bouton%20d'extension%22%7D,%0A%0A%20%22copy%22:%20%7B%22message%22:%20%22Copier%22%7D,%0A%20%22download%22:%20%7B%22message%22:%20%22T%C3%A9l%C3%A9charger%22%7D,%0A%20%22downloadTitle%22:%20%7B%22message%22:%20%22Cliquer%20sur%20le%20lien%20tout%20en%20maintenant%20la%20touche%20Alt/Option%20ou%20Ctrl%20pour%20t%C3%A9l%C3%A9charger%20le%20fichier.%22%7D,%0A%20%22noLinksFound%22:%20%7B%22message%22:%20%22Aucun%20lien%20n'a%20%C3%A9t%C3%A9%20trouv%C3%A9%22%7D,%0A%20%22more%22:%20%7B%22message%22:%20%22Plus%22%7D,%0A%20%22close%22:%20%7B%22message%22:%20%22Fermer%22%7D,%0A%20%22kbps%22:%20%7B%22message%22:%20%22kbps%22%7D,%0A%20%22withoutAudio%22:%20%7B%22message%22:%20%22sans%20audio%22%7D,%0A%20%22size%22:%20%7B%22message%22:%20%22taille%22%7D,%0A%0A%20%22subtitles%22:%20%7B%22message%22:%20%22Sous-titres%22%7D,%0A%20%22playlist%22:%20%7B%22message%22:%20%22Playlist%22%7D,%0A%20%22filelist%22:%20%7B%22message%22:%20%22Liste%20de%20fichiers%22%7D,%0A%20%22downloadWholePlaylist%22:%20%7B%22message%22:%20%22T%C3%A9l%C3%A9charger%20toute%20la%20playlist%22%7D,%0A%0A%20%22getFileSizeTitle%22:%20%7B%22message%22:%20%22Obtenir%20la%20taille%20du%20fichier%22%20%7D,%0A%20%22getFileSizeFailTitle%22:%20%7B%22message%22:%20%22Impossible%20d'obtenir%20la%20taille%20du%20fichier.%20Veuillez%20r%C3%A9essayer.%22%7D,%0A%0A%20%22lmButtonTitle%22:%20%7B%22message%22:%20%22Obtenir%20un%20lien%20direct%22%7D,%0A%0A%20%22downloadFromCurrentPage%22:%20%7B%22message%22:%20%22Aller%20%C3%A0%20SaveFrom.net%22%7D,%0A%20%22updateLinks%22:%20%7B%22message%22:%20%22Rafra%C3%AEchir%20les%20liens%22%7D,%0A%20%22updateLinksNotification%22:%20%7B%22message%22:%20%22Liens%20mis%20%C3%A0%20jour%22%7D,%0A%20%22downloadMP3Files%22:%20%7B%22message%22:%20%22T%C3%A9l%C3%A9charger%20les%20fichiers%20audio%22%7D,%0A%20%22downloadPlaylist%22:%20%7B%22message%22:%20%22T%C3%A9l%C3%A9charger%20une%20playlist%22%7D,%0A%20%22downloadPhotos%22:%20%7B%22message%22:%20%22T%C3%A9l%C3%A9charger%20les%20images%22%7D,%0A%20%22installFullVersion%22:%20%7B%22message%22:%20%22Installer%20la%20version%20compl%C3%A8te%22%7D,%0A%20%22disable%22:%20%7B%22message%22:%20%22D%C3%A9sactiver%22%7D,%0A%20%22showOptions%22:%20%7B%22message%22:%20%22Param%C3%A8tres%22%7D,%0A%20%22reportBug%22:%20%7B%22message%22:%20%22Signaler%20un%20bug%22%7D,%0A%20%22openPoll%22:%20%7B%22message%22:%20%22Am%C3%A9liorer%22%7D,%0A%20%22disableModule%22:%20%7B%22message%22:%20%22D%C3%A9sactiver%20sur%20ce%20site%22%7D,%0A%20%22enableModule%22:%20%7B%22message%22:%20%22Activer%20sur%20ce%20site%22%7D,%0A%20%22enableDisableModule%22:%20%7B%22message%22:%20%22Activer%20On/Off%20sur%20ce%20site%20web%22%7D,%0A%20%22showHideButton%22:%20%7B%22message%22:%20%22Afficher/masquer%20le%20bouton%20d'extension%22%7D,%0A%20%22updateTo%22:%20%7B%22message%22:%20%22Passer%20%C3%A0%20la%20version%20%25d%22%7D,%0A%0A%20%22aboutPage%22:%20%7B%22message%22:%20%22%C3%80%20propos%22%7D,%0A%20%22aboutTitle%22:%20%7B%22message%22:%20%22SaveFrom.net%20Helper%22%7D,%0A%20%22aboutVersion%22:%20%7B%22message%22:%20%22Version%22%7D,%0A%20%22aboutDescription%22:%20%7B%22message%22:%20%22Aide%20les%20utilisateurs%20%C3%A0%20obtenir%20des%20liens%20directs%20pour%20t%C3%A9l%C3%A9charger%20depuis%20plus%20de%2040%20sites%20web,%20y%20compris%20Dailymotion.com,%20YouTube.com,%20VK.com%20et%20d'autres.%22%7D,%0A%20%22aboutDescriptionLite%22:%20%7B%22message%22:%20%22Aide%20les%20utilisateurs%20%C3%A0%20obtenir%20des%20liens%20directs%20pour%20t%C3%A9l%C3%A9charger%20depuis%20plus%20de%2040%20sites%20web,%20y%20compris%20Dailymotion.com,%20VK.com%20et%20d'autres.%22%7D,%0A%20%22aboutSupported%22:%20%7B%22message%22:%20%22Ressources%20prises%20en%20charge%22%7D,%0A%20%22homePage%22:%20%7B%22message%22:%20%22Page%20d'accueil%22%7D,%0A%0A%20%22optionsTitle%22:%20%7B%22message%22:%20%22SaveFrom.net%20Helper%20-%20Pr%C3%A9f%C3%A9rences%22%7D,%0A%20%22optionsHandleLinks%22:%20%7B%22message%22:%20%22manipuler%20les%20liens%22%7D,%0A%20%22optionsFileHostings%22:%20%7B%22message%22:%20%22Vers%20l'h%C3%A9bergement%20de%20fichiers%22%7D,%0A%20%22optionsMediaHostings%22:%20%7B%22message%22:%20%22Vers%20l'h%C3%A9bergement%20de%20m%C3%A9dias%22%7D,%0A%20%22optionsModules%22:%20%7B%22message%22:%20%22Modules%22%7D,%0A%20%22optionsYoutube%22:%20%7B%22message%22:%20%22YouTube%22%7D,%0A%20%22optionsYTHideLinks%22:%20%7B%22message%22:%20%22Masquer%20les%20liens%22%7D,%0A%20%22optionsDailymotion%22:%20%7B%22message%22:%20%22Dailymotion%22%7D,%0A%20%22optionsVimeo%22:%20%7B%22message%22:%20%22Vimeo%22%7D,%0A%20%22optionsFacebook%22:%20%7B%22message%22:%20%22Facebook%22%7D,%0A%20%22optionsSoundcloud%22:%20%7B%22message%22:%20%22SoundCloud%22%7D,%0A%20%22optionsVkontakte%22:%20%7B%22message%22:%20%22VK%22%7D,%0A%20%22optionsOdnoklassniki%22:%20%7B%22message%22:%20%22Odnoklassniki%22%7D,%0A%20%22optionsMailru%22:%20%7B%22message%22:%20%22Moy%20Mir%22%7D,%0A%20%22optionsInstagram%22:%20%7B%22message%22:%20%22Instagram%22%7D,%0A%20%22optionsRutube%22:%20%7B%22message%22:%20%22Rutube%22%7D,%0A%20%22optionsBitrate%22:%20%7B%22message%22:%20%22Afficher%20instantan%C3%A9ment%20le%20bitrate%22%7D,%0A%20%22optionsSovetnikEnabled%22:%20%7B%22message%22:%20%22Advisor%22%7D,%0A%20%22optionsShowUmmyInfo%22:%20%7B%22message%22:%20%22Afficher%20les%20astuces%20pour%20Ummy%20Video%20Downloader%22%7D,%0A%20%22optionsGmNativeDownload%22:%20%7B%22message%22:%20%22Mode%20de%20t%C3%A9l%C3%A9chargement%20avanc%C3%A9%22%7D,%0A%20%22optionsShowUmmyBtn%22:%20%7B%22message%22:%20%22Montrer%20le%20bouton%20Ummy%22%7D,%0A%20%22optionsAviaBarEnabled%22:%20%7B%22message%22:%20%22Cheap%20Flights%20Advisor%22%7D,%0A%0A%20%22menuDownloadFromCurrentPage%22:%20%7B%22message%22:%20%22T%C3%A9l%C3%A9chargement%20des%20fichiers%20depuis%20la%20page%20actuelle%20en%20utilisant%20SaveFrom.net%22%7D,%0A%20%22menuUpdateLinks%22:%20%7B%22message%22:%20%22Appuyez%20si%20le%20bouton%20T%C3%A9l%C3%A9charger%20n'appara%C3%AEt%20pas%22%7D,%0A%20%22menuDownloadMP3Files%22:%20%7B%22message%22:%20%22T%C3%A9l%C3%A9charger%20tous%20les%20fichiers%20audio%20trouv%C3%A9s%20sur%20la%20page%20actuelle%22%7D,%0A%20%22menuDownloadPlaylist%22:%20%7B%22message%22:%20%22G%C3%A9n%C3%A8re%20et%20t%C3%A9l%C3%A9charge%20la%20playlist%20consistant%20en%20liens%20vers%20les%20fichiers%20audio%22%7D,%0A%20%22menuDownloadPhotos%22:%20%7B%22message%22:%20%22T%C3%A9l%C3%A9charger%20toutes%20les%20images%20trouv%C3%A9es%20sur%20la%20page%20actuelle%22%7D,%0A%20%22menuReportBug%22:%20%7B%22message%22:%20%22Pr%C3%A9venez-nous%20si%20vous%20avez%20des%20probl%C3%A8mes%22%7D,%0A%20%22menuShowOptions%22:%20%7B%22message%22:%20%22ON/OFF%20ressources%20prises%20en%20charge%20et%20options%20Helper%22%7D,%0A%20%22menuEnableExtension%22:%20%7B%22message%22:%20%22%22%7D,%0A%20%22menuOpenPoll%22:%20%7B%22message%22:%20%22Nous%20faisons%20tout%20pour%20nous%20am%C3%A9liorer.%20N'h%C3%A9sitez%20pas%20%C3%A0%20nous%20aider%20!%22%7D,%0A%0A%20%22quality%22:%20%7B%22message%22:%20%22Qualit%C3%A9%22%7D,%0A%20%22qualityNote%22:%20%7B%22message%22:%20%22La%20meilleure%20vid%C3%A9o%20disponible%20sera%20t%C3%A9l%C3%A9charg%C3%A9e%20s'il%20n'y%20a%20pas%20de%20qualit%C3%A9%20choisie.%22%7D,%0A%20%22filelistTitle%22:%20%7B%22message%22:%20%22La%20liste%20des%20fichiers%20trouv%C3%A9s%22%7D,%0A%20%22filelistInstruction%22:%20%7B%22message%22:%20%22%5B'Pour%20t%C3%A9l%C3%A9charger%20tous%20les%20fichiers%20copiez%20la%20liste%20des%20liens%20et%20collez-la%20dans%20',%7Ba:%7Bhref:'http://en.wikipedia.org/wiki/Download_manager',text:'download%20manager'%7D%7D,'.%20Si%20vous%20n%5C%5C'avez%20pas%20install%C3%A9%20de%20gestionnaire%20de%20t%C3%A9l%C3%A9chargement,%20nous%20vous%20recommandons%20d%5C%5C'installer%20',%7Ba:%7Bhref:'http://www.freedownloadmanager.org/',text:'Free%20Download%20Manager'%7D%7D,'.'%5D%22%7D,%0A%20%22playlistTitle%22:%20%7B%22message%22:%20%22Playlist%22%7D,%0A%20%22playlistInstruction%22:%20%7B%22message%22:%20%22Pour%20lire%20la%20playlist%20sauvegard%C3%A9e,%20ouvrez-la%20dans%20le%20lecteur%20musical.%22%7D,%0A%0A%20%22ummySfTitle%22:%20%7B%22message%22:%20%22HD%20ou%20MP3%22%7D,%0A%20%22ummyMenuItem%22:%20%7B%22message%22%20:%20%22%5B%7Bspan:%7B%7D%7D,'%20via%20Ummy'%5D%22%7D,%0A%20%22ummyMenuInfo%22:%20%7B%22message%22:%20%22%5B%7Bp:%7Btext:'Installez%20Ummy%20Video%20Downloader%20et%20t%C3%A9l%C3%A9chargez%20vos%20vid%C3%A9os%20favorites%20en%20HD%20ou%20MP3.'%7D%7D,%7Bp:%7Bclass:'center',append:%5B%7Ba:%7Bclass:'green-btn-2%20arrow',href:'%7Burl%7D',target:'_blank',text:'Download'%7D%7D%5D%7D%7D,%7Bp:%7Bappend:%5B'Apr%C3%A8s%20l%5C%5C'installation,%20un%20t%C3%A9l%C3%A9chargement%20d%C3%A9marrera%20automatiquement%20d%C3%A8s%20que%20vous%20cliquez%20sur%20',%7Bimg:%7Bsrc:'#'%7D%7D%5D%7D%7D%5D%22%7D,%0A%20%22warningPopupTitle%22:%20%7B%22message%22:%20%22V%C3%A9rifier%20les%20param%C3%A8tres%20du%20navigateur%22%7D,%0A%20%22warningPopupDesc%22:%20%7B%22message%22:%20%22L'option%20%5C%22Toujours%20me%20demander%20o%C3%B9%20sauvegarder%20les%20fichiers%5C%22%20doit%20%C3%AAtre%20d%C3%A9sactiv%C3%A9e.%22%7D,%0A%20%22readMore%22:%20%7B%22message%22:%20%22Plus%22%7D,%0A%20%22noWarning%22:%20%7B%22message%22:%20%22ne%20pas%20notifier'%22%7D,%0A%20%22cancel%22:%20%7B%22message%22:%20%22Annuler%22%7D,%0A%20%22continue%22:%20%7B%22message%22:%20%22Continuer%22%7D,%0A%20%22beforeDownloadPopupWarn%22:%20%7B%22message%22:%20%22Attention!%20Le%20t%C3%A9l%C3%A9chargement%20ne%20peut%20pas%20%C3%AAtre%20annul%C3%A9%20ou%20suspendu.%22%7D,%0A%0A%20%22vkInfo%22:%20%7B%22message%22:%20%22Info%22%7D,%0A%20%22vkInfoTitle%22:%20%7B%22message%22:%20%22Taille%20de%20fichier%20et%20bitrate%22%7D,%0A%20%22vkMp3LinksNotFound%22:%20%7B%22message%22:%20%22Les%20liens%20vers%20les%20fichiers%20MP3%20sont%20introuvables%22%7D,%0A%20%22vkPhotoLinksNotFound%22:%20%7B%22message%22:%20%22Photos%20introuvables%22%7D,%0A%20%22vkDownloadPhotoAlbum%22:%20%7B%22message%22:%20%22T%C3%A9l%C3%A9charger%20l'album%22%7D,%0A%20%22vkDownloadAllPhotoAlbums%22:%20%7B%22message%22:%20%22T%C3%A9l%C3%A9charger%20tous%20les%20albums%22%7D,%0A%20%22vkFoundPhotos%22:%20%7B%22message%22:%20%22Photos%20trouv%C3%A9es%22%7D,%0A%20%22vkNotAvailablePhotos%22:%20%7B%22message%22:%20%22%25d%20photos%20sont%20temporairement%20indisponibles%22%7D,%0A%20%22vkFoundLinks%22:%20%7B%22message%22:%20%22Liens%20trouv%C3%A9s%22%7D,%0A%20%22vkFoundOf%22:%20%7B%22message%22:%20%22de%22%7D,%0A%20%22vkShowAs%22:%20%7B%22message%22:%20%22Afficher%20comme%22%7D,%0A%20%22vkListOfLinks%22:%20%7B%22message%22:%20%22Liste%20des%20liens%22%7D,%0A%20%22vkListOfLinksInstruction%22:%20%7B%22message%22:%20%22%5B'Pour%20t%C3%A9l%C3%A9charger%20toutes%20les%20photos%20copiez%20la%20liste%20des%20liens%20et%20collez-la%20dans%20',%7Ba:%7Bhref:'http://en.wikipedia.org/wiki/Download_manager',text:'download%20manager'%7D%7D,'.%20Si%20vous%20n%5C%5C'avez%20pas%20install%C3%A9%20de%20gestionnaire%20de%20t%C3%A9l%C3%A9chargement%20nous%20vous%20recommandons%20d%5C%5C'installer%20',%7Ba:%7Bhref:'http://www.freedownloadmanager.org/',text:'Free%20Download%20Manager'%7D%7D,'.'%5D%22%7D,%0A%20%22vkTableOfThumbnails%22:%20%7B%22message%22:%20%22Tableau%20des%20vignettes%22%7D,%0A%20%22vkListOfPhotos%22:%20%7B%22message%22:%20%22Liste%20des%20photos%22%7D,%0A%20%22vkListOfPhotosInstruction%22:%20%7B%22message%22:%20%22Cliquez%20sur%20la%20photo%20pour%20la%20t%C3%A9l%C3%A9charger.%22%7D,%0A%20%22vkKbps%22:%20%7B%22message%22:%20%22kbps%22%7D,%0A%20%22vkFileSizeByte%22:%20%7B%22message%22:%20%22O%22%7D,%0A%20%22vkFileSizeKByte%22:%20%7B%22message%22:%20%22ko%22%7D,%0A%20%22vkFileSizeMByte%22:%20%7B%22message%22:%20%22Mo%22%7D,%0A%20%22vkFileSizeGByte%22:%20%7B%22message%22:%20%22Go%22%7D,%0A%20%22vkFileSizeTByte%22:%20%7B%22message%22:%20%22To%22%7D,%0A%20%22vkDownloadFromYoutube%22:%20%7B%22message%22:%20%22%5B'Download:%20open%20',%7Ba:%7Bhref:'%7Burl%7D',text:'the%20video%20page'%7D%7D,'%20et%20appuyez%20sur%20le%20bouton%20%5C%22T%C3%A9l%C3%A9charger%5C%22%20au-dessus%20du%20lecteur'%5D%22%7D,%0A%20%22vkFoundFiles%22:%20%7B%22message%22:%20%22Fichiers%20trouv%C3%A9s%20:%20%25d%22%7D,%0A%0A%20%22shareIn%22:%20%7B%22message%22:%20%22Partager%20sur%20%25w%22%7D,%0A%20%22socialDesc%22:%20%7B%22message%22:%20%22SaveFrom.net%20helper%20vous%20permet%20de%20t%C3%A9l%C3%A9charger%20des%20fichiers%20de%20YouTube.com,%20Facebook.com,%20VK.com%20et%20plus%20de%2040%20autres%20gratuitement%20et%20en%20un%20seul%20clic%22%7D,%0A%0A%20%22tutorialS1Title%22:%20%7B%22message%22:%20%22Bonnes%20nouvelles%20!%22%7D,%0A%20%22tutorialS1Main%22:%20%7B%22message%22:%20%22%5B'SaveFrom.net%20Helper%20',%7Bimg:%20%7Bsrc:%20'#logo'%7D%7D,%20'%20a%20%C3%A9t%C3%A9%20install%C3%A9%20avec%20succ%C3%A8s%20et%20maintenant%20vous%20pouvez%20t%C3%A9l%C3%A9charger%20les%20vid%C3%A9os%20de%20YouTube%20en%20un%20clic'%5D%22%7D,%0A%20%22tutorialS1Arrow%22:%20%7B%22message%22:%20%22%5B'Vous%20voulez%20savoir%20comment%20?%20Cliquez%20ici'%5D%22%7D,%0A%20%22tutorialS2Main%22:%20%7B%22message%22:%20%22Pour%20t%C3%A9l%C3%A9charger%20une%20vid%C3%A9o,%20choisissez%20un%20format%20et%20cliquez%20sur%20le%20bouton%20%5C%22T%C3%A9l%C3%A9charger%5C%22%22%7D,%0A%20%22tutorialS3History%22:%20%7B%22message%22:%20%22Historique%22%7D,%0A%20%22tutorialS3Main%22:%20%7B%22message%22:%20%22%5B'Voulez-vous%20t%C3%A9l%C3%A9charger%20une%20vid%C3%A9o%20depuis%20l%E2%80%99historique%20?',%20%7Bbr:%7B%7D%7D,%20'Il%20suffit%20de%20cliquer%20sur%20',%20%7Bimg:%20%7Bsrc:%20'#arrow'%7D%7D,%20'%20situ%C3%A9e%20sur%20l%5C%5C'aper%C3%A7u%20de%20la%20vid%C3%A9o%20pr%C3%A9c%C3%A9demment%20regard%C3%A9e'%5D%22%7D,%0A%20%22tutorialS4Main%22:%20%7B%22message%22:%20%22%5B'Pas%20besoin%20de%20regarder%20une%20vid%C3%A9o%20%E2%80%94%20il%20suffit%20de%20cliquer%20sur%20',%20%7Bimg:%20%7Bsrc:%20'#arrow'%7D%7D,%20',%20faites%20le%20choix%20de%20la%20qualit%C3%A9,%20et%20t%C3%A9l%C3%A9charger.%20Facile,%20est-ce%20pas%20?'%5D%22%7D,%0A%20%22tutorialS5Title%22:%20%7B%22message%22:%20%22Profitez%20de%20SaveFrom.net%20Helper%20!%22%7D,%0A%20%22tutorialS5Main%22:%20%7B%22message%22:%20%22%5B'Vous%20avez%20encore%20des%20questions%20?%20Vous%20voulez%20partager%20vos%20id%C3%A9es%20?%20Bienvenue%20sur%20notre%20page%20',%7Ba:%20%7Btext:%20'de%20d%E2%80%99Aide',%20href:%20'#support'%7D%7D,'%20ou%20rejoignez-nous%20sur%20',%20%7Ba:%20%7Btext:%20'Facebook',%20href:%20'#fb'%7D%7D%5D%22%7D,%0A%0A%20%22tutorialTooltipText%22:%20%7B%22message%22:%20%22%5B'Il%20suffit%20de%20cliquer%20sur%20le%20bouton%20pour%20',%7Bb:%20%7Btext:%20't%C3%A9l%C3%A9charger'%7D%7D%5D%22%7D,%0A%0A%20%22ummyTooltipConfirm%22:%20%7B%22message%22:%20%22%5B'Avez-vous%20d%C3%A9j%C3%A0%20install%C3%A9',%7Bbr:%7B%7D%7D,%7Bimg:%7B%7D%7D,'%20Ummy%20Video%20Downloader%20avant%20?'%5D%22%7D,%0A%20%22yes%22:%20%7B%22message%22:%20%22Oui%22%7D,%0A%20%22no%22:%20%7B%22message%22:%20%22Non%22%7D,%0A%20%22tooltipHide%22:%20%7B%22message%22:%20%22Ne%20plus%20afficher%20ce%20message%22%7D%0A%7D";
_languageList.id = "%7B%0A%20%22extName%22:%20%7B%22message%22:%20%22Bantuan%20SaveFrom.net%22%7D,%0A%20%22extDescription%22:%20%7B%22message%22:%20%22Unduh%20YouTube,%20Facebook,%20VK.com,%20dan%2040+%20situs%20dengan%20satu%20klik.%22%7D,%0A%0A%20%22extNameLite%22:%20%7B%22message%22:%20%22Bantuan%20SaveFrom.net%20lite%22%7D,%0A%20%22extDescriptionLite%22:%20%7B%22message%22:%20%22Unduh%20Facebook,%20VK.com,%20dan%2040+%20situs%20dengan%20satu%20klik.%22%7D,%0A%0A%20%22lang%22:%20%7B%22message%22:%20%22id%22%7D,%0A%0A%20%22titleDefault%22:%20%7B%22message%22:%20%22Bantuan%20SaveFrom.net%22%7D,%0A%20%22titleDesabled%22:%20%7B%22message%22:%20%22Bantuan%20SaveFrom.net%20nonaktif%22%7D,%0A%0A%20%22menuEnable%22:%20%7B%22message%22:%20%22Aktifkan%22%7D,%0A%20%22menuDisable%22:%20%7B%22message%22:%20%22Nonaktifkan%22%7D,%0A%0A%20%22showButton%22:%20%7B%22message%22:%20%22Tampilkan%20tombol%20ekstensi%22%7D,%0A%0A%20%22copy%22:%20%7B%22message%22:%20%22Salin%22%7D,%0A%20%22download%22:%20%7B%22message%22:%20%22Unduh%22%7D,%0A%20%22downloadTitle%22:%20%7B%22message%22:%20%22Klik%20tautan%20sambil%20menahan%20tombol%20Alt/Option%20atau%20Ctrl%20untuk%20mengunduh%20file.%22%7D,%0A%20%22noLinksFound%22:%20%7B%22message%22:%20%22Tautan%20tidak%20ditemukan%22%7D,%0A%20%22more%22:%20%7B%22message%22:%20%22Lainnya%22%7D,%0A%20%22close%22:%20%7B%22message%22:%20%22Tutup%22%7D,%0A%20%22kbps%22:%20%7B%22message%22:%20%22kbps%22%7D,%0A%20%22withoutAudio%22:%20%7B%22message%22:%20%22tanpa%20audio%22%7D,%0A%20%22size%22:%20%7B%22message%22:%20%22ukuran%22%7D,%0A%0A%20%22subtitles%22:%20%7B%22message%22:%20%22Subtitel%22%7D,%0A%20%22playlist%22:%20%7B%22message%22:%20%22Daftar%20putar%22%7D,%0A%20%22filelist%22:%20%7B%22message%22:%20%22Daftar%20file%22%7D,%0A%20%22downloadWholePlaylist%22:%20%7B%22message%22:%20%22Unduh%20seluruh%20daftar%20putar%22%7D,%0A%0A%20%22getFileSizeTitle%22:%20%7B%22message%22:%20%22Dapatkan%20ukuran%20file%22%20%7D,%0A%20%22getFileSizeFailTitle%22:%20%7B%22message%22:%20%22Gagal%20mendapatkan%20ukuran%20file.%20Mohon%20coba%20lagi.%22%7D,%0A%0A%20%22lmButtonTitle%22:%20%7B%22message%22:%20%22Dapatkan%20tautan%20langsung%22%7D,%0A%0A%20%22downloadFromCurrentPage%22:%20%7B%22message%22:%20%22Buka%20SaveFrom.net%22%7D,%0A%20%22updateLinks%22:%20%7B%22message%22:%20%22Segarkan%20tautan%22%7D,%0A%20%22updateLinksNotification%22:%20%7B%22message%22:%20%22Tautan%20diperbarui%22%7D,%0A%20%22downloadMP3Files%22:%20%7B%22message%22:%20%22Unduh%20file%20audio%22%7D,%0A%20%22downloadPlaylist%22:%20%7B%22message%22:%20%22Unduh%20daftar%20putar%22%7D,%0A%20%22downloadPhotos%22:%20%7B%22message%22:%20%22Unduh%20gambar%22%7D,%0A%20%22installFullVersion%22:%20%7B%22message%22:%20%22Pasang%20versi%20lengkap%22%7D,%0A%20%22disable%22:%20%7B%22message%22:%20%22Nonaktifkan%22%7D,%0A%20%22showOptions%22:%20%7B%22message%22:%20%22Setelan%22%7D,%0A%20%22reportBug%22:%20%7B%22message%22:%20%22Laporkan%20bug%22%7D,%0A%20%22openPoll%22:%20%7B%22message%22:%20%22Jadikan%20lebih%20baik%22%7D,%0A%20%22disableModule%22:%20%7B%22message%22:%20%22Nonaktifkan%20di%20situs%20web%20ini%22%7D,%0A%20%22enableModule%22:%20%7B%22message%22:%20%22Aktifkan%20di%20situs%20web%20ini%22%7D,%0A%20%22enableDisableModule%22:%20%7B%22message%22:%20%22Nyalakan/Matikan%20di%20situs%20ini%22%7D,%0A%20%22showHideButton%22:%20%7B%22message%22:%20%22Tampilkan/tutup%20tbl%20ekstensi%22%7D,%0A%20%22updateTo%22:%20%7B%22message%22:%20%22Perbarui%20ke%20%25d%22%7D,%0A%0A%20%22aboutPage%22:%20%7B%22message%22:%20%22Tentang%22%7D,%0A%20%22aboutTitle%22:%20%7B%22message%22:%20%22Bantuan%20SaveFrom.net%22%7D,%0A%20%22aboutVersion%22:%20%7B%22message%22:%20%22Versi%22%7D,%0A%20%22aboutDescription%22:%20%7B%22message%22:%20%22Membantu%20pengguna%20mendapatkan%20tautan%20langsung%20dari%2040+%20situs%20web,%20termasuk%20Dailymotion.com,%20YouTube.com,%20VK.com%20dan%20lain-lain.%22%7D,%0A%20%22aboutDescriptionLite%22:%20%7B%22message%22:%20%22Membantu%20pengguna%20mendapatkan%20tautan%20langsung%20untuk%20mengunduh%20dari%2040+%20situs%20web,%20termasuk%20Dailymotion.com,%20VK.com%20dan%20lain-lain.%22%7D,%0A%20%22aboutSupported%22:%20%7B%22message%22:%20%22Sumber%20daya%20yang%20didukung%22%7D,%0A%20%22homePage%22:%20%7B%22message%22:%20%22Laman%20beranda%22%7D,%0A%0A%20%22optionsTitle%22:%20%7B%22message%22:%20%22Bantuan%20SaveFrom.net%20-%20Preferensi%22%7D,%0A%20%22optionsHandleLinks%22:%20%7B%22message%22:%20%22Tangani%20tautan%22%7D,%0A%20%22optionsFileHostings%22:%20%7B%22message%22:%20%22Ke%20filehosting%22%7D,%0A%20%22optionsMediaHostings%22:%20%7B%22message%22:%20%22Ke%20mediahosting%22%7D,%0A%20%22optionsModules%22:%20%7B%22message%22:%20%22Modul%22%7D,%0A%20%22optionsYoutube%22:%20%7B%22message%22:%20%22YouTube%22%7D,%0A%20%22optionsYTHideLinks%22:%20%7B%22message%22:%20%22Sembunyikan%20tautan%22%7D,%0A%20%22optionsDailymotion%22:%20%7B%22message%22:%20%22Dailymotion%22%7D,%0A%20%22optionsVimeo%22:%20%7B%22message%22:%20%22Vimeo%22%7D,%0A%20%22optionsFacebook%22:%20%7B%22message%22:%20%22Facebook%22%7D,%0A%20%22optionsSoundcloud%22:%20%7B%22message%22:%20%22SoundCloud%22%7D,%0A%20%22optionsVkontakte%22:%20%7B%22message%22:%20%22VK%22%7D,%0A%20%22optionsOdnoklassniki%22:%20%7B%22message%22:%20%22Odnoklassniki%22%7D,%0A%20%22optionsMailru%22:%20%7B%22message%22:%20%22Moy%20Mir%22%7D,%0A%20%22optionsInstagram%22:%20%7B%22message%22:%20%22Instagram%22%7D,%0A%20%22optionsRutube%22:%20%7B%22message%22:%20%22Rutube%22%7D,%0A%20%22optionsBitrate%22:%20%7B%22message%22:%20%22Langsung%20tampilkan%20bitrate%22%7D,%0A%20%22optionsSovetnikEnabled%22:%20%7B%22message%22:%20%22Penasihat%22%7D,%0A%20%22optionsShowUmmyInfo%22:%20%7B%22message%22:%20%22Tampilkan%20tips%20untuk%20Ummy%20Video%20Downloader%22%7D,%0A%20%22optionsGmNativeDownload%22:%20%7B%22message%22:%20%22Mode%20unduh%20lanjutan%22%7D,%0A%20%22optionsShowUmmyBtn%22:%20%7B%22message%22:%20%22Perlihatkan%20tombol%20Ummy%22%7D,%0A%20%22optionsAviaBarEnabled%22:%20%7B%22message%22:%20%22Cheap%20Flights%20Advisor%22%7D,%0A%0A%20%22menuDownloadFromCurrentPage%22:%20%7B%22message%22:%20%22Unduh%20file%20dari%20laman%20saat%20ini%20dengan%20SaveFrom.net%22%7D,%0A%20%22menuUpdateLinks%22:%20%7B%22message%22:%20%22Tekan%20jika%20tombol%20Unduh%20tidak%20muncul%22%7D,%0A%20%22menuDownloadMP3Files%22:%20%7B%22message%22:%20%22Unduh%20semua%20file%20audio%20yang%20ada%20di%20laman%20saat%20ini%22%7D,%0A%20%22menuDownloadPlaylist%22:%20%7B%22message%22:%20%22Buat%20dan%20unduh%20daftar%20putar%20berisi%20tautan%20ke%20file%20audio%22%7D,%0A%20%22menuDownloadPhotos%22:%20%7B%22message%22:%20%22Unduh%20semua%20gambar%20yang%20ada%20di%20laman%20saat%20ini%22%7D,%0A%20%22menuReportBug%22:%20%7B%22message%22:%20%22Beri%20tahu%20kami%20jika%20Anda%20mengalami%20masalah%22%7D,%0A%20%22menuShowOptions%22:%20%7B%22message%22:%20%22AKTIFKAN/NONAKTIFKAN%20sumber%20daya%20yang%20didukung%20dan%20opsi%20Bantuan%22%7D,%0A%20%22menuEnableExtension%22:%20%7B%22message%22:%20%22%22%7D,%0A%20%22menuOpenPoll%22:%20%7B%22message%22:%20%22Kami%20bekerja%20keras%20untuk%20jadi%20lebih%20baik.%20Tolong,%20bantu%20kami!%22%7D,%0A%0A%20%22quality%22:%20%7B%22message%22:%20%22Kualitas%22%7D,%0A%20%22qualityNote%22:%20%7B%22message%22:%20%22Video%20terbaik%20yang%20tersedia%20akan%20diunduh%20jika%20tidak%20ada%20kualitas%20yang%20dipilih.%22%7D,%0A%20%22filelistTitle%22:%20%7B%22message%22:%20%22Daftar%20file%20yang%20ditemukan%22%7D,%0A%20%22filelistInstruction%22:%20%7B%22message%22:%20%22%5B'Untuk%20mengunduh%20semua%20file,%20salin%20daftar%20tautan%20dan%20tempelkan%20ke%20',%7Ba:%7Bhref:'http://en.wikipedia.org/wiki/Download_manager',text:'pengelola%20unduhan'%7D%7D,'.%20Jika%20Anda%20tidak%20memiliki%20pengelola%20unduhan,%20kami%20menyarankan%20',%7Ba:%7Bhref:'http://www.freedownloadmanager.org/',text:'Free%20Download%20Manager'%7D%7D,'.'%5D%22%7D,%0A%20%22playlistTitle%22:%20%7B%22message%22:%20%22Daftar%20putar%22%7D,%0A%20%22playlistInstruction%22:%20%7B%22message%22:%20%22Untuk%20memutar%20daftar%20putar%20yang%20disimpan,%20sekarang%20bisa%20dibuka%20di%20pemutar%20musik.%22%7D,%0A%0A%20%22ummySfTitle%22:%20%7B%22message%22:%20%22HD%20atau%20MP3%22%7D,%0A%20%22ummyMenuItem%22:%20%7B%22message%22%20:%20%22%5B%7Bspan:%7B%7D%7D,'%20via%20Ummy'%5D%22%7D,%0A%20%22ummyMenuInfo%22:%20%7B%22message%22:%20%22%5B%7Bp:%7Btext:'Pasang%20Ummy%20Video%20Downloader%20%20dan%20unduh%20video%20favorit%20Anda%20dalam%20format%20HD%20atau%20MP3.'%7D%7D,%7Bp:%7Bclass:'center',append:%5B%7Ba:%7Bclass:'green-btn-2%20arrow',href:'%7Burl%7D',target:'_blank',text:'Unduh'%7D%7D%5D%7D%7D,%7Bp:%7Bappend:%5B'Setelah%20pemasangan,%20unduhan%20akan%20otomatis%20dimulai%20setiap%20kali%20Anda%20mengeklik%20',%7Bimg:%7Bsrc:'#'%7D%7D%5D%7D%7D%5D%22%7D,%0A%20%22warningPopupTitle%22:%20%7B%22message%22:%20%22Periksa%20setelan%20browser%22%7D,%0A%20%22warningPopupDesc%22:%20%7B%22message%22:%20%22Opsi%20%5C%22Selalu%20tanya%20saya%20di%20mana%20menyimpan%20file%5C%22%20harus%20dinonaktifkan.%22%7D,%0A%20%22readMore%22:%20%7B%22message%22:%20%22Lainnya%22%7D,%0A%20%22noWarning%22:%20%7B%22message%22:%20%22Jangan%20beri%20tahu%22%7D,%0A%20%22cancel%22:%20%7B%22message%22:%20%22Batal%22%7D,%0A%20%22continue%22:%20%7B%22message%22:%20%22Lanjutkan%22%7D,%0A%20%22beforeDownloadPopupWarn%22:%20%7B%22message%22:%20%22Perhatian!%20Pengunduhan%20tidak%20dapat%20dibatalkan%20atau%20ditunda.%22%7D,%0A%0A%20%22vkInfo%22:%20%7B%22message%22:%20%22Info%22%7D,%0A%20%22vkInfoTitle%22:%20%7B%22message%22:%20%22Ukuran%20file%20dan%20bitrate%22%7D,%0A%20%22vkMp3LinksNotFound%22:%20%7B%22message%22:%20%22Tautan%20atau%20file%20MP3%20tidak%20ditemukan%22%7D,%0A%20%22vkPhotoLinksNotFound%22:%20%7B%22message%22:%20%22Foto%20tidak%20ditemukan%22%7D,%0A%20%22vkDownloadPhotoAlbum%22:%20%7B%22message%22:%20%22Unduh%20album%22%7D,%0A%20%22vkDownloadAllPhotoAlbums%22:%20%7B%22message%22:%20%22Unduh%20semua%20album%22%7D,%0A%20%22vkFoundPhotos%22:%20%7B%22message%22:%20%22Foto%20ditemukan%22%7D,%0A%20%22vkNotAvailablePhotos%22:%20%7B%22message%22:%20%22%25d%20foto%20sementara%20ini%20tidak%20tersedia%22%7D,%0A%20%22vkFoundLinks%22:%20%7B%22message%22:%20%22Tautan%20ditemukan%22%7D,%0A%20%22vkFoundOf%22:%20%7B%22message%22:%20%22dari%22%7D,%0A%20%22vkShowAs%22:%20%7B%22message%22:%20%22Tampilkan%20sebagai%22%7D,%0A%20%22vkListOfLinks%22:%20%7B%22message%22:%20%22Daftar%20tautan%22%7D,%0A%20%22vkListOfLinksInstruction%22:%20%7B%22message%22:%20%22%5B'Untuk%20mengunduh%20semua%20foto,%20salin%20daftar%20tautan%20dan%20tempelkan%20ke%20',%7Ba:%7Bhref:'http://en.wikipedia.org/wiki/Download_manager',text:'pengelola%20unduhan'%7D%7D,'.%20Jika%20Anda%20tidak%20memiliki%20pengelola%20unduhan,%20kami%20menyarankan%20',%7Ba:%7Bhref:'http://www.freedownloadmanager.org/',text:'Free%20Download%20Manager'%7D%7D,'.'%5D%22%7D,%0A%20%22vkTableOfThumbnails%22:%20%7B%22message%22:%20%22Tabel%20gambar%20mini%22%7D,%0A%20%22vkListOfPhotos%22:%20%7B%22message%22:%20%22Daftar%20foto%22%7D,%0A%20%22vkListOfPhotosInstruction%22:%20%7B%22message%22:%20%22Klik%20foto%20untuk%20mengunduhnya.%22%7D,%0A%20%22vkKbps%22:%20%7B%22message%22:%20%22kbps%22%7D,%0A%20%22vkFileSizeByte%22:%20%7B%22message%22:%20%22B%22%7D,%0A%20%22vkFileSizeKByte%22:%20%7B%22message%22:%20%22kB%22%7D,%0A%20%22vkFileSizeMByte%22:%20%7B%22message%22:%20%22MB%22%7D,%0A%20%22vkFileSizeGByte%22:%20%7B%22message%22:%20%22GB%22%7D,%0A%20%22vkFileSizeTByte%22:%20%7B%22message%22:%20%22TB%22%7D,%0A%20%22vkDownloadFromYoutube%22:%20%7B%22message%22:%20%22%5B'Mengunduh:%20buka%20',%7Ba:%7Bhref:'%7Burl%7D',text:'laman%20video'%7D%7D,'%20dan%20tekan%20tombol%20%5C%22Unduh%5C%22%20di%20atas%20pemutar'%5D%22%7D,%0A%20%22vkFoundFiles%22:%20%7B%22message%22:%20%22File%20ditemukan:%20%25d%22%7D,%0A%0A%20%22shareIn%22:%20%7B%22message%22:%20%22Bagikan%20di%20%25w%22%7D,%0A%20%22socialDesc%22:%20%7B%22message%22:%20%22Dengan%20bantuan%20SaveFrom.net,%20Anda%20dapat%20mengunduh%20file%20dari%20YouTube.com,%20Facebook.com,%20VK.com,%20dan%20lebih%20dari%2040%20lainnya%20hanya%20dengan%20satu%20klik%20gratis%22%7D,%0A%0A%20%22tutorialS1Title%22:%20%7B%22message%22:%20%22Berita%20bagus!%22%7D,%0A%20%22tutorialS1Main%22:%20%7B%22message%22:%20%22%5B'SaveFrom.net%20Helper%20',%7Bimg:%20%7Bsrc:%20'#logo'%7D%7D,'%20telah%20berhasil%20diinstal%20dan%20kini%20Anda%20dapat%20mengunduh%20video%20apa%20pun%20dari%20YouTube%20dengan%20satu%20klik'%5D%22%7D,%0A%20%22tutorialS1Arrow%22:%20%7B%22message%22:%20%22%5B'Anda%20ingin%20tahu%20caranya?',%20%7Bbr:%7B%7D%7D,%20'Klik%20di%20sini'%5D%22%7D,%0A%20%22tutorialS2Main%22:%20%7B%22message%22:%20%22Untuk%20mengunduh%20video,%20pilih%20suatu%20format%20dan%20klik%20tombol%20%5C%22Unduh%5C%22%22%7D,%0A%20%22tutorialS3History%22:%20%7B%22message%22:%20%22Riwayat%22%7D,%0A%20%22tutorialS3Main%22:%20%7B%22message%22:%20%22%5B'Apakah%20Anda%20ingin%20mengunduh%20video%20dari%20Riwayat?',%20%7Bbr:%7B%7D%7D,%20'Cukup%20klik%20',%20%7Bimg:%20%7Bsrc:%20'#arrow'%7D%7D,%20'%20pada%20pratinjau%20video%20yang%20telah%20ditonton%20sebelumnya'%5D%22%7D,%0A%20%22tutorialS4Main%22:%20%7B%22message%22:%20%22%5B'Tidak%20perlu%20menonton%20video%20%E2%80%94%20cukup%20klik%20pada%20',%20%7Bimg:%20%7Bsrc:%20'#arrow'%7D%7D,%20',%20pilih%20mutunya,%20dan%20unduh.%20Cukup%20mudah,%20ya?'%5D%22%7D,%0A%20%22tutorialS5Title%22:%20%7B%22message%22:%20%22Nikmati%20SaveFrom.net%20Helper!%22%7D,%0A%20%22tutorialS5Main%22:%20%7B%22message%22:%20%22%5B'Masih%20punya%20pertanyaan?%20Ingin%20berbagi%20ide?%20Selamat%20datang%20di%20',%20%7Ba:%20%7Btext:%20'halaman%20dukungan',%20href:%20'#support'%7D%7D,'%20kami%20atau%20bergabunglah%20dengan%20kami%20di%20',%20%7Ba:%20%7Btext:%20'Facebook',%20href:%20'#fb'%7D%7D%5D%22%7D,%0A%0A%20%22tutorialTooltipText%22:%20%7B%22message%22:%20%22%5B'Cukup%20klik%20tombol%20untuk%20',%7Bb:%20%7Btext:%20'mengunduh'%7D%7D%5D%22%7D,%0A%0A%20%22ummyTooltipConfirm%22:%20%7B%22message%22:%20%22%5B'Apakah%20Anda%20sudah%20menginstal',%7Bbr:%7B%7D%7D,%7Bimg:%7B%7D%7D,'%20Ummy%20Video%20Downloader%20sebelumnya?'%5D%22%7D,%0A%20%22yes%22:%20%7B%22message%22:%20%22Ya%22%7D,%0A%20%22no%22:%20%7B%22message%22:%20%22Tidak%22%7D,%0A%20%22tooltipHide%22:%20%7B%22message%22:%20%22Jangan%20perlihatkan%20pesan%20ini%20lagi%22%7D%0A%7D";
_languageList.ru = "%7B%0A%20%22extName%22:%20%7B%22message%22:%20%22SaveFrom.net%20%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D0%BD%D0%B8%D0%BA%22%7D,%0A%20%22extDescription%22:%20%7B%22message%22:%20%22%D0%A1%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D0%B9%D1%82%D0%B5%20%D1%81%20%D0%92%D0%BA%D0%BE%D0%BD%D1%82%D0%B0%D0%BA%D1%82%D0%B5,%20YouTube,%20%D0%9E%D0%B4%D0%BD%D0%BE%D0%BA%D0%BB%D0%B0%D1%81%D1%81%D0%BD%D0%B8%D0%BA%D0%B8%20%D0%B8%20%D0%B5%D1%89%D0%B5%2040%20%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2%20%D0%B7%D0%B0%201%20%D0%BA%D0%BB%D0%B8%D0%BA.%22%7D,%0A%0A%20%22extNameLite%22:%20%7B%22message%22:%20%22SaveFrom.net%20%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D0%BD%D0%B8%D0%BA%20lite%22%7D,%0A%20%22extDescriptionLite%22:%20%7B%22message%22:%20%22%D0%A1%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D0%B9%D1%82%D0%B5%20%D1%81%20%D0%92%D0%BA%D0%BE%D0%BD%D1%82%D0%B0%D0%BA%D1%82%D0%B5,%20%D0%9E%D0%B4%D0%BD%D0%BE%D0%BA%D0%BB%D0%B0%D1%81%D1%81%D0%BD%D0%B8%D0%BA%D0%B8%20%D0%B8%20%D0%B5%D1%89%D0%B5%2040%20%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2%20%D0%B7%D0%B0%201%20%D0%BA%D0%BB%D0%B8%D0%BA.%22%7D,%0A%0A%20%22lang%22:%20%7B%22message%22:%20%22ru%22%7D,%0A%0A%20%22titleDefault%22:%20%7B%22message%22:%20%22SaveFrom.net%20%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D0%BD%D0%B8%D0%BA%22%7D,%0A%20%22titleDesabled%22:%20%7B%22message%22:%20%22SaveFrom.net%20%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D0%BD%D0%B8%D0%BA%20%D0%B2%D1%8B%D0%BA%D0%BB%D1%8E%D1%87%D0%B5%D0%BD%22%7D,%0A%0A%20%22menuEnable%22:%20%7B%22message%22:%20%22%D0%92%D0%BA%D0%BB%D1%8E%D1%87%D0%B8%D1%82%D1%8C%22%7D,%0A%20%22menuDisable%22:%20%7B%22message%22:%20%22%D0%92%D1%8B%D0%BA%D0%BB%D1%8E%D1%87%D0%B8%D1%82%D1%8C%22%7D,%0A%0A%20%22showButton%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D0%BA%D0%B0%D0%B7%D1%8B%D0%B2%D0%B0%D1%82%D1%8C%20%D0%BA%D0%BD%D0%BE%D0%BF%D0%BA%D1%83%20%D1%80%D0%B0%D1%81%D1%88%D0%B8%D1%80%D0%B5%D0%BD%D0%B8%D1%8F%22%7D,%0A%0A%20%22copy%22:%20%7B%22message%22:%20%22%D0%9A%D0%BE%D0%BF%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D1%82%D1%8C%22%7D,%0A%20%22download%22:%20%7B%22message%22:%20%22%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%22%7D,%0A%20%22downloadTitle%22:%20%7B%22message%22:%20%22%D0%9D%D0%B0%D0%B6%D0%BC%D0%B8%D1%82%D0%B5%20%D0%BD%D0%B0%20%D1%81%D1%81%D1%8B%D0%BB%D0%BA%D1%83,%20%D1%83%D0%B4%D0%B5%D1%80%D0%B6%D0%B8%D0%B2%D0%B0%D1%8F%20%D0%BA%D0%BB%D0%B0%D0%B2%D0%B8%D1%88%D1%83%20Alt%20%D0%B8%D0%BB%D0%B8%20Ctrl,%20%D1%87%D1%82%D0%BE%D0%B1%D1%8B%20%D1%81%D0%BE%D1%85%D1%80%D0%B0%D0%BD%D0%B8%D1%82%D1%8C%20%D1%84%D0%B0%D0%B9%D0%BB.%22%7D,%0A%20%22noLinksFound%22:%20%7B%22message%22:%20%22%D0%9D%D0%B5%20%D1%83%D0%B4%D0%B0%D0%BB%D0%BE%D1%81%D1%8C%20%D0%BD%D0%B0%D0%B9%D1%82%D0%B8%20%D1%81%D1%81%D1%8B%D0%BB%D0%BA%D0%B8%22%7D,%0A%20%22more%22:%20%7B%22message%22:%20%22%D0%95%D1%89%D1%91%22%7D,%0A%20%22close%22:%20%7B%22message%22:%20%22%D0%97%D0%B0%D0%BA%D1%80%D1%8B%D1%82%D1%8C%22%7D,%0A%20%22kbps%22:%20%7B%22message%22:%20%22%D0%BA%D0%B1/%D1%81%22%7D,%0A%20%22withoutAudio%22:%20%7B%22message%22:%20%22%D0%B1%D0%B5%D0%B7%20%D0%B0%D1%83%D0%B4%D0%B8%D0%BE%22%7D,%0A%20%22size%22:%20%7B%22message%22:%20%22%D1%80%D0%B0%D0%B7%D0%BC%D0%B5%D1%80%22%7D,%0A%0A%20%22subtitles%22:%20%7B%22message%22:%20%22%D0%A1%D1%83%D0%B1%D1%82%D0%B8%D1%82%D1%80%D1%8B%22%7D,%0A%20%22playlist%22:%20%7B%22message%22:%20%22%D0%9F%D0%BB%D0%B5%D0%B9%D0%BB%D0%B8%D1%81%D1%82%22%7D,%0A%20%22filelist%22:%20%7B%22message%22:%20%22%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA%20%D1%84%D0%B0%D0%B9%D0%BB%D0%BE%D0%B2%22%7D,%0A%20%22downloadWholePlaylist%22:%20%7B%22message%22:%20%22%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%20%D0%B2%D0%B5%D1%81%D1%8C%20%D0%BF%D0%BB%D0%B5%D0%B9%D0%BB%D0%B8%D1%81%D1%82%22%7D,%0A%0A%20%22getFileSizeTitle%22:%20%7B%22message%22:%20%22%D0%9E%D0%BF%D1%80%D0%B5%D0%B4%D0%B5%D0%BB%D0%B8%D1%82%D1%8C%20%D1%80%D0%B0%D0%B7%D0%BC%D0%B5%D1%80%20%D1%84%D0%B0%D0%B9%D0%BB%D0%B0%22%20%7D,%0A%20%22getFileSizeFailTitle%22:%20%7B%22message%22:%20%22%D0%9D%D0%B5%20%D1%83%D0%B4%D0%B0%D0%BB%D0%BE%D1%81%D1%8C%20%D0%BE%D0%BF%D1%80%D0%B5%D0%B4%D0%B5%D0%BB%D0%B8%D1%82%D1%8C%20%D1%80%D0%B0%D0%B7%D0%BC%D0%B5%D1%80%20%D1%84%D0%B0%D0%B9%D0%BB%D0%B0.%20%D0%9F%D0%BE%D0%BF%D1%80%D0%BE%D0%B1%D1%83%D0%B9%D1%82%D0%B5%20%D0%BF%D0%BE%D0%B2%D1%82%D0%BE%D1%80%D0%B8%D1%82%D1%8C%20%D0%BF%D0%BE%D0%BF%D1%8B%D1%82%D0%BA%D1%83.%22%7D,%0A%0A%20%22lmButtonTitle%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D0%BB%D1%83%D1%87%D0%B8%20%D0%BF%D1%80%D1%8F%D0%BC%D1%83%D1%8E%20%D1%81%D1%81%D1%8B%D0%BB%D0%BA%D1%83%22%7D,%0A%0A%20%22downloadFromCurrentPage%22:%20%7B%22message%22:%20%22%D0%9F%D0%B5%D1%80%D0%B5%D0%B9%D1%82%D0%B8%20%D0%BD%D0%B0%20SaveFrom.net%22%7D,%0A%20%22updateLinks%22:%20%7B%22message%22:%20%22%D0%9E%D0%B1%D0%BD%D0%BE%D0%B2%D0%B8%D1%82%D1%8C%20%D1%81%D1%81%D1%8B%D0%BB%D0%BA%D0%B8%22%7D,%0A%20%22updateLinksNotification%22:%20%7B%22message%22:%20%22%D0%A1%D1%81%D1%8B%D0%BB%D0%BA%D0%B8%20%D0%BE%D0%B1%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D1%8B%22%7D,%0A%20%22downloadMP3Files%22:%20%7B%22message%22:%20%22%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%20%D0%B0%D1%83%D0%B4%D0%B8%D0%BE%20%D1%84%D0%B0%D0%B9%D0%BB%D1%8B%22%7D,%0A%20%22downloadPlaylist%22:%20%7B%22message%22:%20%22%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%20%D0%BF%D0%BB%D0%B5%D0%B9%D0%BB%D0%B8%D1%81%D1%82%22%7D,%0A%20%22downloadPhotos%22:%20%7B%22message%22:%20%22%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%20%D1%84%D0%BE%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D0%B8%D0%B8%22%7D,%0A%20%22installFullVersion%22:%20%7B%22message%22:%20%22%D0%A3%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%B8%D1%82%D1%8C%20%D0%BF%D0%BE%D0%BB%D0%BD%D1%83%D1%8E%20%D0%B2%D0%B5%D1%80%D1%81%D0%B8%D1%8E%22%7D,%0A%20%22disable%22:%20%7B%22message%22:%20%22%D0%92%D1%8B%D0%BA%D0%BB%D1%8E%D1%87%D0%B8%D1%82%D1%8C%22%7D,%0A%20%22showOptions%22:%20%7B%22message%22:%20%22%D0%9D%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B8%22%7D,%0A%20%22reportBug%22:%20%7B%22message%22:%20%22%D0%A1%D0%BE%D0%BE%D0%B1%D1%89%D0%B8%D1%82%D1%8C%20%D0%BE%D0%B1%20%D0%BE%D1%88%D0%B8%D0%B1%D0%BA%D0%B5%22%7D,%0A%20%22openPoll%22:%20%7B%22message%22:%20%22%D0%A1%D1%82%D0%B0%D1%82%D1%8C%20%D0%BB%D1%83%D1%87%D1%88%D0%B5%22%7D,%0A%20%22disableModule%22:%20%7B%22message%22:%20%22%D0%9E%D1%82%D0%BA%D0%BB%D1%8E%D1%87%D0%B8%D1%82%D1%8C%20%D0%BD%D0%B0%20%D1%8D%D1%82%D0%BE%D0%BC%20%D1%81%D0%B0%D0%B9%D1%82%D0%B5%22%7D,%0A%20%22enableModule%22:%20%7B%22message%22:%20%22%D0%92%D0%BA%D0%BB%D1%8E%D1%87%D0%B8%D1%82%D1%8C%20%D0%BD%D0%B0%20%D1%8D%D1%82%D0%BE%D0%BC%20%D1%81%D0%B0%D0%B9%D1%82%D0%B5%22%7D,%0A%20%22enableDisableModule%22:%20%7B%22message%22:%20%22%D0%92%D0%BA%D0%BB/%D0%92%D1%8B%D0%BA%D0%BB%20%D0%BD%D0%B0%20%D1%8D%D1%82%D0%BE%D0%BC%20%D1%81%D0%B0%D0%B9%D1%82%D0%B5%22%7D,%0A%20%22showHideButton%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D0%BA%D0%B0%D0%B7./%D1%81%D0%BA%D1%80.%20%D0%BA%D0%BD%D0%BE%D0%BF%D0%BA%D1%83%20%D1%80%D0%B0%D1%81%D1%88%D0%B8%D1%80%D0%B5%D0%BD%D0%B8%D1%8F%22%7D,%0A%20%22updateTo%22:%20%7B%22message%22:%20%22%D0%9E%D0%B1%D0%BD%D0%BE%D0%B2%D0%B8%D1%82%D1%8C%20%D0%B4%D0%BE%20%25d%22%7D,%0A%0A%20%22aboutPage%22:%20%7B%22message%22:%20%22%D0%9E%20%D1%80%D0%B0%D1%81%D1%88%D0%B8%D1%80%D0%B5%D0%BD%D0%B8%D0%B8%22%7D,%0A%20%22aboutTitle%22:%20%7B%22message%22:%20%22SaveFrom.net%20%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D0%BD%D0%B8%D0%BA%22%7D,%0A%20%22aboutVersion%22:%20%7B%22message%22:%20%22%D0%92%D0%B5%D1%80%D1%81%D0%B8%D1%8F%22%7D,%0A%20%22aboutDescription%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D0%B7%D0%B2%D0%BE%D0%BB%D1%8F%D0%B5%D1%82%20%D0%BF%D0%BE%D0%BB%D1%83%D1%87%D0%B0%D1%82%D1%8C%20%D0%BF%D1%80%D1%8F%D0%BC%D1%8B%D0%B5%20%D1%81%D1%81%D1%8B%D0%BB%D0%BA%D0%B8%20%D0%B4%D0%BB%D1%8F%20%D1%81%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F%20%D1%81%20%D0%B1%D0%BE%D0%BB%D0%B5%D0%B5%20%D1%87%D0%B5%D0%BC%2040%20%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2,%20%D1%81%D1%80%D0%B5%D0%B4%D0%B8%20%D0%BA%D0%BE%D1%82%D0%BE%D1%80%D1%8B%D1%85%20%20VK.com,%20YouTube.com%20%D0%B8%20%D0%B4%D1%80%D1%83%D0%B3%D0%B8%D0%B5.%22%7D,%0A%20%22aboutDescriptionLite%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D0%B7%D0%B2%D0%BE%D0%BB%D1%8F%D0%B5%D1%82%20%D0%BF%D0%BE%D0%BB%D1%83%D1%87%D0%B0%D1%82%D1%8C%20%D0%BF%D1%80%D1%8F%D0%BC%D1%8B%D0%B5%20%D1%81%D1%81%D1%8B%D0%BB%D0%BA%D0%B8%20%D0%B4%D0%BB%D1%8F%20%D1%81%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F%20%D1%81%20%D0%B1%D0%BE%D0%BB%D0%B5%D0%B5%20%D1%87%D0%B5%D0%BC%2040%20%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2,%20%D1%81%D1%80%D0%B5%D0%B4%D0%B8%20%D0%BA%D0%BE%D1%82%D0%BE%D1%80%D1%8B%D1%85%20%20VK.com,%20Vimeo%20%D0%B8%20%D0%B4%D1%80%D1%83%D0%B3%D0%B8%D0%B5.%22%7D,%0A%20%22aboutSupported%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D0%B4%D0%B4%D0%B5%D1%80%D0%B6%D0%B8%D0%B2%D0%B0%D0%B5%D0%BC%D1%8B%D0%B5%20%D1%80%D0%B5%D1%81%D1%83%D1%80%D1%81%D1%8B%22%7D,%0A%20%22homePage%22:%20%7B%22message%22:%20%22%D0%94%D0%BE%D0%BC%D0%B0%D1%88%D0%BD%D1%8F%D1%8F%20%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0%22%7D,%0A%0A%20%22optionsTitle%22:%20%7B%22message%22:%20%22SaveFrom.net%20%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D0%BD%D0%B8%D0%BA%20-%20%D0%9D%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B8%22%7D,%0A%20%22optionsHandleLinks%22:%20%7B%22message%22:%20%22%D0%9E%D0%B1%D1%80%D0%B0%D0%B1%D0%B0%D1%82%D1%8B%D0%B2%D0%B0%D1%82%D1%8C%20%D1%81%D1%81%D1%8B%D0%BB%D0%BA%D0%B8%22%7D,%0A%20%22optionsFileHostings%22:%20%7B%22message%22:%20%22%D0%9D%D0%B0%20%D1%84%D0%B0%D0%B9%D0%BB%D0%BE%D0%BE%D0%B1%D0%BC%D0%B5%D0%BD%D0%BD%D0%B8%D0%BA%D0%B8%22%7D,%0A%20%22optionsMediaHostings%22:%20%7B%22message%22:%20%22%D0%9D%D0%B0%20%D0%BC%D0%B5%D0%B4%D0%B8%D0%B0%D1%85%D0%BE%D1%81%D1%82%D0%B8%D0%BD%D0%B3%D0%B8%22%7D,%0A%20%22optionsModules%22:%20%7B%22message%22:%20%22%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D0%B8%22%7D,%0A%20%22optionsYoutube%22:%20%7B%22message%22:%20%22YouTube%22%7D,%0A%20%22optionsYTHideLinks%22:%20%7B%22message%22:%20%22%D0%A1%D0%BA%D1%80%D1%8B%D0%B2%D0%B0%D1%82%D1%8C%20%D1%81%D1%81%D1%8B%D0%BB%D0%BA%D0%B8%22%7D,%0A%20%22optionsDailymotion%22:%20%7B%22message%22:%20%22Dailymotion%22%7D,%0A%20%22optionsVimeo%22:%20%7B%22message%22:%20%22Vimeo%22%7D,%0A%20%22optionsFacebook%22:%20%7B%22message%22:%20%22Facebook%22%7D,%0A%20%22optionsSoundcloud%22:%20%7B%22message%22:%20%22SoundCloud%22%7D,%0A%20%22optionsVkontakte%22:%20%7B%22message%22:%20%22%D0%92%D0%BA%D0%BE%D0%BD%D1%82%D0%B0%D0%BA%D1%82%D0%B5%22%7D,%0A%20%22optionsOdnoklassniki%22:%20%7B%22message%22:%20%22%D0%9E%D0%B4%D0%BD%D0%BE%D0%BA%D0%BB%D0%B0%D1%81%D1%81%D0%BD%D0%B8%D0%BA%D0%B8%22%7D,%0A%20%22optionsMailru%22:%20%7B%22message%22:%20%22%D0%9C%D0%BE%D0%B9%20%D0%BC%D0%B8%D1%80%22%7D,%0A%20%22optionsInstagram%22:%20%7B%22message%22:%20%22Instagram%22%7D,%0A%20%22optionsRutube%22:%20%7B%22message%22:%20%22Rutube%22%7D,%0A%20%22optionsBitrate%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D0%BA%D0%B0%D0%B7%D1%8B%D0%B2%D0%B0%D1%82%D1%8C%20%D0%B1%D0%B8%D1%82%D1%80%D0%B5%D0%B9%D1%82%20%D1%81%D1%80%D0%B0%D0%B7%D1%83%22%7D,%0A%20%22optionsSovetnikEnabled%22:%20%7B%22message%22:%20%22%D0%A1%D0%BE%D0%B2%D0%B5%D1%82%D0%BD%D0%B8%D0%BA%22%7D,%0A%20%22optionsShowUmmyInfo%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D0%BA%D0%B0%D0%B7%D1%8B%D0%B2%D0%B0%D1%82%D1%8C%20%D0%BF%D0%BE%D0%B4%D1%81%D0%BA%D0%B0%D0%B7%D0%BA%D0%B8%20%D0%B4%D0%BB%D1%8F%20Ummy%20Video%20Downloader%22%7D,%0A%20%22optionsGmNativeDownload%22:%20%7B%22message%22:%20%22%D0%A0%D0%B0%D1%81%D1%88%D0%B8%D1%80%D0%B5%D0%BD%D0%BD%D1%8B%D0%B9%20%D1%80%D0%B5%D0%B6%D0%B8%D0%BC%20%D0%B7%D0%B0%D0%BA%D0%B0%D1%87%D0%BA%D0%B8%22%7D,%0A%20%22optionsShowUmmyBtn%22:%20%7B%22message%22:%20%22%D0%9E%D1%82%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B0%D1%82%D1%8C%20%D0%BA%D0%BD%D0%BE%D0%BF%D0%BA%D1%83%20Ummy%22%7D,%0A%20%22optionsAviaBarEnabled%22:%20%7B%22message%22:%20%22%D0%A1%D0%BE%D0%B2%D0%B5%D1%82%D0%BD%D0%B8%D0%BA%20%D0%94%D0%B5%D1%88%D0%B5%D0%B2%D1%8B%D1%85%20%D0%90%D0%B2%D0%B8%D0%B0%D0%B1%D0%B8%D0%BB%D0%B5%D1%82%D0%BE%D0%B2%22%7D,%0A%0A%20%22menuDownloadFromCurrentPage%22:%20%7B%22message%22:%20%22%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%20%D1%84%D0%B0%D0%B9%D0%BB%D1%8B%20%D1%81%20%D1%82%D0%B5%D0%BA%D1%83%D1%89%D0%B5%D0%B9%20%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D1%8B%20%D1%81%20%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D1%8C%D1%8E%20%D1%81%D0%B5%D1%80%D0%B2%D0%B8%D1%81%D0%B0%20SaveFrom.net%22%7D,%0A%20%22menuUpdateLinks%22:%20%7B%22message%22:%20%22%D0%9D%D0%B0%D0%B6%D0%BC%D0%B8%D1%82%D0%B5,%20%D0%B5%D1%81%D0%BB%D0%B8%20%D1%81%D1%81%D1%8B%D0%BB%D0%BA%D0%B0%20%D0%B4%D0%BB%D1%8F%20%D1%81%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F%20%D0%BD%D0%B5%20%D0%BF%D0%BE%D1%8F%D0%B2%D0%BB%D1%8F%D0%B5%D1%82%D1%81%D1%8F%22%7D,%0A%20%22menuDownloadMP3Files%22:%20%7B%22message%22:%20%22%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%20%D0%B2%D1%81%D0%B5%20%D0%BD%D0%B0%D0%B9%D0%B4%D0%B5%D0%BD%D0%BD%D1%8B%D0%B5%20%D0%BD%D0%B0%20%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B5%20%D0%B0%D1%83%D0%B4%D0%B8%D0%BE%D1%84%D0%B0%D0%B9%D0%BB%D1%8B%22%7D,%0A%20%22menuDownloadPlaylist%22:%20%7B%22message%22:%20%22%D0%A4%D0%BE%D1%80%D0%BC%D0%B8%D1%80%D1%83%D0%B5%D1%82%20%D0%B8%20%D1%81%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D0%B5%D1%82%20%D0%BF%D0%BB%D0%B5%D0%B9%D0%BB%D0%B8%D1%81%D1%82%20%D1%81%20%D1%81%D1%81%D1%8B%D0%BB%D0%BA%D0%B0%D0%BC%D0%B8%20%D0%BD%D0%B0%20%D0%B0%D1%83%D0%B4%D0%B8%D0%BE%D1%84%D0%B0%D0%B9%D0%BB%D1%8B%22%7D,%0A%20%22menuDownloadPhotos%22:%20%7B%22message%22:%20%22%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%20%D0%B2%D1%81%D0%B5%20%D0%BD%D0%B0%D0%B9%D0%B4%D0%B5%D0%BD%D0%BD%D1%8B%D0%B5%20%D0%BD%D0%B0%20%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B5%20%D1%84%D0%BE%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D0%B8%D0%B8%22%7D,%0A%20%22menuReportBug%22:%20%7B%22message%22:%20%22%D0%94%D0%B0%D0%B9%D1%82%D0%B5%20%D0%BD%D0%B0%D0%BC%20%D0%B7%D0%BD%D0%B0%D1%82%D1%8C,%20%D0%B5%D1%81%D0%BB%D0%B8%20%D0%B2%D0%BE%D0%B7%D0%BD%D0%B8%D0%BA%D0%BB%D0%B8%20%D0%BF%D1%80%D0%BE%D0%B1%D0%BB%D0%B5%D0%BC%D1%8B%22%7D,%0A%20%22menuShowOptions%22:%20%7B%22message%22:%20%22%D0%92%D0%BA%D0%BB./%D0%BE%D1%82%D0%BA%D0%BB.%20%D0%BF%D0%BE%D0%B4%D0%B4%D0%B5%D1%80%D0%B6%D0%B8%D0%B2%D0%B0%D0%B5%D0%BC%D1%8B%D0%B5%20%D1%80%D0%B5%D1%81%D1%83%D1%80%D1%81%D1%8B%20%D0%B8%20%D0%B2%D0%BE%D0%B7%D0%BC%D0%BE%D0%B6%D0%BD%D0%BE%D1%81%D1%82%D0%B8%20%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D0%BD%D0%B8%D0%BA%D0%B0%22%7D,%0A%20%22menuEnableExtension%22:%20%7B%22message%22:%20%22%22%7D,%0A%20%22menuOpenPoll%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D0%B6%D0%B0%D0%BB%D1%83%D0%B9%D1%81%D1%82%D0%B0,%20%D0%BE%D1%86%D0%B5%D0%BD%D0%B8%D1%82%D0%B5%20%D0%BA%D0%B0%D1%87%D0%B5%D1%81%D1%82%D0%B2%D0%BE%20%D1%80%D0%B0%D1%81%D1%88%D0%B8%D1%80%D0%B5%D0%BD%D0%B8%D1%8F%20%5C%22SaveFrom.net%20%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D0%BD%D0%B8%D0%BA%5C%22%22%7D,%0A%0A%20%22quality%22:%20%7B%22message%22:%20%22%D0%9A%D0%B0%D1%87%D0%B5%D1%81%D1%82%D0%B2%D0%BE%22%7D,%0A%20%22qualityNote%22:%20%7B%22message%22:%20%22%D0%95%D1%81%D0%BB%D0%B8%20%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE%20%D0%B2%20%D0%BD%D1%83%D0%B6%D0%BD%D0%BE%D0%BC%20%D0%BA%D0%B0%D1%87%D0%B5%D1%81%D1%82%D0%B2%D0%B5%20%D0%BD%D0%B5%D1%82,%20%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D0%B5%D1%82%D1%81%D1%8F%20%D0%BB%D1%83%D1%87%D1%88%D0%B5%D0%B5%20%D0%B8%D0%B7%20%D0%B2%D0%BE%D0%B7%D0%BC%D0%BE%D0%B6%D0%BD%D0%BE%D0%B3%D0%BE.%22%7D,%0A%20%22filelistTitle%22:%20%7B%22message%22:%20%22%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA%20%D0%BD%D0%B0%D0%B9%D0%B4%D0%B5%D0%BD%D0%BD%D1%8B%D1%85%20%D1%84%D0%B0%D0%B9%D0%BB%D0%BE%D0%B2%22%7D,%0A%20%22filelistInstruction%22:%20%7B%22message%22:%20%22%5B'%D0%A7%D1%82%D0%BE%D0%B1%D1%8B%20%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%20%D0%B2%D1%81%D0%B5%20%D1%84%D0%B0%D0%B9%D0%BB%D1%8B,%20%D1%81%D0%BA%D0%BE%D0%BF%D0%B8%D1%80%D1%83%D0%B9%D1%82%D0%B5%20%D1%81%D0%BF%D0%B8%D1%81%D0%BE%D0%BA%20%D1%81%D1%81%D1%8B%D0%BB%D0%BE%D0%BA%20%D0%B8%20%D0%B2%D1%81%D1%82%D0%B0%D0%B2%D1%8C%D1%82%D0%B5%20%D0%B5%D0%B3%D0%BE%20%D0%B2%20',%7Ba:%7Bhref:'http://ru.wikipedia.org/wiki/%D0%9C%D0%B5%D0%BD%D0%B5%D0%B4%D0%B6%D0%B5%D1%80_%D0%B7%D0%B0%D0%B3%D1%80%D1%83%D0%B7%D0%BE%D0%BA',text:'%D0%BC%D0%B5%D0%BD%D0%B5%D0%B4%D0%B6%D0%B5%D1%80%20%D0%B7%D0%B0%D0%BA%D0%B0%D1%87%D0%B5%D0%BA'%7D%7D,'.%20%D0%95%D1%81%D0%BB%D0%B8%20%D1%83%20%D0%B2%D0%B0%D1%81%20%D0%BD%D0%B5%20%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%20%D0%BC%D0%B5%D0%BD%D0%B5%D0%B4%D0%B6%D0%B5%D1%80%20%D0%B7%D0%B0%D0%BA%D0%B0%D1%87%D0%B5%D0%BA,%20%D1%80%D0%B5%D0%BA%D0%BE%D0%BC%D0%B5%D0%BD%D0%B4%D1%83%D0%B5%D0%BC%20%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%B8%D1%82%D1%8C%20',%7Ba:%7Bhref:'http://www.westbyte.com/dm/',text:'Download%20Master'%7D%7D,'.'%5D%22%7D,%0A%20%22playlistTitle%22:%20%7B%22message%22:%20%22%D0%9F%D0%BB%D0%B5%D0%B9%D0%BB%D0%B8%D1%81%D1%82%22%7D,%0A%20%22playlistInstruction%22:%20%7B%22message%22:%20%22%D0%A1%D0%BE%D1%85%D1%80%D0%B0%D0%BD%D0%B5%D0%BD%D0%BD%D1%8B%D0%B9%20%D0%BF%D0%BB%D0%B5%D0%B9%D0%BB%D0%B8%D1%81%D1%82%20%D0%BC%D0%BE%D0%B6%D0%BD%D0%BE%20%D0%BE%D1%82%D0%BA%D1%80%D1%8B%D1%82%D1%8C%20%D0%B2%20%D0%BF%D0%BB%D0%B5%D0%B5%D1%80%D0%B5%20%D0%B4%D0%BB%D1%8F%20%20%D0%B2%D0%BE%D1%81%D0%BF%D1%80%D0%BE%D0%B8%D0%B7%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F.%22%7D,%0A%0A%20%22ummySfTitle%22:%20%7B%22message%22:%20%22HD%20%D0%B8%D0%BB%D0%B8%20MP3%22%7D,%0A%20%22ummyMenuItem%22:%20%7B%22message%22%20:%20%22%5B%7Bspan:%7B%7D%7D,'%20%D1%81%20%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D1%8C%D1%8E%20Ummy'%5D%22%7D,%0A%20%22ummyMenuInfo%22:%20%7B%22message%22:%20%22%5B%7Bp:%7Bappend:%5B'%D0%A1%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D0%B9%D1%82%D0%B5%20HD%20%D0%B8%20MP3%20%D1%81%20%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D1%8C%D1%8E%20%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BE%D0%B9%20%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D1%8B',%20%7Bbr:%7B%7D%7D,%20'Ummy%20Video%20Downloader!'%5D%7D%7D,%7Bp:%7Bclass:'center',append:%5B%7Ba:%7Bclass:'green-btn-2%20arrow',href:'%7Burl%7D',target:'_blank',text:'%D0%A3%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%B8%D1%82%D1%8C'%7D%7D%5D%7D%7D,%7Bp:%7Bappend:%5B'%D0%9F%D0%BE%D1%81%D0%BB%D0%B5%20%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BA%D0%B8%20%D1%81%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5%20%D0%B1%D1%83%D0%B4%D0%B5%D1%82%20%D0%BD%D0%B0%D1%87%D0%B8%D0%BD%D0%B0%D1%82%D1%8C%D1%81%D1%8F%20%D0%B0%D0%B2%D1%82%D0%BE%D0%BC%D0%B0%D1%82%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8',%20%7Bbr:%7B%7D%7D,%20'%D0%BF%D1%80%D0%B8%20%D0%BA%D0%BB%D0%B8%D0%BA%D0%B5%20%D0%BD%D0%B0%20',%7Bimg:%7Bsrc:'#'%7D%7D%5D%7D%7D%5D%22%7D,%0A%20%22warningPopupTitle%22:%20%7B%22message%22:%20%22%D0%9F%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D1%8C%D1%82%D0%B5%20%D0%BD%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B8%20%D0%B1%D1%80%D0%B0%D1%83%D0%B7%D0%B5%D1%80%D0%B0%22%7D,%0A%20%22warningPopupDesc%22:%20%7B%22message%22:%20%22%D0%92%D1%8B%D0%B1%D0%BE%D1%80%20%D0%BF%D0%B0%D0%BF%D0%BA%D0%B8%20%D0%BF%D1%80%D0%B8%20%D1%81%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D0%BD%D0%B8%D0%B8%20%D0%B4%D0%BE%D0%BB%D0%B6%D0%B5%D0%BD%20%D0%B1%D1%8B%D1%82%D1%8C%20%D0%BE%D1%82%D0%BA%D0%BB%D1%8E%D1%87%D0%B5%D0%BD.%22%7D,%0A%20%22readMore%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D0%B4%D1%80%D0%BE%D0%B1%D0%BD%D0%B5%D0%B5...%22%7D,%0A%20%22noWarning%22:%20%7B%22message%22:%20%22%D0%9D%D0%B5%20%D0%BF%D1%80%D0%B5%D0%B4%D1%83%D0%BF%D1%80%D0%B5%D0%B6%D0%B4%D0%B0%D1%82%D1%8C%22%7D,%0A%20%22cancel%22:%20%7B%22message%22:%20%22%D0%9E%D1%82%D0%BC%D0%B5%D0%BD%D0%B0%22%7D,%0A%20%22continue%22:%20%7B%22message%22:%20%22%D0%9F%D1%80%D0%BE%D0%B4%D0%BE%D0%BB%D0%B6%D0%B8%D1%82%D1%8C%22%7D,%0A%20%22beforeDownloadPopupWarn%22:%20%7B%22message%22:%20%22%D0%92%D0%BD%D0%B8%D0%BC%D0%B0%D0%BD%D0%B8%D0%B5:%20%D0%BE%D1%82%D0%BC%D0%B5%D0%BD%D0%B8%D1%82%D1%8C%20%D0%B8%D0%BB%D0%B8%20%D0%BF%D1%80%D0%B8%D0%BE%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%B8%D1%82%D1%8C%20%D0%B7%D0%B0%D0%BA%D0%B0%D1%87%D0%BA%D1%83%20%D0%B1%D1%83%D0%B4%D0%B5%D1%82%20%D0%BD%D0%B5%D0%B2%D0%BE%D0%B7%D0%BC%D0%BE%D0%B6%D0%BD%D0%BE.%22%7D,%0A%0A%20%22vkInfo%22:%20%7B%22message%22:%20%22%D0%9F%D0%B0%D1%80%D0%B0%D0%BC%D0%B5%D1%82%D1%80%D1%8B%22%7D,%0A%20%22vkInfoTitle%22:%20%7B%22message%22:%20%22%D0%A0%D0%B0%D0%B7%D0%BC%D0%B5%D1%80%20%D1%84%D0%B0%D0%B9%D0%BB%D0%B0%20%D0%B8%20%D0%B1%D0%B8%D1%82%D1%80%D0%B5%D0%B9%D1%82%22%7D,%0A%20%22vkMp3LinksNotFound%22:%20%7B%22message%22:%20%22%D0%9D%D0%B5%20%D0%BD%D0%B0%D0%B9%D0%B4%D0%B5%D0%BD%D1%8B%20%D1%81%D1%81%D1%8B%D0%BB%D0%BA%D0%B8%20%D0%BD%D0%B0%20MP3%20%D1%84%D0%B0%D0%B9%D0%BB%D1%8B%22%7D,%0A%20%22vkPhotoLinksNotFound%22:%20%7B%22message%22:%20%22%D0%9D%D0%B5%20%D0%BD%D0%B0%D0%B9%D0%B4%D0%B5%D0%BD%D1%8B%20%D1%81%D1%81%D1%8B%D0%BB%D0%BA%D0%B8%20%D0%BD%D0%B0%20%D1%84%D0%BE%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D0%B8%D0%B8%22%7D,%0A%20%22vkDownloadPhotoAlbum%22:%20%7B%22message%22:%20%22%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%20%D0%B0%D0%BB%D1%8C%D0%B1%D0%BE%D0%BC%22%7D,%0A%20%22vkDownloadAllPhotoAlbums%22:%20%7B%22message%22:%20%22%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%20%D0%B2%D1%81%D0%B5%20%D0%B0%D0%BB%D1%8C%D0%B1%D0%BE%D0%BC%D1%8B%22%7D,%0A%20%22vkFoundPhotos%22:%20%7B%22message%22:%20%22%D0%9D%D0%B0%D0%B9%D0%B4%D0%B5%D0%BD%D0%BE%20%D1%84%D0%BE%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D0%B8%D0%B9%22%7D,%0A%20%22vkNotAvailablePhotos%22:%20%7B%22message%22:%20%22%25d%20%D1%84%D0%BE%D1%82%D0%BE%20%D0%B2%D1%80%D0%B5%D0%BC%D0%B5%D0%BD%D0%BD%D0%BE%20%D0%BD%D0%B5%20%D0%B4%D0%BE%D1%81%D1%82%D1%83%D0%BF%D0%BD%D0%BE%22%7D,%0A%20%22vkFoundLinks%22:%20%7B%22message%22:%20%22%D0%9D%D0%B0%D0%B9%D0%B4%D0%B5%D0%BD%D0%BE%20%D1%81%D1%81%D1%8B%D0%BB%D0%BE%D0%BA%22%7D,%0A%20%22vkFoundOf%22:%20%7B%22message%22:%20%22%D0%B8%D0%B7%22%7D,%0A%20%22vkShowAs%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D0%BA%D0%B0%D0%B7%D0%B0%D1%82%D1%8C%20%D0%BA%D0%B0%D0%BA%22%7D,%0A%20%22vkListOfLinks%22:%20%7B%22message%22:%20%22%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA%20%D1%81%D1%81%D1%8B%D0%BB%D0%BE%D0%BA%22%7D,%0A%20%22vkListOfLinksInstruction%22:%20%7B%22message%22:%20%22%5B'%D0%A7%D1%82%D0%BE%D0%B1%D1%8B%20%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%20%D0%B2%D1%81%D0%B5%20%D1%84%D0%BE%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D0%B8%D0%B8,%20%D1%81%D0%BA%D0%BE%D0%BF%D0%B8%D1%80%D1%83%D0%B9%D1%82%D0%B5%20%D1%81%D0%BF%D0%B8%D1%81%D0%BE%D0%BA%20%D1%81%D1%81%D1%8B%D0%BB%D0%BE%D0%BA%20%D0%B8%20%D0%B2%D1%81%D1%82%D0%B0%D0%B2%D1%8C%D1%82%D0%B5%20%D0%B5%D0%B3%D0%BE%20%D0%B2%20',%7Ba:%7Bhref:'http://ru.wikipedia.org/wiki/%D0%9C%D0%B5%D0%BD%D0%B5%D0%B4%D0%B6%D0%B5%D1%80_%D0%B7%D0%B0%D0%B3%D1%80%D1%83%D0%B7%D0%BE%D0%BA',text:'%D0%BC%D0%B5%D0%BD%D0%B5%D0%B4%D0%B6%D0%B5%D1%80%20%D0%B7%D0%B0%D0%BA%D0%B0%D1%87%D0%B5%D0%BA'%7D%7D,'.%20%D0%95%D1%81%D0%BB%D0%B8%20%D1%83%20%D0%B2%D0%B0%D1%81%20%D0%BD%D0%B5%20%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%20%D0%BC%D0%B5%D0%BD%D0%B5%D0%B4%D0%B6%D0%B5%D1%80%20%D0%B7%D0%B0%D0%BA%D0%B0%D1%87%D0%B5%D0%BA,%20%D1%80%D0%B5%D0%BA%D0%BE%D0%BC%D0%B5%D0%BD%D0%B4%D1%83%D0%B5%D0%BC%20%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%B8%D1%82%D1%8C%20',%7Ba:%7Bhref:'http://www.westbyte.com/dm/',text:'Download%20Master'%7D%7D,'.'%5D%22%7D,%0A%20%22vkTableOfThumbnails%22:%20%7B%22message%22:%20%22%D0%A2%D0%B0%D0%B1%D0%BB%D0%B8%D1%86%D1%83%20%D1%8D%D1%81%D0%BA%D0%B8%D0%B7%D0%BE%D0%B2%22%7D,%0A%20%22vkListOfPhotos%22:%20%7B%22message%22:%20%22%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA%20%D1%84%D0%BE%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D0%B8%D0%B9%22%7D,%0A%20%22vkListOfPhotosInstruction%22:%20%7B%22message%22:%20%22%D0%A7%D1%82%D0%BE%D0%B1%D1%8B%20%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%20%D1%84%D0%BE%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D0%B8%D1%8E,%20%D1%89%D0%B5%D0%BB%D0%BA%D0%BD%D0%B8%D1%82%D0%B5%20%D0%BD%D0%B0%20%D0%BD%D0%B5%D0%B9%20%D0%BB%D0%B5%D0%B2%D0%BE%D0%B9%20%D0%BA%D0%BD%D0%BE%D0%BF%D0%BA%D0%BE%D0%B9%20%D0%BC%D1%8B%D1%88%D0%B8.%22%7D,%0A%20%22vkKbps%22:%20%7B%22message%22:%20%22%D0%BA%D0%B1/%D1%81%22%7D,%0A%20%22vkFileSizeByte%22:%20%7B%22message%22:%20%22%D0%91%22%7D,%0A%20%22vkFileSizeKByte%22:%20%7B%22message%22:%20%22%D0%BA%D0%91%22%7D,%0A%20%22vkFileSizeMByte%22:%20%7B%22message%22:%20%22%D0%9C%D0%91%22%7D,%0A%20%22vkFileSizeGByte%22:%20%7B%22message%22:%20%22%D0%93%D0%91%22%7D,%0A%20%22vkFileSizeTByte%22:%20%7B%22message%22:%20%22%D0%A2%D0%91%22%7D,%0A%20%22vkDownloadFromYoutube%22:%20%7B%22message%22:%20%22%5B'%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C:%20%D0%BE%D1%82%D0%BA%D1%80%D0%BE%D0%B9%D1%82%D0%B5%20',%7Ba:%7Bhref:'%7Burl%7D',text:'%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D1%83%20%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE%20%D1%80%D0%BE%D0%BB%D0%B8%D0%BA%D0%B0'%7D%7D,'%20%D0%B8%20%D0%BD%D0%B0%D0%B6%D0%BC%D0%B8%D1%82%D0%B5%20%D0%BA%D0%BD%D0%BE%D0%BF%D0%BA%D1%83%20%5C%22%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%5C%22%20%D0%BD%D0%B0%D0%B4%20%D0%BF%D0%BB%D0%B5%D0%B5%D1%80%D0%BE%D0%BC'%5D%22%7D,%0A%20%22vkFoundFiles%22:%20%7B%22message%22:%20%22%D0%9D%D0%B0%D0%B9%D0%B4%D0%B5%D0%BD%D0%BE%20%D1%84%D0%B0%D0%B9%D0%BB%D0%BE%D0%B2:%20%25d%22%7D,%0A%0A%20%22shareIn%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D0%B4%D0%B5%D0%BB%D0%B8%D1%82%D1%8C%D1%81%D1%8F%20%D0%B2%20%25w%22%7D,%0A%20%22socialDesc%22:%20%7B%22message%22:%20%22SaveFrom.net%20%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D0%BD%D0%B8%D0%BA%20%D0%BF%D0%BE%D0%BC%D0%BE%D0%B3%D0%B0%D0%B5%D1%82%20%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D0%BE%20%D1%81%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D1%82%D1%8C%20%D1%81%20VK.com,%20YouTube.com,%20Odnoklassniki.ru%20%D0%B8%20%D0%B1%D0%BE%D0%BB%D0%B5%D0%B5%2040%20%D0%B4%D1%80%D1%83%D0%B3%D0%B8%D1%85%20%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2%20%D0%B2%201%20%D0%BA%D0%BB%D0%B8%D0%BA%22%7D,%0A%0A%20%22tutorialS1Title%22:%20%7B%22message%22:%20%22%D0%A5%D0%BE%D1%80%D0%BE%D1%88%D0%B8%D0%B5%20%D0%BD%D0%BE%D0%B2%D0%BE%D1%81%D1%82%D0%B8!%22%7D,%0A%20%22tutorialS1Main%22:%20%7B%22message%22:%20%22%5B'%D0%A3%20%D1%82%D0%B5%D0%B1%D1%8F%20%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%20SaveFrom.net%20%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D0%BD%D0%B8%D0%BA%20',%7Bimg:%20%7Bsrc:%20'#logo'%7D%7D,',%20%D0%B8%20%D1%82%D0%B5%D0%BF%D0%B5%D1%80%D1%8C%20%D1%82%D1%8B%20%D0%BC%D0%BE%D0%B6%D0%B5%D1%88%D1%8C%20%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%20%D0%BB%D1%8E%D0%B1%D0%BE%D0%B5%20%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE%20%D1%81%20YouTube%20%D0%B2%20%D0%BE%D0%B4%D0%B8%D0%BD%20%D0%BA%D0%BB%D0%B8%D0%BA'%5D%22%7D,%0A%20%22tutorialS1Arrow%22:%20%7B%22message%22:%20%22%5B'%D0%A5%D0%BE%D1%87%D0%B5%D1%88%D1%8C%20%D1%83%D0%B7%D0%BD%D0%B0%D1%82%D1%8C%20%D0%BA%D0%B0%D0%BA?',%7Bbr:%7B%7D%7D,'%D0%9D%D0%B0%D0%B6%D0%BC%D0%B8%20%D0%B7%D0%B4%D0%B5%D1%81%D1%8C'%5D%22%7D,%0A%20%22tutorialS2Main%22:%20%7B%22message%22:%20%22%D0%A7%D1%82%D0%BE%D0%B1%D1%8B%20%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%20%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE,%20%D0%B2%D1%8B%D0%B1%D0%B5%D1%80%D0%B8%20%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%82%20%D0%B8%20%D0%BD%D0%B0%D0%B6%D0%BC%D0%B8%20%D0%BA%D0%BD%D0%BE%D0%BF%D0%BA%D1%83%20%5C%22%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%5C%22%22%7D,%0A%20%22tutorialS3History%22:%20%7B%22message%22:%20%22%D0%9F%D1%80%D0%BE%D1%81%D0%BC%D0%BE%D1%82%D1%80%D0%B5%D0%BD%D0%BD%D1%8B%D0%B5%22%7D,%0A%20%22tutorialS3Main%22:%20%7B%22message%22:%20%22%5B'%D0%A5%D0%BE%D1%87%D0%B5%D1%88%D1%8C%20%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C%20%D1%83%D0%B6%D0%B5%20%D0%BF%D1%80%D0%BE%D1%81%D0%BC%D0%BE%D1%82%D1%80%D0%B5%D0%BD%D0%BD%D0%BE%D0%B5%20%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE?',%7Bbr:%7B%7D%7D,'%D0%9D%D0%B0%D0%B6%D0%B8%D0%BC%D0%B0%D0%B9%20%D0%BD%D0%B0%20',%20%7Bimg:%20%7Bsrc:%20'#arrow'%7D%7D,'%20%D0%BD%D0%B0%20%D0%BF%D1%80%D0%B5%D0%B2%D1%8C%D1%8E%20%D0%B2%20%D0%9F%D1%80%D0%BE%D1%81%D0%BC%D0%BE%D1%82%D1%80%D0%B5%D0%BD%D0%BD%D1%8B%D1%85%20%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE'%5D%22%7D,%0A%20%22tutorialS4Main%22:%20%7B%22message%22:%20%22%5B'%D0%92%D0%B8%D0%B4%D0%B5%D0%BE%20%D0%BD%D0%B5%20%D0%BE%D0%B1%D1%8F%D0%B7%D0%B0%D1%82%D0%B5%D0%BB%D1%8C%D0%BD%D0%BE%20%D0%BF%D1%80%D0%BE%D1%81%D0%BC%D0%B0%D1%82%D1%80%D0%B8%D0%B2%D0%B0%D1%82%D1%8C%20%E2%80%94',%7Bbr:%7B%7D%7D,'%D0%BD%D0%B0%D0%B6%D0%B8%D0%BC%D0%B0%D0%B9%20%D0%BD%D0%B0%20',%20%7Bimg:%20%7Bsrc:%20'#arrow'%7D%7D,',%20%D0%B2%D1%8B%D0%B1%D0%B8%D1%80%D0%B0%D0%B9%20%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%82%20%D0%B8%20%D1%81%D0%BA%D0%B0%D1%87%D0%B8%D0%B2%D0%B0%D0%B9.%20%D0%AD%D1%82%D0%BE%20%D1%83%D0%B4%D0%BE%D0%B1%D0%BD%D0%BE!'%5D%22%7D,%0A%20%22tutorialS5Title%22:%20%7B%22message%22:%20%22%D0%9F%D1%80%D0%B8%D1%8F%D1%82%D0%BD%D0%BE%D0%B9%20%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%8B!%22%7D,%0A%20%22tutorialS5Main%22:%20%7B%22message%22:%20%22%5B'%D0%9E%D1%81%D1%82%D0%B0%D0%BB%D0%B8%D1%81%D1%8C%20%D0%B2%D0%BE%D0%BF%D1%80%D0%BE%D1%81%D1%8B?%20%D0%95%D1%81%D1%82%D1%8C%20%D0%BF%D1%80%D0%B5%D0%B4%D0%BB%D0%BE%D0%B6%D0%B5%D0%BD%D0%B8%D1%8F?%20%D0%97%D0%B0%D0%B3%D0%BB%D1%8F%D0%BD%D0%B8%D1%82%D0%B5%20%D0%BD%D0%B0%20',%20%7Ba:%20%7Btext:%20'%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D1%83%20%D0%BF%D0%BE%D0%B4%D0%B4%D0%B5%D1%80%D0%B6%D0%BA%D0%B8',%20href:%20'#support'%7D%7D,'%20%D0%B8%D0%BB%D0%B8%20%D0%B2%D1%81%D1%82%D1%83%D0%BF%D0%B0%D0%B9%D1%82%D0%B5%20%D0%B2%20%D0%BD%D0%B0%D1%88%D0%B5%20',%20%7Ba:%20%7Btext:%20'%D0%92%D0%9A-%D1%81%D0%BE%D0%B1%D1%89%D0%B5%D1%81%D1%82%D0%B2%D0%BE',%20href:%20'#vk'%7D%7D%5D%22%7D,%0A%0A%20%22tutorialTooltipText%22:%20%7B%22message%22:%20%22%5B'%D0%A7%D1%82%D0%BE%D0%B1%D1%8B%20',%7Bb:%20%7Btext:%20'%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C'%7D%7D,',%20%D0%BF%D1%80%D0%BE%D1%81%D1%82%D0%BE%20%D0%BA%D0%BB%D0%B8%D0%BA%D0%BD%D0%B8%D1%82%D0%B5%20%D0%BF%D0%BE%20%D0%BA%D0%BD%D0%BE%D0%BF%D0%BA%D0%B5'%5D%22%7D,%0A%0A%20%22ummyTooltipConfirm%22:%20%7B%22message%22:%20%22%5B'%D0%92%D1%8B%20%D1%83%D0%B6%D0%B5%20%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%B8%D0%BB%D0%B8',%7Bbr:%7B%7D%7D,%7Bimg:%7B%7D%7D,'%20Ummy%20Video%20Downloader?'%5D%22%7D,%0A%20%22yes%22:%20%7B%22message%22:%20%22%D0%94%D0%B0%22%7D,%0A%20%22no%22:%20%7B%22message%22:%20%22%D0%9D%D0%B5%D1%82%22%7D,%0A%20%22tooltipHide%22:%20%7B%22message%22:%20%22%D0%91%D0%BE%D0%BB%D1%8C%D1%88%D0%B5%20%D0%BD%D0%B5%20%D0%BF%D0%BE%D0%BA%D0%B0%D0%B7%D1%8B%D0%B2%D0%B0%D1%82%D1%8C%20%D1%8D%D1%82%D0%BE%20%D1%81%D0%BE%D0%BE%D0%B1%D1%89%D0%B5%D0%BD%D0%B8%D0%B5%22%7D%0A%7D";
_languageList.tr = "%7B%0A%20%22extName%22:%20%7B%22message%22:%20%22SaveFrom.net%20asistan%22%7D,%0A%20%22extDescription%22:%20%7B%22message%22:%20%22Sadece%20bir%20t%C4%B1klama%20ile%20YouTube,%20Facebook,%20VK.com%20ve%2040'dan%20fazla%20siteden%20dosya%20indirin.%22%7D,%0A%0A%20%22extNameLite%22:%20%7B%22message%22:%20%22SaveFrom.net%20asistan%20lite%22%7D,%0A%20%22extDescriptionLite%22:%20%7B%22message%22:%20%22Sadece%20bir%20t%C4%B1klama%20ile%20Facebook,%20VK.com%20ve%2040'dan%20fazla%20siteden%20dosya%20indirin%22%7D,%0A%0A%20%22lang%22:%20%7B%22message%22:%20%22tr%22%7D,%0A%0A%20%22titleDefault%22:%20%7B%22message%22:%20%22SaveFrom.net%20asistan%22%7D,%0A%20%22titleDesabled%22:%20%7B%22message%22:%20%22SaveFrom.net%20asistan%20devre%20d%C4%B1%C5%9F%C4%B1%22%7D,%0A%0A%20%22menuEnable%22:%20%7B%22message%22:%20%22Etkin%22%7D,%0A%20%22menuDisable%22:%20%7B%22message%22:%20%22Devre%20d%C4%B1%C5%9F%C4%B1%22%7D,%0A%0A%20%22showButton%22:%20%7B%22message%22:%20%22Eklenti%20d%C3%BC%C4%9Fmesini%20g%C3%B6ster%22%7D,%0A%0A%20%22copy%22:%20%7B%22message%22:%20%22Kopyala%22%7D,%0A%20%22download%22:%20%7B%22message%22:%20%22%C4%B0ndir%22%7D,%0A%20%22downloadTitle%22:%20%7B%22message%22:%20%22Dosyay%C4%B1%20indirmek%20i%C3%A7in%20Alt/Option%20veya%20Ctrl%20tu%C5%9Funa%20bas%C4%B1l%C4%B1%20tutarak%20ba%C4%9Flant%C4%B1y%C4%B1%20t%C4%B1klay%C4%B1n.%22%7D,%0A%20%22noLinksFound%22:%20%7B%22message%22:%20%22Hi%C3%A7bir%20ba%C4%9Flant%C4%B1%20bulunamad%C4%B1%22%7D,%0A%20%22more%22:%20%7B%22message%22:%20%22Daha%20fazla%22%7D,%0A%20%22close%22:%20%7B%22message%22:%20%22Kapat%22%7D,%0A%20%22kbps%22:%20%7B%22message%22:%20%22kbps%22%7D,%0A%20%22withoutAudio%22:%20%7B%22message%22:%20%22without%20audio%22%7D,%0A%20%22size%22:%20%7B%22message%22:%20%22boyut%22%7D,%0A%0A%20%22subtitles%22:%20%7B%22message%22:%20%22Alt%20yaz%C4%B1%22%7D,%0A%20%22playlist%22:%20%7B%22message%22:%20%22%C3%87alma%20listesi%22%7D,%0A%20%22filelist%22:%20%7B%22message%22:%20%22Dosya%20listesi%22%7D,%0A%20%22downloadWholePlaylist%22:%20%7B%22message%22:%20%22T%C3%BCm%20%C3%A7alma%20listesini%20indir%22%7D,%0A%0A%20%22getFileSizeTitle%22:%20%7B%22message%22:%20%22Dosya%20boyutunu%20al%22%20%7D,%0A%20%22getFileSizeFailTitle%22:%20%7B%22message%22:%20%22Dosya%20boyutu%20al%C4%B1namad%C4%B1.%20L%C3%BCtfen%20tekrar%20deneyiniz.%22%7D,%0A%0A%20%22lmButtonTitle%22:%20%7B%22message%22:%20%22Do%C4%9Frudan%20ba%C4%9Flant%C4%B1%20al%22%7D,%0A%0A%20%22downloadFromCurrentPage%22:%20%7B%22message%22:%20%22SaveFrom.net'e%20git%22%7D,%0A%20%22updateLinks%22:%20%7B%22message%22:%20%22Ba%C4%9Flant%C4%B1lar%C4%B1%20yenile%22%7D,%0A%20%22updateLinksNotification%22:%20%7B%22message%22:%20%22Ba%C4%9Flant%C4%B1lar%20g%C3%BCncellendi%22%7D,%0A%20%22downloadMP3Files%22:%20%7B%22message%22:%20%22Ses%20dosyalar%C4%B1n%C4%B1%20indir%22%7D,%0A%20%22downloadPlaylist%22:%20%7B%22message%22:%20%22%C3%87alma%20listesini%20indir%22%7D,%0A%20%22downloadPhotos%22:%20%7B%22message%22:%20%22Resimleri%20indir%22%7D,%0A%20%22installFullVersion%22:%20%7B%22message%22:%20%22Tam%20versiyonu%20kur%22%7D,%0A%20%22disable%22:%20%7B%22message%22:%20%22Devre%20d%C4%B1%C5%9F%C4%B1%22%7D,%0A%20%22showOptions%22:%20%7B%22message%22:%20%22Ayarlar%22%7D,%0A%20%22reportBug%22:%20%7B%22message%22:%20%22Hata%20bildir%22%7D,%0A%20%22openPoll%22:%20%7B%22message%22:%20%22Become%20better%22%7D,%0A%20%22disableModule%22:%20%7B%22message%22:%20%22Bu%20web%20sitesinde%20devre%20d%C4%B1%C5%9F%C4%B1%20b%C4%B1rak%22%7D,%0A%20%22enableModule%22:%20%7B%22message%22:%20%22Bu%20web%20sitesinde%20etkinle%C5%9Ftir%22%7D,%0A%20%22enableDisableModule%22:%20%7B%22message%22:%20%22Bu%20sitede%20etkin/devre%20d%C4%B1%C5%9F%C4%B1%22%7D,%0A%20%22showHideButton%22:%20%7B%22message%22:%20%22Eklenti%20butonunu%20g%C3%B6ster/gizle%22%7D,%0A%20%22updateTo%22:%20%7B%22message%22:%20%22%25d%20s%C3%BCr%C3%BCm%C3%BCne%20g%C3%BCncelle%22%7D,%0A%0A%20%22aboutPage%22:%20%7B%22message%22:%20%22Hakk%C4%B1nda%22%7D,%0A%20%22aboutTitle%22:%20%7B%22message%22:%20%22SaveFrom.net%20Asistan%22%7D,%0A%20%22aboutVersion%22:%20%7B%22message%22:%20%22Versiyon%22%7D,%0A%20%22aboutDescription%22:%20%7B%22message%22:%20%22Kullan%C4%B1c%C4%B1lar%C4%B1n,%20Dailymotion.com,%20YouTube.com,%20VK.com%20ve%20di%C4%9Ferleri%20de%20dahil%20olmak%20%C3%BCzere%2040'dan%20fazla%20web%20sitesinden%20dosya%20indirmek%20i%C3%A7in%20do%C4%9Frudan%20ba%C4%9Flant%C4%B1lar%20almalar%C4%B1n%C4%B1%20sa%C4%9Flar.%22%7D,%0A%20%22aboutDescriptionLite%22:%20%7B%22message%22:%20%22Kullan%C4%B1c%C4%B1lar%C4%B1n,%20Dailymotion.com,%20VK.com%20ve%20di%C4%9Ferleri%20de%20dahil%20olmak%20%C3%BCzere%2040'dan%20fazla%20web%20sitesinden%20dosya%20indirmek%20i%C3%A7in%20do%C4%9Frudan%20ba%C4%9Flant%C4%B1lar%20almalar%C4%B1n%C4%B1%20sa%C4%9Flar.%22%7D,%0A%20%22aboutSupported%22:%20%7B%22message%22:%20%22Desteklenen%20kaynaklar%22%7D,%0A%20%22homePage%22:%20%7B%22message%22:%20%22Ana%20Sayfa%22%7D,%0A%0A%20%22optionsTitle%22:%20%7B%22message%22:%20%22SaveFrom.net%20Asistan%20-%20Tercihler%22%7D,%0A%20%22optionsHandleLinks%22:%20%7B%22message%22:%20%22Linkleri%20ta%C5%9F%C4%B1%22%7D,%0A%20%22optionsFileHostings%22:%20%7B%22message%22:%20%22Dosya%20payla%C5%9F%C4%B1ma%22%7D,%0A%20%22optionsMediaHostings%22:%20%7B%22message%22:%20%22Medya%20payla%C5%9F%C4%B1ma%22%7D,%0A%20%22optionsModules%22:%20%7B%22message%22:%20%22Mod%C3%BCller%22%7D,%0A%20%22optionsYoutube%22:%20%7B%22message%22:%20%22YouTube%22%7D,%0A%20%22optionsYTHideLinks%22:%20%7B%22message%22:%20%22Ba%C4%9Flant%C4%B1lar%C4%B1%20gizle%22%7D,%0A%20%22optionsDailymotion%22:%20%7B%22message%22:%20%22Dailymotion%22%7D,%0A%20%22optionsVimeo%22:%20%7B%22message%22:%20%22Vimeo%22%7D,%0A%20%22optionsFacebook%22:%20%7B%22message%22:%20%22Facebook%22%7D,%0A%20%22optionsSoundcloud%22:%20%7B%22message%22:%20%22SoundCloud%22%7D,%0A%20%22optionsVkontakte%22:%20%7B%22message%22:%20%22VK%22%7D,%0A%20%22optionsOdnoklassniki%22:%20%7B%22message%22:%20%22Odnoklassniki%22%7D,%0A%20%22optionsMailru%22:%20%7B%22message%22:%20%22Moy%20Mir%22%7D,%0A%20%22optionsInstagram%22:%20%7B%22message%22:%20%22Instagram%22%7D,%0A%20%22optionsRutube%22:%20%7B%22message%22:%20%22Rutube%22%7D,%0A%20%22optionsBitrate%22:%20%7B%22message%22:%20%22Bit%20h%C4%B1z%C4%B1n%C4%B1%20anl%C4%B1k%20olarak%20g%C3%B6ster%22%7D,%0A%20%22optionsSovetnikEnabled%22:%20%7B%22message%22:%20%22Advisor%22%7D,%0A%20%22optionsShowUmmyInfo%22:%20%7B%22message%22:%20%22UVD%20i%C3%A7in%20ipu%C3%A7lar%C4%B1n%C4%B1%20g%C3%B6ster%22%7D,%0A%20%22optionsGmNativeDownload%22:%20%7B%22message%22:%20%22Geli%C5%9Fmi%C5%9F%20indirme%20modu%22%7D,%0A%20%22optionsShowUmmyBtn%22:%20%7B%22message%22:%20%22Ummy%20d%C3%BC%C4%9Fmesini%20g%C3%B6ster%22%7D,%0A%20%22optionsAviaBarEnabled%22:%20%7B%22message%22:%20%22Cheap%20Flights%20Advisor%22%7D,%0A%0A%20%22menuDownloadFromCurrentPage%22:%20%7B%22message%22:%20%22SaveFrom.net'i%20kullanarak%20ge%C3%A7erli%20sayfadan%20dosya%20indirin%22%7D,%0A%20%22menuUpdateLinks%22:%20%7B%22message%22:%20%22Download%20d%C3%BC%C4%9Fmesi%20g%C3%B6r%C3%BCnm%C3%BCyorsa%20t%C4%B1klay%C4%B1n%22%7D,%0A%20%22menuDownloadMP3Files%22:%20%7B%22message%22:%20%22Ge%C3%A7erli%20sayfada%20bulunan%20t%C3%BCm%20ses%20dosyalar%C4%B1n%C4%B1%20indirin%22%7D,%0A%20%22menuDownloadPlaylist%22:%20%7B%22message%22:%20%22Ses%20dosyalar%C4%B1ndan%20olu%C5%9Fan%20bir%20%C3%A7alma%20listesi%20olu%C5%9Fturur%20ve%20indirir%22%7D,%0A%20%22menuDownloadPhotos%22:%20%7B%22message%22:%20%22Ge%C3%A7erli%20sayfada%20bulunan%20t%C3%BCm%20resimleri%20indirin%22%7D,%0A%20%22menuReportBug%22:%20%7B%22message%22:%20%22Herhangi%20bir%20sorun%20olmas%C4%B1%20durumunda%20bize%20bildirin%22%7D,%0A%20%22menuShowOptions%22:%20%7B%22message%22:%20%22Desteklenen%20kaynaklar%C4%B1%20ve%20Helper%20se%C3%A7eneklerini%20A%C3%87/KAPAT%22%7D,%0A%20%22menuEnableExtension%22:%20%7B%22message%22:%20%22%22%7D,%0A%20%22menuOpenPoll%22:%20%7B%22message%22:%20%22%22%7D,%0A%0A%20%22quality%22:%20%7B%22message%22:%20%22Kalite%22%7D,%0A%20%22qualityNote%22:%20%7B%22message%22:%20%22Herhangi%20bir%20se%C3%A7ilebilir%20kalitenin%20olmamas%C4%B1%20durumunda%20mevcut%20olan%20en%20iyi%20video%20indirilecektir.%22%7D,%0A%20%22filelistTitle%22:%20%7B%22message%22:%20%22Bulunan%20dosyalar%C4%B1n%C4%B1%20listesi%22%7D,%0A%20%22filelistInstruction%22:%20%7B%22message%22:%20%22%5B'T%C3%BCm%20dosyalar%C4%B1n%C4%B1%20indirmek%20i%C3%A7in%20ba%C4%9Flant%C4%B1%20listesini%20kopyalay%C4%B1n%20ve%20',%7Ba:%7Bhref:'http://en.wikipedia.org/wiki/Download_manager',text:'indirme%20y%C3%B6neticisine'%7D%7D,'%20yap%C4%B1%C5%9Ft%C4%B1r%C4%B1n.%20Kurulu%20bir%20indirme%20y%C3%B6neticiniz%20yoksa%20',%7Ba:%7Bhref:'http://www.freedownloadmanager.org/',text:'Free%20Download%20Manager'%7D%7D,'%20y%C3%BCklemenizi%20tavsiye%20ederiz.'%5D%22%7D,%0A%20%22playlistTitle%22:%20%7B%22message%22:%20%22%C3%87alma%20Listesi%22%7D,%0A%20%22playlistInstruction%22:%20%7B%22message%22:%20%22Art%C4%B1k%20kaydedilen%20%C3%A7alma%20listenizi%20y%C3%BCr%C3%BCtmek%20i%C3%A7in%20m%C3%BCzik%20%C3%A7alar%C4%B1n%C4%B1zda%20a%C3%A7abilirsiniz.%22%7D,%0A%0A%20%22ummySfTitle%22:%20%7B%22message%22:%20%22HD%20veya%20MP3%22%7D,%0A%20%22ummyMenuItem%22:%20%7B%22message%22%20:%20%22%5B'Ummy%20ile%20',%7Bspan:%7B%7D%7D%5D%22%7D,%0A%20%22ummyMenuInfo%22:%20%7B%22message%22:%20%22%5B%7Bp:%7Btext:'Ummy%20Video%20%C4%B0ndirici%5C%5C'yi%20y%C3%BCkleyin%20ve%20en%20sevdi%C4%9Finiz%20HD%20videolar%C4%B1%20ya%20da%20MP3%5C%5C'leri%20hemen%20indirin.'%7D%7D,%7Bp:%7Bclass:'center',append:%5B%7Ba:%7Bclass:'green-btn-2%20arrow',href:'%7Burl%7D',target:'_blank',text:'%C4%B0ndir'%7D%7D%5D%7D%7D,%7Bp:%7Bappend:%5B'Kurulumdan%20sonra%20',%7Bimg:%7Bsrc:'#'%7D%7D,'%20simgesine%20t%C4%B1klayarak%20dosya%20indirme%20i%C5%9Flemini%20otomatik%20olarak%20ba%C5%9Flatabilirsiniz.'%5D%7D%7D%5D%22%7D,%0A%20%22warningPopupTitle%22:%20%7B%22message%22:%20%22Taray%C4%B1c%C4%B1%20ayarlar%C4%B1n%C4%B1%20kontrol%20edin%22%7D,%0A%20%22warningPopupDesc%22:%20%7B%22message%22:%20%22%5C%22Dosyalar%C4%B1n%20nereye%20kaydedilece%C4%9Fini%20her%20seferinde%20sor%5C%22%20se%C3%A7ene%C4%9Fi%20kapal%C4%B1%20olmal%C4%B1d%C4%B1r.%22%7D,%0A%20%22readMore%22:%20%7B%22message%22:%20%22Daha%20fazla%22%7D,%0A%20%22noWarning%22:%20%7B%22message%22:%20%22Bildirme%22%7D,%0A%20%22cancel%22:%20%7B%22message%22:%20%22%C4%B0ptal%22%7D,%0A%20%22continue%22:%20%7B%22message%22:%20%22Devam%22%7D,%0A%20%22beforeDownloadPopupWarn%22:%20%7B%22message%22:%20%22Uyar%C4%B1!%20%C4%B0ndirme%20i%C5%9Flemi%20iptal%20edilemez%20ya%20da%20ertelenemez.%22%7D,%0A%0A%20%22vkInfo%22:%20%7B%22message%22:%20%22Bilgi%22%7D,%0A%20%22vkInfoTitle%22:%20%7B%22message%22:%20%22Dosya%20boyutu%20ve%20bit%20h%C4%B1z%C4%B1%22%7D,%0A%20%22vkMp3LinksNotFound%22:%20%7B%22message%22:%20%22MP3%20dosyalar%C4%B1%20i%C3%A7in%20ba%C4%9Flant%C4%B1lar%20bulunam%C4%B1yor%22%7D,%0A%20%22vkPhotoLinksNotFound%22:%20%7B%22message%22:%20%22Foto%C4%9Fraflar%20bulunamad%C4%B1%22%7D,%0A%20%22vkDownloadPhotoAlbum%22:%20%7B%22message%22:%20%22Alb%C3%BCm%C3%BC%20indir%22%7D,%0A%20%22vkDownloadAllPhotoAlbums%22:%20%7B%22message%22:%20%22T%C3%BCm%20alb%C3%BCmleri%20indir%22%7D,%0A%20%22vkFoundPhotos%22:%20%7B%22message%22:%20%22Bulunan%20foto%C4%9Fraflar%22%7D,%0A%20%22vkNotAvailablePhotos%22:%20%7B%22message%22:%20%22%25d%20resim%20ge%C3%A7ici%20olarak%20kullan%C4%B1lam%C4%B1yor%22%7D,%0A%20%22vkFoundLinks%22:%20%7B%22message%22:%20%22Bulunan%20ba%C4%9Flant%C4%B1lar%22%7D,%0A%20%22vkFoundOf%22:%20%7B%22message%22:%20%22den%22%7D,%0A%20%22vkShowAs%22:%20%7B%22message%22:%20%22Olarak%20g%C3%B6ster%22%7D,%0A%20%22vkListOfLinks%22:%20%7B%22message%22:%20%22Ba%C4%9Flant%C4%B1%20listesi%22%7D,%0A%20%22vkListOfLinksInstruction%22:%20%7B%22message%22:%20%22%5B'T%C3%BCm%20foto%C4%9Fraflar%C4%B1%20indirmek%20i%C3%A7in%20ba%C4%9Flant%C4%B1%20listesini%20kopyalay%C4%B1n%20ve%20',%7Ba:%7Bhref:'http://en.wikipedia.org/wiki/Download_manager',text:'indirme%20y%C3%B6neticisine'%7D%7D,'%20yap%C4%B1%C5%9Ft%C4%B1r%C4%B1n.%20Kurulu%20bir%20indirme%20y%C3%B6neticiniz%20yoksa%20',%7Ba:%7Bhref:'http://www.freedownloadmanager.org/',text:'Free%20Download%20Manager'%7D%7D,'%20y%C3%BCklemenizi%20tavsiye%20ederiz.'%5D%22%7D,%0A%20%22vkTableOfThumbnails%22:%20%7B%22message%22:%20%22K%C3%BC%C3%A7%C3%BCkk%20resimler%20tablosu%22%7D,%0A%20%22vkListOfPhotos%22:%20%7B%22message%22:%20%22Foto%C4%9Fraf%20listesi%22%7D,%0A%20%22vkListOfPhotosInstruction%22:%20%7B%22message%22:%20%22%C4%B0ndirmek%20i%C3%A7in%20foto%C4%9Fraf%C4%B1n%20%C3%BCzerine%20t%C4%B1klay%C4%B1n.%22%7D,%0A%20%22vkKbps%22:%20%7B%22message%22:%20%22kbps%22%7D,%0A%20%22vkFileSizeByte%22:%20%7B%22message%22:%20%22B%22%7D,%0A%20%22vkFileSizeKByte%22:%20%7B%22message%22:%20%22kB%22%7D,%0A%20%22vkFileSizeMByte%22:%20%7B%22message%22:%20%22MB%22%7D,%0A%20%22vkFileSizeGByte%22:%20%7B%22message%22:%20%22GB%22%7D,%0A%20%22vkFileSizeTByte%22:%20%7B%22message%22:%20%22TB%22%7D,%0A%20%22vkDownloadFromYoutube%22:%20%7B%22message%22:%20%22%5B'%C4%B0ndirme:%20',%7Ba:%7Bhref:'%7Burl%7D',text:'video%20sayfas%C4%B1n%C4%B1'%7D%7D,'%20a%C3%A7%C4%B1n%20ve%20oynat%C4%B1c%C4%B1%20%C3%BCzerindeki%20%5C%22%C4%B0ndir%5C%22%20d%C3%BCmesine%20bas%C4%B1n'%5D%22%7D,%0A%20%22vkFoundFiles%22:%20%7B%22message%22:%20%22Bulunan%20dosyalar:%20%25d%22%7D,%0A%0A%20%22shareIn%22:%20%7B%22message%22:%20%22%25w%20%C3%BCzerinden%20payla%C5%9F%22%7D,%0A%20%22socialDesc%22:%20%7B%22message%22:%20%22SaveFrom.net%20Helper,%20sadece%20bir%20t%C4%B1klama%20ile%20YouTube.com,%20Facebook.com,%20VK.com%20ve%2040'dan%20fazla%20siteden%20%C3%BCcretsiz%20olarak%20dosya%20indirmenizi%20sa%C4%9Flar.%22%7D,%0A%0A%20%22tutorialS1Title%22:%20%7B%22message%22:%20%22Size%20harika%20bir%20haberimiz%20var!%22%7D,%0A%20%22tutorialS1Main%22:%20%7B%22message%22:%20%22%5B'SaveFrom.net%20Helper%20',%7Bimg:%20%7Bsrc:%20'#logo'%7D%7D,%20'%20ba%C5%9Far%C4%B1yla%20kuruldu.%20Art%C4%B1k%20tek%20bir%20t%C4%B1klama%20ile%20YouTube%5C%5C'dan%20istedi%C4%9Finiz%20videoyu%20indirebilirsiniz'%5D%22%7D,%0A%20%22tutorialS1Arrow%22:%20%7B%22message%22:%20%22%5B'Nas%C4%B1l%20oldu%C4%9Funu%20%C3%B6%C4%9Frenmek%20ister%20misiniz?%20Buraya%20t%C4%B1klay%C4%B1n'%5D%22%7D,%0A%20%22tutorialS2Main%22:%20%7B%22message%22:%20%22Sadece%20indirmek%20istedi%C4%9Finiz%20videonun%20format%C4%B1n%C4%B1%20se%C3%A7in%20ve%20%5C%22%C4%B0ndir%5C%22%20butonuna%20t%C4%B1klay%C4%B1n%22%7D,%0A%20%22tutorialS3History%22:%20%7B%22message%22:%20%22Ge%C3%A7mi%C5%9F%22%7D,%0A%20%22tutorialS3Main%22:%20%7B%22message%22:%20%22%5B'Web%20ge%C3%A7mi%C5%9Finizdeki%20videolar%C4%B1%20indirmek%20ister%20misiniz?',%20%7Bbr:%7B%7D%7D,%20'%20Sadece%20daha%20%C3%B6nce%20izledi%C4%9Finiz%20bir%20videonun%20%C3%B6nizlemesi%20%C3%BCzerindeki%20',%20%7Bimg:%20%7Bsrc:%20'#arrow'%7D%7D,%20'%20simgesine%20t%C4%B1klay%C4%B1n'%5D%22%7D,%0A%20%22tutorialS4Main%22:%20%7B%22message%22:%20%22%5B'Videolar%C4%B1%20izlemenize%20gerek%20yok%20%E2%80%94%20sadece%20',%20%7Bimg:%20%7Bsrc:%20'#arrow'%7D%7D,%20'%20simgesine%20t%C4%B1klay%C4%B1n,%20kalite%20de%C4%9Ferini%20se%C3%A7in%20ve%20an%C4%B1nda%20indirin.%20Olduk%C3%A7a%20kolay,%20de%C4%9Fil%20mi?'%5D%22%7D,%0A%20%22tutorialS5Title%22:%20%7B%22message%22:%20%22Hemen%20SaveFrom.net%20Helper'in%20keyfini%20%C3%A7%C4%B1karmaya%20ba%C5%9Flay%C4%B1n!%22%7D,%0A%20%22tutorialS5Main%22:%20%7B%22message%22:%20%22%5B'Hala%20kafan%C4%B1za%20tak%C4%B1lan%20sorular%20m%C4%B1%20var?%20D%C3%BC%C5%9F%C3%BCncelerinizi%20payla%C5%9Fmak%20m%C4%B1%20istiyorsunuz?%20',%7Ba:%20%7Btext:%20'Destek%20sayfam%C4%B1z%C4%B1',%20href:%20'#support'%7D%7D,'%20ziyaret%20edin%20veya%20',%7Ba:%20%7Btext:%20'Facebook',%20href:%20'#fb'%7D%7D,'%20toplulu%C4%9Fumuza%20kat%C4%B1l%C4%B1n'%5D%22%7D,%0A%0A%20%22tutorialTooltipText%22:%20%7B%22message%22:%20%22%5B%7Bb:%20%7Btext:%20'%C4%B0ndirmek'%7D%7D,%20'%20i%C3%A7in%20sadece%20butona%20t%C4%B1klay%C4%B1n'%5D%22%7D,%0A%0A%20%22ummyTooltipConfirm%22:%20%7B%22message%22:%20%22%5B%7Bimg:%7B%7D%7D,'%20Ummy%20Video%20Downloader%20program%C4%B1n%C4%B1%20daha%20%C3%B6nce%20y%C3%BCklediniz%20mi?'%5D%22%7D,%0A%20%22yes%22:%20%7B%22message%22:%20%22Evet%22%7D,%0A%20%22no%22:%20%7B%22message%22:%20%22Hay%C4%B1r%22%7D,%0A%20%22tooltipHide%22:%20%7B%22message%22:%20%22Bu%20mesaj%C4%B1%20tekrar%20g%C3%B6sterme%22%7D%0A%7D";
_languageList.uk = "%7B%0A%20%22extName%22:%20%7B%22message%22:%20%22SaveFrom.net%20%D0%BF%D0%BE%D0%BC%D1%96%D1%87%D0%BD%D0%B8%D0%BA%22%7D,%0A%20%22extDescription%22:%20%7B%22message%22:%20%22%D0%97%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D1%83%D0%B9%D1%82%D0%B5%20%D0%B7%20%C2%AB%D0%92%D0%9A%D0%BE%D0%BD%D1%82%D0%B0%D0%BA%D1%82%D0%B5%C2%BB,%20YouTube,%20Facebook%20%D1%96%20%D1%89%D0%B5%2040%20%D1%81%D0%B0%D0%B9%D1%82%D1%96%D0%B2%20%D0%B7%D0%B0%201%20%D0%BA%D0%BB%D1%96%D0%BA.%22%7D,%0A%0A%20%22extNameLite%22:%20%7B%22message%22:%20%22SaveFrom.net%20%D0%BF%D0%BE%D0%BC%D1%96%D1%87%D0%BD%D0%B8%D0%BA%20lite%22%7D,%0A%20%22extDescriptionLite%22:%20%7B%22message%22:%20%22%D0%97%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D1%83%D0%B9%D1%82%D0%B5%20%D0%B7%20%C2%AB%D0%92%D0%9A%D0%BE%D0%BD%D1%82%D0%B0%D0%BA%D1%82%D0%B5%C2%BB,%20YouTube,%20Facebook%20%D1%96%20%D1%89%D0%B5%2040%20%D1%81%D0%B0%D0%B9%D1%82%D1%96%D0%B2%20%D0%B7%D0%B0%201%20%D0%BA%D0%BB%D1%96%D0%BA.%22%7D,%0A%0A%20%22lang%22:%20%7B%22message%22:%20%22uk%22%7D,%0A%0A%20%22titleDefault%22:%20%7B%22message%22:%20%22SaveFrom.net%20%D0%BF%D0%BE%D0%BC%D1%96%D1%87%D0%BD%D0%B8%D0%BA%22%7D,%0A%20%22titleDesabled%22:%20%7B%22message%22:%20%22SaveFrom.net%20%D0%BF%D0%BE%D0%BC%D1%96%D1%87%D0%BD%D0%B8%D0%BA%20%D0%B2%D0%B8%D0%BC%D0%BA%D0%BD%D0%B5%D0%BD%D0%B8%D0%B9%22%7D,%0A%0A%20%22menuEnable%22:%20%7B%22message%22:%20%22%D0%A3%D0%B2%D1%96%D0%BC%D0%BA%D0%BD%D1%83%D1%82%D0%B8%22%7D,%0A%20%22menuDisable%22:%20%7B%22message%22:%20%22%D0%92%D0%B8%D0%BC%D0%BA%D0%BD%D1%83%D1%82%D0%B8%22%7D,%0A%0A%20%22showButton%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D0%BA%D0%B0%D0%B7%D1%83%D0%B2%D0%B0%D1%82%D0%B8%20%D0%BA%D0%BD%D0%BE%D0%BF%D0%BA%D1%83%20%D1%80%D0%BE%D0%B7%D1%88%D0%B8%D1%80%D0%B5%D0%BD%D0%BD%D1%8F%22%7D,%0A%0A%20%22copy%22:%20%7B%22message%22:%20%22%D0%9A%D0%BE%D0%BF%D1%96%D1%8E%D0%B2%D0%B0%D1%82%D0%B8%22%7D,%0A%20%22download%22:%20%7B%22message%22:%20%22%D0%97%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B8%D1%82%D0%B8%22%7D,%0A%20%22downloadTitle%22:%20%7B%22message%22:%20%22%D0%9D%D0%B0%D1%82%D0%B8%D1%81%D0%BD%D1%96%D1%82%D1%8C%20%D0%BD%D0%B0%20%D0%BF%D0%BE%D1%81%D0%B8%D0%BB%D0%B0%D0%BD%D0%BD%D1%8F,%20%D1%83%D1%82%D1%80%D0%B8%D0%BC%D1%83%D1%8E%D1%87%D0%B8%20%D0%BA%D0%BB%D0%B0%D0%B2%D1%96%D1%88%D1%83%20Alt%20%D1%87%D0%B8%20Ctrl,%20%D1%89%D0%BE%D0%B1%20%D0%B7%D0%B1%D0%B5%D1%80%D0%B5%D0%B3%D1%82%D0%B8%20%D1%84%D0%B0%D0%B9%D0%BB.%22%7D,%0A%20%22noLinksFound%22:%20%7B%22message%22:%20%22%D0%9D%D0%B5%20%D0%B2%D0%B4%D0%B0%D0%BB%D0%BE%D1%81%D1%8F%20%D0%B7%D0%BD%D0%B0%D0%B9%D1%82%D0%B8%20%D0%BF%D0%BE%D1%81%D0%B8%D0%BB%D0%B0%D0%BD%D0%BD%D1%8F%22%7D,%0A%20%22more%22:%20%7B%22message%22:%20%22%D0%A9%D0%B5%22%7D,%0A%20%22close%22:%20%7B%22message%22:%20%22%D0%97%D0%B0%D0%BA%D1%80%D0%B8%D1%82%D0%B8%22%7D,%0A%20%22kbps%22:%20%7B%22message%22:%20%22%D0%BA%D0%B1/%D1%81%22%7D,%0A%20%22withoutAudio%22:%20%7B%22message%22:%20%22%D0%B1%D0%B5%D0%B7%20%D0%B0%D1%83%D0%B4%D1%96%D0%BE%22%7D,%0A%20%22size%22:%20%7B%22message%22:%20%22%D1%80%D0%BE%D0%B7%D0%BC%D1%96%D1%80%22%7D,%0A%0A%20%22subtitles%22:%20%7B%22message%22:%20%22%D0%A1%D1%83%D0%B1%D1%82%D0%B8%D1%82%D1%80%D0%B8%22%7D,%0A%20%22playlist%22:%20%7B%22message%22:%20%22%D0%9F%D0%BB%D0%B5%D0%B9%D0%BB%D1%96%D1%81%D1%82%22%7D,%0A%20%22filelist%22:%20%7B%22message%22:%20%22%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA%20%D1%84%D0%B0%D0%B9%D0%BB%D1%96%D0%B2%22%7D,%0A%20%22downloadWholePlaylist%22:%20%7B%22message%22:%20%22%D0%97%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B8%D1%82%D0%B8%20%D0%B2%D0%B5%D1%81%D1%8C%20%D0%BF%D0%BB%D0%B5%D0%B9%D0%BB%D1%96%D1%81%D1%82%22%7D,%0A%0A%20%22getFileSizeTitle%22:%20%7B%22message%22:%20%22%D0%92%D0%B8%D0%B7%D0%BD%D0%B0%D1%87%D0%B8%D1%82%D0%B8%20%D1%80%D0%BE%D0%B7%D0%BC%D1%96%D1%80%20%D1%84%D0%B0%D0%B9%D0%BB%D1%83%22%20%7D,%0A%20%22getFileSizeFailTitle%22:%20%7B%22message%22:%20%22%D0%9D%D0%B5%20%D0%B2%D0%B4%D0%B0%D0%BB%D0%BE%D1%81%D1%8F%20%D0%B2%D0%B8%D0%B7%D0%BD%D0%B0%D1%87%D0%B8%D1%82%D0%B8%20%D1%80%D0%BE%D0%B7%D0%BC%D1%96%D1%80%20%D1%84%D0%B0%D0%B9%D0%BB%D1%83.%20%D0%A1%D0%BF%D1%80%D0%BE%D0%B1%D1%83%D0%B9%D1%82%D0%B5%20%D1%89%D0%B5%20%D1%80%D0%B0%D0%B7.%22%7D,%0A%0A%20%22lmButtonTitle%22:%20%7B%22message%22:%20%22%D0%9E%D1%82%D1%80%D0%B8%D0%BC%D0%B0%D0%B9%20%D0%BF%D1%80%D1%8F%D0%BC%D0%B5%20%D0%BF%D0%BE%D1%81%D0%B8%D0%BB%D0%B0%D0%BD%D0%BD%D1%8F%22%7D,%0A%0A%20%22downloadFromCurrentPage%22:%20%7B%22message%22:%20%22%D0%9F%D0%B5%D1%80%D0%B5%D0%B9%D1%82%D0%B8%20%D0%BD%D0%B0%20SaveFrom.net%22%7D,%0A%20%22updateLinks%22:%20%7B%22message%22:%20%22%D0%92%D1%96%D0%B4%D0%BD%D0%BE%D0%B2%D0%B8%D1%82%D0%B8%20%D0%BF%D0%BE%D1%81%D0%B8%D0%BB%D0%B0%D0%BD%D0%BD%D1%8F%22%7D,%0A%20%22updateLinksNotification%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D1%81%D0%B8%D0%BB%D0%B0%D0%BD%D0%BD%D1%8F%20%D0%BE%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D1%96%22%7D,%0A%20%22downloadMP3Files%22:%20%7B%22message%22:%20%22%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D0%B8%20%D0%B0%D1%83%D0%B4%D1%96%D0%BE%20%D1%84%D0%B0%D0%B9%D0%BB%D0%B8%22%7D,%0A%20%22downloadPlaylist%22:%20%7B%22message%22:%20%22%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D0%B8%20%D0%BF%D0%BB%D0%B5%D0%B9%D0%BB%D0%B8%D1%81%D1%82%22%7D,%0A%20%22downloadPhotos%22:%20%7B%22message%22:%20%22%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D0%B8%20%D1%84%D0%BE%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D1%96%D1%97%22%7D,%0A%20%22installFullVersion%22:%20%7B%22message%22:%20%22%D0%92%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%B8%D1%82%D0%B8%20%D0%BF%D0%BE%D0%B2%D0%BD%D1%83%20%D0%B2%D0%B5%D1%80%D1%81%D1%96%D1%8E%22%7D,%0A%20%22disable%22:%20%7B%22message%22:%20%22%D0%92%D0%B8%D0%BC%D0%BA%D0%BD%D1%83%D1%82%D0%B8%22%7D,%0A%20%22showOptions%22:%20%7B%22message%22:%20%22%D0%9D%D0%B0%D0%BB%D0%B0%D1%88%D1%82%D1%83%D0%B2%D0%B0%D0%BD%D0%BD%D1%8F%22%7D,%0A%20%22reportBug%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D0%B2%D1%96%D0%B4%D0%BE%D0%BC%D0%B8%D1%82%D0%B8%20%D0%BF%D1%80%D0%BE%20%D0%BF%D0%BE%D0%BC%D0%B8%D0%BB%D0%BA%D1%83%22%7D,%0A%20%22openPoll%22:%20%7B%22message%22:%20%22%D0%A1%D1%82%D0%B0%D1%82%D0%B8%20%D0%BA%D1%80%D0%B0%D1%89%D0%B5%22%7D,%0A%20%22disableModule%22:%20%7B%22message%22:%20%22%D0%92%D0%B8%D0%BC%D0%BA%D0%BD%D1%83%D1%82%D0%B8%20%D0%BD%D0%B0%20%D1%86%D1%8C%D0%BE%D0%BC%D1%83%20%D1%81%D0%B0%D0%B9%D1%82%D1%96%22%7D,%0A%20%22enableModule%22:%20%7B%22message%22:%20%22%D0%A3%D0%B2%D1%96%D0%BC%D0%BA%D0%BD%D1%83%D1%82%D0%B8%20%D0%BD%D0%B0%20%D1%86%D1%8C%D0%BE%D0%BC%D1%83%20%D1%81%D0%B0%D0%B9%D1%82%D1%96%22%7D,%0A%20%22enableDisableModule%22:%20%7B%22message%22:%20%22%D0%92%D0%BA%D0%BB./%D0%B2%D0%B8%D0%BC%D0%BA.%20%D0%BD%D0%B0%20%D1%86%D1%8C%D0%BE%D0%BC%D1%83%20%D1%81%D0%B0%D0%B9%D1%82%D1%96%22%7D,%0A%20%22showHideButton%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D0%BA%D0%B0%D0%B7./%D1%81%D0%BA%D1%80.%20%D0%BA%D0%BD%D0%BE%D0%BF%D0%BA%D1%83%20%D1%80%D0%BE%D0%B7%D1%88%D0%B8%D1%80%D0%B5%D0%BD%D0%BD%D1%8F%22%7D,%0A%20%22updateTo%22:%20%7B%22message%22:%20%22%D0%9E%D0%BD%D0%BE%D0%B2%D0%B8%D1%82%D0%B8%20%D0%B4%D0%BE%20%25d%22%7D,%0A%0A%20%22aboutPage%22:%20%7B%22message%22:%20%22%D0%9F%D1%80%D0%BE%20%D1%80%D0%BE%D0%B7%D1%88%D0%B8%D1%80%D0%B5%D0%BD%D0%BD%D1%8F%22%7D,%0A%20%22aboutTitle%22:%20%7B%22message%22:%20%22SaveFrom.net%20%D0%BF%D0%BE%D0%BC%D1%96%D1%87%D0%BD%D0%B8%D0%BA%22%7D,%0A%20%22aboutVersion%22:%20%7B%22message%22:%20%22%D0%92%D0%B5%D1%80%D1%81%D1%96%D1%8F%22%7D,%0A%20%22aboutDescription%22:%20%7B%22message%22:%20%22%D0%94%D0%BE%D0%B7%D0%B2%D0%BE%D0%BB%D1%8F%D1%94%20%D0%BE%D1%82%D1%80%D0%B8%D0%BC%D1%83%D0%B2%D0%B0%D1%82%D0%B8%20%D0%BF%D1%80%D1%8F%D0%BC%D1%96%20%D0%BF%D0%BE%D1%81%D0%B8%D0%BB%D0%B0%D0%BD%D0%BD%D1%8F%20%D0%B4%D0%BB%D1%8F%20%D0%B7%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B5%D0%BD%D0%BD%D1%8F%20%D0%B7%20%D0%BF%D0%BE%D0%BD%D0%B0%D0%B4%2040%20%D1%81%D0%B0%D0%B9%D1%82%D1%96%D0%B2,%20%D1%81%D0%B5%D1%80%D0%B5%D0%B4%20%D1%8F%D0%BA%D0%B8%D1%85%20VK.com,%20YouTube.com%20%D1%82%D0%B0%20%D1%96%D0%BD%D1%88%D1%96.%22%7D,%0A%20%22aboutDescriptionLite%22:%20%7B%22message%22:%20%22%D0%94%D0%BE%D0%B7%D0%B2%D0%BE%D0%BB%D1%8F%D1%94%20%D0%BE%D1%82%D1%80%D0%B8%D0%BC%D1%83%D0%B2%D0%B0%D1%82%D0%B8%20%D0%BF%D1%80%D1%8F%D0%BC%D1%96%20%D0%BF%D0%BE%D1%81%D0%B8%D0%BB%D0%B0%D0%BD%D0%BD%D1%8F%20%D0%B4%D0%BB%D1%8F%20%D0%B7%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B5%D0%BD%D0%BD%D1%8F%20%D0%B7%20%D0%BF%D0%BE%D0%BD%D0%B0%D0%B4%2040%20%D1%81%D0%B0%D0%B9%D1%82%D1%96%D0%B2,%20%D1%81%D0%B5%D1%80%D0%B5%D0%B4%20%D1%8F%D0%BA%D0%B8%D1%85%20VK.com%20%D1%82%D0%B0%20%D1%96%D0%BD%D1%88%D1%96.%22%7D,%0A%20%22aboutSupported%22:%20%7B%22message%22:%20%22%D0%A0%D0%B5%D1%81%D1%83%D1%80%D1%81%D0%B8,%20%D1%8F%D0%BA%D1%96%20%D0%BF%D1%96%D0%B4%D1%82%D1%80%D0%B8%D0%BC%D1%83%D1%8E%D1%82%D1%8C%D1%81%D1%8F%22%7D,%0A%20%22homePage%22:%20%7B%22message%22:%20%22%D0%94%D0%BE%D0%BC%D0%B0%D1%88%D0%BD%D1%8F%20%D1%81%D1%82%D0%BE%D1%80%D1%96%D0%BD%D0%BA%D0%B0%22%7D,%0A%0A%20%22optionsTitle%22:%20%7B%22message%22:%20%22SaveFrom.net%20%D0%BF%D0%BE%D0%BC%D1%96%D1%87%D0%BD%D0%B8%D0%BA%20-%20%D0%9D%D0%B0%D0%BB%D0%B0%D1%88%D1%82%D1%83%D0%B2%D0%B0%D0%BD%D0%BD%D1%8F%22%7D,%0A%20%22optionsHandleLinks%22:%20%7B%22message%22:%20%22%D0%9E%D0%B1%D1%80%D0%BE%D0%B1%D0%BB%D1%8F%D1%82%D0%B8%20%D0%BF%D0%BE%D1%81%D0%B8%D0%BB%D0%B0%D0%BD%D0%BD%D1%8F%22%7D,%0A%20%22optionsFileHostings%22:%20%7B%22message%22:%20%22%D0%9D%D0%B0%20%D1%84%D0%B0%D0%B9%D0%BB%D0%BE%D0%BE%D0%B1%D0%BC%D1%96%D0%BD%D0%BD%D0%B8%D0%BA%D0%B8%22%7D,%0A%20%22optionsMediaHostings%22:%20%7B%22message%22:%20%22%D0%9D%D0%B0%20%D0%BC%D0%B5%D0%B4%D1%96%D0%B0%D1%85%D0%BE%D1%81%D1%82%D0%B8%D0%BD%D0%B3%D0%B8%22%7D,%0A%20%22optionsModules%22:%20%7B%22message%22:%20%22%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%96%22%7D,%0A%20%22optionsYoutube%22:%20%7B%22message%22:%20%22YouTube%22%7D,%0A%20%22optionsYTHideLinks%22:%20%7B%22message%22:%20%22%D0%A1%D1%85%D0%BE%D0%B2%D0%B0%D1%82%D0%B8%20%D0%BF%D0%BE%D1%81%D0%B8%D0%BB%D0%B0%D0%BD%D0%BD%D1%8F%22%7D,%0A%20%22optionsDailymotion%22:%20%7B%22message%22:%20%22Dailymotion%22%7D,%0A%20%22optionsVimeo%22:%20%7B%22message%22:%20%22Vimeo%22%7D,%0A%20%22optionsFacebook%22:%20%7B%22message%22:%20%22Facebook%22%7D,%0A%20%22optionsSoundcloud%22:%20%7B%22message%22:%20%22SoundCloud%22%7D,%0A%20%22optionsVkontakte%22:%20%7B%22message%22:%20%22%D0%92%D0%9A%D0%BE%D0%BD%D1%82%D0%B0%D0%BA%D1%82%D0%B5%22%7D,%0A%20%22optionsOdnoklassniki%22:%20%7B%22message%22:%20%22%D0%9E%D0%B4%D0%BD%D0%BE%D0%BA%D0%BB%D0%B0%D1%81%D1%81%D0%BD%D0%B8%D0%BA%D0%B8%22%7D,%0A%20%22optionsMailru%22:%20%7B%22message%22:%20%22%D0%9C%D0%BE%D0%B9%20%D0%BC%D0%B8%D1%80%22%7D,%0A%20%22optionsInstagram%22:%20%7B%22message%22:%20%22Instagram%22%7D,%0A%20%22optionsRutube%22:%20%7B%22message%22:%20%22Rutube%22%7D,%0A%20%22optionsBitrate%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D0%BA%D0%B0%D0%B7%D1%83%D0%B2%D0%B0%D1%82%D0%B8%20%D0%B1%D1%96%D1%82%D1%80%D0%B5%D0%B9%D1%82%20%D0%BE%D0%B4%D1%80%D0%B0%D0%B7%D1%83%22%7D,%0A%20%22optionsSovetnikEnabled%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D1%80%D0%B0%D0%B4%D0%BD%D0%B8%D0%BA%22%7D,%0A%20%22optionsShowUmmyInfo%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D0%BA%D0%B0%D0%B7%D1%83%D0%B2%D0%B0%D1%82%D0%B8%20%D0%BF%D1%96%D0%B4%D0%BA%D0%B0%D0%B7%D0%BA%D0%B8%20%D0%B4%D0%BB%D1%8F%20Ummy%20Video%20Downloader%22%7D,%0A%20%22optionsGmNativeDownload%22:%20%7B%22message%22:%20%22%D0%A0%D0%BE%D0%B7%D1%88%D0%B8%D1%80%D0%B5%D0%BD%D0%B8%D0%B9%20%D1%80%D0%B5%D0%B6%D0%B8%D0%BC%20%D0%B7%D0%B0%D0%BA%D0%B0%D1%87%D1%83%D0%B2%D0%B0%D0%BD%D0%BD%D1%8F%22%7D,%0A%20%22optionsShowUmmyBtn%22:%20%7B%22message%22:%20%22%D0%92%D1%96%D0%B4%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B0%D1%82%D0%B8%20%D0%BA%D0%BD%D0%BE%D0%BF%D0%BA%D1%83%20Ummy%22%7D,%0A%20%22optionsAviaBarEnabled%22:%20%7B%22message%22:%20%22Cheap%20Flights%20Advisor%22%7D,%0A%0A%20%22menuDownloadFromCurrentPage%22:%20%7B%22message%22:%20%22%D0%97%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B8%D1%82%D0%B8%20%D1%84%D0%B0%D0%B9%D0%BB%D0%B8%20%D0%B7%20%D0%BF%D0%BE%D1%82%D0%BE%D1%87%D0%BD%D0%BE%D1%97%20%D1%81%D1%82%D0%BE%D1%80%D1%96%D0%BD%D0%BA%D0%B8%20%D0%B7%D0%B0%20%D0%B4%D0%BE%D0%BF%D0%BE%D0%BC%D0%BE%D0%B3%D0%BE%D1%8E%20%D1%81%D0%B5%D1%80%D0%B2%D1%96%D1%81%D1%83%20SaveFrom.net%22%7D,%0A%20%22menuUpdateLinks%22:%20%7B%22message%22:%20%22%D0%9D%D0%B0%D1%82%D0%B8%D1%81%D0%BD%D1%96%D1%82%D1%8C,%20%D1%8F%D0%BA%D1%89%D0%BE%20%D0%BF%D0%BE%D1%81%D0%B8%D0%BB%D0%B0%D0%BD%D0%BD%D1%8F%20%D0%B4%D0%BB%D1%8F%20%D1%81%D0%BA%D0%B0%D1%87%D1%83%D0%B2%D0%B0%D0%BD%D0%BD%D1%8F%20%D0%BD%D0%B5%20%D0%B7'%D1%8F%D0%B2%D0%BB%D1%8F%D1%94%D1%82%D1%8C%D1%81%D1%8F%22%7D,%0A%20%22menuDownloadMP3Files%22:%20%7B%22message%22:%20%22%D0%97%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B8%D1%82%D0%B8%20%D0%B2%D1%81%D1%96%20%D0%B7%D0%BD%D0%B0%D0%B9%D0%B4%D0%B5%D0%BD%D1%96%20%D0%BD%D0%B0%20%D1%81%D1%82%D0%BE%D1%80%D1%96%D0%BD%D1%86%D1%96%20%D0%B0%D1%83%D0%B4%D1%96%D0%BE%D1%84%D0%B0%D0%B9%D0%BB%D0%B8%22%7D,%0A%20%22menuDownloadPlaylist%22:%20%7B%22message%22:%20%22%D0%A4%D0%BE%D1%80%D0%BC%D1%83%D1%94%20%D1%82%D0%B0%20%D0%B7%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D1%83%D1%94%20%D0%BF%D0%BB%D0%B5%D0%B9%D0%BB%D0%B8%D1%81%D1%82%20%D0%B7%20%D0%BF%D0%BE%D1%81%D0%B8%D0%BB%D0%B0%D0%BD%D0%BD%D1%8F%D0%BC%D0%B8%20%D0%BD%D0%B0%20%D0%B0%D1%83%D0%B4%D1%96%D0%BE%D1%84%D0%B0%D0%B9%D0%BB%D0%B8%22%7D,%0A%20%22menuDownloadPhotos%22:%20%7B%22message%22:%20%22%D0%97%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B8%D1%82%D0%B8%20%D0%B2%D1%81%D1%96%20%D0%B7%D0%BD%D0%B0%D0%B9%D0%B4%D0%B5%D0%BD%D1%96%20%D0%BD%D0%B0%20%D1%81%D1%82%D0%BE%D1%80%D1%96%D0%BD%D1%86%D1%96%20%D1%84%D0%BE%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D1%96%D1%97%22%7D,%0A%20%22menuReportBug%22:%20%7B%22message%22:%20%22%D0%94%D0%B0%D0%B9%D1%82%D0%B5%20%D0%BD%D0%B0%D0%BC%20%D0%B7%D0%BD%D0%B0%D1%82%D0%B8,%20%D1%8F%D0%BA%D1%89%D0%BE%20%D0%B2%D0%B8%D0%BD%D0%B8%D0%BA%D0%BB%D0%B8%20%D0%BF%D1%80%D0%BE%D0%B1%D0%BB%D0%B5%D0%BC%D0%B8%22%7D,%0A%20%22menuShowOptions%22:%20%7B%22message%22:%20%22%D0%92%D0%BA%D0%BB.%20/%20%D0%92%D0%B8%D0%BC%D0%BA.%20%D0%BF%D1%96%D0%B4%D1%82%D1%80%D0%B8%D0%BC%D1%83%D0%B2%D0%B0%D0%BD%D1%96%20%D1%80%D0%B5%D1%81%D1%83%D1%80%D1%81%D0%B8%20%D1%96%20%D0%BC%D0%BE%D0%B6%D0%BB%D0%B8%D0%B2%D0%BE%D1%81%D1%82%D1%96%20%D0%BF%D0%BE%D0%BC%D1%96%D1%87%D0%BD%D0%B8%D0%BA%D0%B0%22%7D,%0A%20%22menuEnableExtension%22:%20%7B%22message%22:%20%22%22%7D,%0A%20%22menuOpenPoll%22:%20%7B%22message%22:%20%22%D0%91%D1%83%D0%B4%D1%8C%20%D0%BB%D0%B0%D1%81%D0%BA%D0%B0,%20%D0%BE%D1%86%D0%B5%D0%BD%D1%96%D1%82%D1%8C%20%D1%8F%D0%BA%D1%96%D1%81%D1%82%D1%8C%20%D1%80%D0%BE%D0%B7%D1%88%D0%B8%D1%80%D0%B5%D0%BD%D0%BD%D1%8F%20%5C%22SaveFrom.net%20%D0%BF%D0%BE%D0%BC%D1%96%D1%87%D0%BD%D0%B8%D0%BA%5C%22%22%7D,%0A%0A%20%22quality%22:%20%7B%22message%22:%20%22%D0%AF%D0%BA%D1%96%D1%81%D1%82%D1%8C%22%7D,%0A%20%22qualityNote%22:%20%7B%22message%22:%20%22%D0%AF%D0%BA%D1%89%D0%BE%20%D0%B2%D1%96%D0%B4%D0%B5%D0%BE%20%D0%B2%20%D0%BF%D0%BE%D1%82%D1%80%D1%96%D0%B1%D0%BD%D1%96%D0%B9%20%D1%8F%D0%BA%D0%BE%D1%81%D1%82%D1%96%20%D0%BD%D0%B5%D0%BC%D0%B0%D1%94,%20%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%94%D1%82%D1%8C%D1%81%D1%8F%20%D0%BD%D0%B0%D0%B9%D0%BA%D1%80%D0%B0%D1%89%D0%B5%20%D0%B7%20%D0%BC%D0%BE%D0%B6%D0%BB%D0%B8%D0%B2%D0%BE%D0%B3%D0%BE.%22%7D,%0A%20%22filelistTitle%22:%20%7B%22message%22:%20%22%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA%20%D0%B7%D0%BD%D0%B0%D0%B9%D0%B4%D0%B5%D0%BD%D0%B8%D1%85%20%D1%84%D0%B0%D0%B9%D0%BB%D1%96%D0%B2%22%7D,%0A%20%22filelistInstruction%22:%20%7B%22message%22:%20%22%5B'%D0%A9%D0%BE%D0%B1%20%D0%B7%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B8%D1%82%D0%B8%20%D1%83%D1%81%D1%96%20%D1%84%D0%B0%D0%B9%D0%BB%D0%B8,%20%D1%81%D0%BA%D0%BE%D0%BF%D1%96%D1%8E%D0%B9%D1%82%D0%B5%20%D1%81%D0%BF%D0%B8%D1%81%D0%BE%D0%BA%20%D0%BF%D0%BE%D1%81%D0%B8%D0%BB%D0%B0%D0%BD%D1%8C%20%D1%96%20%D0%B2%D1%81%D1%82%D0%B0%D0%B2%D1%82%D0%B5%20%D0%B9%D0%BE%D0%B3%D0%BE%20%D1%83%20',%7Ba:%7Bhref:'http://ru.wikipedia.org/wiki/%D0%9C%D0%B5%D0%BD%D0%B5%D0%B4%D0%B6%D0%B5%D1%80_%D0%B7%D0%B0%D0%B3%D1%80%D1%83%D0%B7%D0%BE%D0%BA',text:'%D0%BC%D0%B5%D0%BD%D0%B5%D0%B4%D0%B6%D0%B5%D1%80%20%D0%B7%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B5%D0%BD%D1%8C'%7D%7D,'.%20%D0%AF%D0%BA%D1%89%D0%BE%20%D1%83%20%D0%B2%D0%B0%D1%81%20%D0%BD%D0%B5%20%D0%B2%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B9%20%D0%BC%D0%B5%D0%BD%D0%B5%D0%B4%D0%B6%D0%B5%D1%80%20%D0%B7%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B5%D0%BD%D1%8C,%20%D1%80%D0%B5%D0%BA%D0%BE%D0%BC%D0%B5%D0%BD%D0%B4%D1%83%D1%94%D0%BC%D0%BE%20%D0%B2%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%B8%D1%82%D0%B8%20',%7Ba:%7Bhref:'http://www.westbyte.com/dm/',text:'Download%20Master'%7D%7D,'.'%5D%22%7D,%0A%20%22playlistTitle%22:%20%7B%22message%22:%20%22%D0%9F%D0%BB%D0%B5%D0%B9%D0%BB%D1%96%D1%81%D1%82%22%7D,%0A%20%22playlistInstruction%22:%20%7B%22message%22:%20%22%D0%97%D0%B1%D0%B5%D1%80%D0%B5%D0%B6%D0%B5%D0%BD%D0%B8%D0%B9%20%D0%BF%D0%BB%D0%B5%D0%B9%D0%BB%D1%96%D1%81%D1%82%20%D0%BC%D0%BE%D0%B6%D0%BD%D0%B0%20%D0%B2%D1%96%D0%B4%D0%BA%D1%80%D0%B8%D1%82%D0%B8%20%D1%83%20%D0%BF%D0%BB%D0%B5%D1%94%D1%80%D1%96%20%D0%B4%D0%BB%D1%8F%20%D0%B2%D1%96%D0%B4%D1%82%D0%B2%D0%BE%D1%80%D0%B5%D0%BD%D0%BD%D1%8F.%22%7D,%0A%0A%20%22ummySfTitle%22:%20%7B%22message%22:%20%22HD%20%D0%B0%D0%B1%D0%BE%20MP3%22%7D,%0A%20%22ummyMenuItem%22:%20%7B%22message%22%20:%20%22%5B%7Bspan:%7B%7D%7D,'%20%D0%B7%20%D0%B4%D0%BE%D0%BC%D0%BE%D0%BC%D0%BE%D0%B3%D0%BE%D1%8E%20Ummy'%5D%22%7D,%0A%20%22ummyMenuInfo%22:%20%7B%22message%22:%20%22%5B%7Bp:%7Btext:'%D0%92%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D1%96%D1%82%D1%8C%20%D0%B1%D0%B5%D0%B7%D0%BA%D0%BE%D1%88%D1%82%D0%BE%D0%B2%D0%BD%D0%B8%D0%B9%20Ummy%20Video%20Downloader%20%D1%96%20%D0%B7%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D1%83%D0%B9%D1%82%D0%B5%20%D1%81%D0%B2%D0%BE%D1%97%20%D1%83%D0%BB%D1%8E%D0%B1%D0%BB%D0%B5%D0%BD%D1%96%20%D0%B2%D1%96%D0%B4%D0%B5%D0%BE%20%D0%B2%20HD%20%D0%B0%D0%B1%D0%BE%20%D0%B2%20MP3.'%7D%7D,%7Bp:%7Bclass:'center',append:%5B%7Ba:%7Bclass:'green-btn-2%20arrow',href:'%7Burl%7D',target:'_blank',text:'%D0%A1%D0%9A%D0%90%D0%A7%D0%90%D0%A2%D0%98'%7D%7D%5D%7D%7D,%7Bp:%7Bappend:%5B'%D0%9F%D1%96%D1%81%D0%BB%D1%8F%20%D0%B2%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%BD%D1%8F%20%D0%BF%D1%80%D0%B8%20%D0%BA%D0%BB%D1%96%D1%86%D1%96%20%D0%BD%D0%B0%20',%7Bimg:%7Bsrc:'#'%7D%7D,'%20%D0%B7%D0%B0%D0%BA%D0%B0%D1%87%D0%BA%D0%B0%20%D0%B1%D1%83%D0%B4%D0%B5%20%D0%BF%D0%BE%D1%87%D0%B8%D0%BD%D0%B0%D1%82%D0%B8%D1%81%D1%8F%20%D0%B0%D0%B2%D1%82%D0%BE%D0%BC%D0%B0%D1%82%D0%B8%D1%87%D0%BD%D0%BE.'%5D%7D%7D%5D%22%7D,%0A%20%22warningPopupTitle%22:%20%7B%22message%22:%20%22%D0%9F%D0%B5%D1%80%D0%B5%D0%B2%D1%96%D1%80%D1%82%D0%B5%20%D0%BD%D0%B0%D0%BB%D0%B0%D1%88%D1%82%D1%83%D0%B2%D0%B0%D0%BD%D0%BD%D1%8F%20%D0%B1%D1%80%D0%B0%D1%83%D0%B7%D0%B5%D1%80%D0%B0%22%7D,%0A%20%22warningPopupDesc%22:%20%7B%22message%22:%20%22%D0%92%D0%B8%D0%B1%D1%96%D1%80%20%D0%BF%D0%B0%D0%BF%D0%BA%D0%B8%20%D0%BF%D1%80%D0%B8%20%D1%81%D0%BA%D0%B0%D1%87%D1%83%D0%B2%D0%B0%D0%BD%D0%BD%D1%96%20%D0%BF%D0%BE%D0%B2%D0%B8%D0%BD%D0%B5%D0%BD%20%D0%B1%D1%83%D1%82%D0%B8%20%D0%B2%D1%96%D0%B4%D0%BA%D0%BB%D1%8E%D1%87%D0%B5%D0%BD%D0%B8%D0%B9.%22%7D,%0A%20%22readMore%22:%20%7B%22message%22:%20%22%D0%94%D0%B5%D1%82%D0%B0%D0%BB%D1%8C%D0%BD%D1%96%D1%88%D0%B5...%22%7D,%0A%20%22noWarning%22:%20%7B%22message%22:%20%22%D0%9D%D0%B5%20%D0%BF%D0%BE%D0%BF%D0%B5%D1%80%D0%B5%D0%B4%D0%B6%D0%B0%D1%82%D0%B8%22%7D,%0A%20%22cancel%22:%20%7B%22message%22:%20%22%D0%A1%D0%BA%D0%B0%D1%81%D1%83%D0%B2%D0%B0%D0%BD%D0%BD%D1%8F%22%7D,%0A%20%22continue%22:%20%7B%22message%22:%20%22%D0%9F%D1%80%D0%BE%D0%B4%D0%BE%D0%B2%D0%B6%D0%B8%D1%82%D0%B8%22%7D,%0A%20%22beforeDownloadPopupWarn%22:%20%7B%22message%22:%20%22%D0%A3%D0%B2%D0%B0%D0%B3%D0%B0:%20%D1%81%D0%BA%D0%B0%D1%81%D1%83%D0%B2%D0%B0%D1%82%D0%B8%20%D0%B0%D0%B1%D0%BE%20%D0%BF%D1%80%D0%B8%D0%B7%D1%83%D0%BF%D0%B8%D0%BD%D0%B8%D1%82%D0%B8%20%D0%B7%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B5%D0%BD%D0%BD%D1%8F%20%D0%B1%D1%83%D0%B4%D0%B5%20%D0%BD%D0%B5%D0%BC%D0%BE%D0%B6%D0%BB%D0%B8%D0%B2%D0%BE.%22%7D,%0A%0A%20%22vkInfo%22:%20%7B%22message%22:%20%22%D0%9F%D0%B0%D1%80%D0%B0%D0%BC%D0%B5%D1%82%D1%80%D0%B8%22%7D,%0A%20%22vkInfoTitle%22:%20%7B%22message%22:%20%22%D0%A0%D0%BE%D0%B7%D0%BC%D1%96%D1%80%20%D1%84%D0%B0%D0%B9%D0%BB%D1%83%20%D1%96%20%D0%B1%D1%96%D1%82%D1%80%D0%B5%D0%B9%D1%82%22%7D,%0A%20%22vkMp3LinksNotFound%22:%20%7B%22message%22:%20%22%D0%9D%D0%B5%20%D0%B7%D0%BD%D0%B0%D0%B9%D0%B4%D0%B5%D0%BD%D0%BE%20%D0%BF%D0%BE%D1%81%D0%B8%D0%BB%D0%B0%D0%BD%D1%8C%20%D0%BD%D0%B0%20MP3-%D1%84%D0%B0%D0%B9%D0%BB%D0%B8%22%7D,%0A%20%22vkPhotoLinksNotFound%22:%20%7B%22message%22:%20%22%D0%9D%D0%B5%20%D0%B7%D0%BD%D0%B0%D0%B9%D0%B4%D0%B5%D0%BD%D0%BE%20%D0%BF%D0%BE%D1%81%D0%B8%D0%BB%D0%B0%D0%BD%D1%8C%20%D0%BD%D0%B0%20%D1%84%D0%BE%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D1%96%D1%97%22%7D,%0A%20%22vkDownloadPhotoAlbum%22:%20%7B%22message%22:%20%22%D0%97%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B8%D1%82%D0%B8%20%D0%B0%D0%BB%D1%8C%D0%B1%D0%BE%D0%BC%22%7D,%0A%20%22vkDownloadAllPhotoAlbums%22:%20%7B%22message%22:%20%22%D0%97%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B8%D1%82%D0%B8%20%D1%83%D1%81%D1%96%20%D0%B0%D0%BB%D1%8C%D0%B1%D0%BE%D0%BC%D0%B8%22%7D,%0A%20%22vkFoundPhotos%22:%20%7B%22message%22:%20%22%D0%97%D0%BD%D0%B0%D0%B9%D0%B4%D0%B5%D0%BD%D0%BE%20%D1%84%D0%BE%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D1%96%D0%B9%22%7D,%0A%20%22vkNotAvailablePhotos%22:%20%7B%22message%22:%20%22%25d%20%D1%84%D0%BE%D1%82%D0%BE%20%D1%82%D0%B8%D0%BC%D1%87%D0%B0%D1%81%D0%BE%D0%B2%D0%BE%20%D0%BD%D0%B5%D0%B4%D0%BE%D1%81%D1%82%D1%83%D0%BF%D0%BD%D0%BE%22%7D,%0A%20%22vkFoundLinks%22:%20%7B%22message%22:%20%22%D0%97%D0%BD%D0%B0%D0%B9%D0%B4%D0%B5%D0%BD%D0%BE%20%D0%BF%D0%BE%D1%81%D0%B8%D0%BB%D0%B0%D0%BD%D1%8C%22%7D,%0A%20%22vkFoundOf%22:%20%7B%22message%22:%20%22%D0%B7%22%7D,%0A%20%22vkShowAs%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D0%BA%D0%B0%D0%B7%D0%B0%D1%82%D0%B8%20%D1%8F%D0%BA%22%7D,%0A%20%22vkListOfLinks%22:%20%7B%22message%22:%20%22%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA%20%D0%BF%D0%BE%D1%81%D0%B8%D0%BB%D0%B0%D0%BD%D1%8C%22%7D,%0A%20%22vkListOfLinksInstruction%22:%20%7B%22message%22:%20%22%5B'%D0%A9%D0%BE%D0%B1%20%D0%B7%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B8%D1%82%D0%B8%20%D1%83%D1%81%D1%96%20%D1%84%D0%BE%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D1%96%D1%97,%20%D1%81%D0%BA%D0%BE%D0%BF%D1%96%D1%8E%D0%B9%D1%82%D0%B5%20%D1%81%D0%BF%D0%B8%D1%81%D0%BE%D0%BA%20%D0%BF%D0%BE%D1%81%D0%B8%D0%BB%D0%B0%D0%BD%D1%8C%20%D1%96%20%D0%B2%D1%81%D1%82%D0%B0%D0%B2%D1%82%D0%B5%20%D0%B9%D0%BE%D0%B3%D0%BE%20%D1%83%20',%7Ba:%7Bhref:'http://ru.wikipedia.org/wiki/%D0%9C%D0%B5%D0%BD%D0%B5%D0%B4%D0%B6%D0%B5%D1%80_%D0%B7%D0%B0%D0%B3%D1%80%D1%83%D0%B7%D0%BE%D0%BA',text:'%D0%BC%D0%B5%D0%BD%D0%B5%D0%B4%D0%B6%D0%B5%D1%80%20%D0%B7%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B5%D0%BD%D1%8C'%7D%7D,'.%20%D0%AF%D0%BA%D1%89%D0%BE%20%D1%83%20%D0%B2%D0%B0%D1%81%20%D0%BD%D0%B5%20%D0%B2%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B9%20%D0%BC%D0%B5%D0%BD%D0%B5%D0%B4%D0%B6%D0%B5%D1%80%20%D0%B7%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B5%D0%BD%D1%8C,%20%D1%80%D0%B5%D0%BA%D0%BE%D0%BC%D0%B5%D0%BD%D0%B4%D1%83%D1%94%D0%BC%D0%BE%20%D0%B2%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%B8%D1%82%D0%B8%20',%7Ba:%7Bhref:'http://www.westbyte.com/dm/',text:'Download%20Master'%7D%7D,'.'%5D%22%7D,%0A%20%22vkTableOfThumbnails%22:%20%7B%22message%22:%20%22%D0%A2%D0%B0%D0%B1%D0%BB%D0%B8%D1%86%D1%8E%20%D0%B5%D1%81%D0%BA%D1%96%D0%B7%D1%96%D0%B2%22%7D,%0A%20%22vkListOfPhotos%22:%20%7B%22message%22:%20%22%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA%20%D1%84%D0%BE%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D1%96%D0%B9%22%7D,%0A%20%22vkListOfPhotosInstruction%22:%20%7B%22message%22:%20%22%D0%A9%D0%BE%D0%B1%20%D0%B7%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B8%D1%82%D0%B8%20%D1%84%D0%BE%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D1%96%D1%8E,%20%D0%BD%D0%B0%D1%82%D0%B8%D1%81%D0%BD%D1%96%D1%82%D1%8C%20%D0%BD%D0%B0%20%D0%BD%D0%B5%D1%97%20%D0%BB%D1%96%D0%B2%D0%BE%D1%8E%20%D0%BA%D0%BD%D0%BE%D0%BF%D0%BA%D0%BE%D1%8E%20%D0%BC%D0%B8%D1%88%D1%96.%22%7D,%0A%20%22vkKbps%22:%20%7B%22message%22:%20%22%D0%BA%D0%B1/%D1%81%22%7D,%0A%20%22vkFileSizeByte%22:%20%7B%22message%22:%20%22%D0%91%22%7D,%0A%20%22vkFileSizeKByte%22:%20%7B%22message%22:%20%22%D0%BA%D0%91%22%7D,%0A%20%22vkFileSizeMByte%22:%20%7B%22message%22:%20%22%D0%9C%D0%91%22%7D,%0A%20%22vkFileSizeGByte%22:%20%7B%22message%22:%20%22%D0%93%D0%91%22%7D,%0A%20%22vkFileSizeTByte%22:%20%7B%22message%22:%20%22%D0%A2%D0%91%22%7D,%0A%20%22vkDownloadFromYoutube%22:%20%7B%22message%22:%20%22%5B'%D0%97%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B8%D1%82%D0%B8:%20%D0%B2%D1%96%D0%B4%D0%BA%D1%80%D0%B8%D0%B9%D1%82%D0%B5%20',%7Ba:%7Bhref:'%7Burl%7D',text:'%D1%81%D1%82%D0%BE%D1%80%D1%96%D0%BD%D0%BA%D1%83%20%D0%B2%D1%96%D0%B4%D0%B5%D0%BE-%D1%80%D0%BE%D0%BB%D0%B8%D0%BA%D0%B0'%7D%7D,'%20%D1%96%20%D0%BD%D0%B0%D1%82%D0%B8%D1%81%D0%BD%D1%96%D1%82%D1%8C%20%D0%BA%D0%BD%D0%BE%D0%BF%D0%BA%D1%83%20%5C%22%D0%97%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B8%D1%82%D0%B8%5C%22%20%D0%BD%D0%B0%D0%B4%20%D0%BF%D0%BB%D0%B5%D1%94%D1%80%D0%BE%D0%BC'%5D%22%7D,%0A%20%22vkFoundFiles%22:%20%7B%22message%22:%20%22%D0%97%D0%BD%D0%B0%D0%B9%D0%B4%D0%B5%D0%BD%D0%BE%20%D1%84%D0%B0%D0%B9%D0%BB%D1%96%D0%B2:%20%25d%22%7D,%0A%0A%20%22shareIn%22:%20%7B%22message%22:%20%22%D0%9F%D0%BE%D0%B4%D1%96%D0%BB%D0%B8%D1%82%D0%B8%D1%81%D1%8F%20%D0%B2%20%25w%22%7D,%0A%20%22socialDesc%22:%20%7B%22message%22:%20%22SaveFrom.net%20%D0%BF%D0%BE%D0%BC%D1%96%D1%87%D0%BD%D0%B8%D0%BA%20%D0%B4%D0%B0%D1%94%20%D0%B2%D0%B0%D0%BC%20%D0%BC%D0%BE%D0%B6%D0%BB%D0%B8%D0%B2%D1%96%D1%81%D1%82%D1%8C%20%D0%B1%D0%B5%D0%B7%D0%BA%D0%BE%D1%88%D1%82%D0%BE%D0%B2%D0%BD%D0%BE%20%D0%B7%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D1%83%D0%B2%D0%B0%D1%82%D0%B8%20%D1%84%D0%B0%D0%B9%D0%BB%D0%B8%20%D0%B7%20YouTube.com,%20Facebook.com,%20VK.com%20%D1%82%D0%B0%20%D0%B1%D1%96%D0%BB%D1%8C%D1%88%D0%B5%2040%20%D1%96%D0%BD%D1%88%D0%B8%D1%85%20%D1%81%D0%B0%D0%B9%D1%82%D1%96%D0%B2%20%D0%BB%D0%B8%D1%88%D0%B5%20%D0%BE%D0%B4%D0%BD%D0%B8%D0%BC%20%D0%BA%D0%BB%D1%96%D0%BA%D0%BE%D0%BC%22%7D,%0A%0A%20%22tutorialS1Title%22:%20%7B%22message%22:%20%22%D0%94%D0%BE%D0%B1%D1%80%D1%96%20%D0%BD%D0%BE%D0%B2%D0%B8%D0%BD%D0%B8!%22%7D,%0A%20%22tutorialS1Main%22:%20%7B%22message%22:%20%22%5B'%D0%A3%20%D1%82%D0%B5%D0%B1%D0%B5%20%D0%B2%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B9%20SaveFrom.net%20%D0%BF%D0%BE%D0%BC%D1%96%D1%87%D0%BD%D0%B8%D0%BA%20',%7Bimg:%20%7Bsrc:%20'#logo'%7D%7D,%20',%20%D1%96%20%D1%82%D0%B5%D0%BF%D0%B5%D1%80%20%D1%82%D0%B8%20%D0%BC%D0%BE%D0%B6%D0%B5%D1%88%20%D0%B7%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B8%D1%82%D0%B8%20%D0%B1%D1%83%D0%B4%D1%8C-%D1%8F%D0%BA%D0%B5%20%D0%B2%D1%96%D0%B4%D0%B5%D0%BE%20%D0%B7%20YouTube%20%D0%B2%20%D0%BE%D0%B4%D0%B8%D0%BD%20%D0%BA%D0%BB%D1%96%D0%BA'%5D%22%7D,%0A%20%22tutorialS1Arrow%22:%20%7B%22message%22:%20%22%5B'%D0%9F%D1%80%D0%B0%D0%B3%D0%BD%D0%B5%D1%88%20%D0%B4%D0%BE%D0%B2%D1%96%D0%B4%D0%B0%D1%82%D0%B8%D1%81%D1%8F%20%D1%8F%D0%BA?',%20%7Bbr:%7B%7D%7D,%20'%D0%9D%D0%B0%D1%82%D0%B8%D1%81%D0%BD%D0%B8%20%D1%82%D1%83%D1%82'%5D%22%7D,%0A%20%22tutorialS2Main%22:%20%7B%22message%22:%20%22%D0%A9%D0%BE%D0%B1%20%D0%B7%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B8%D1%82%D0%B8%20%D0%B2%D1%96%D0%B4%D0%B5%D0%BE,%20%D0%BE%D0%B1%D0%B5%D1%80%D1%96%D1%82%D1%8C%20%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%82%20%D1%96%20%D0%BD%D0%B0%D1%82%D0%B8%D1%81%D0%BD%D0%B8%20%D0%BA%D0%BD%D0%BE%D0%BF%D0%BA%D1%83%20%5C%22%D0%97%D0%B0%D0%B2%D0%B0%D0%BD%D1%82%D0%B0%D0%B6%D0%B8%D1%82%D0%B8%5C%22%22%7D,%0A%20%22tutorialS3History%22:%20%7B%22message%22:%20%22%D0%9F%D0%B5%D1%80%D0%B5%D0%B3%D0%BB%D1%8F%D0%BD%D1%83%D1%82%D1%96%22%7D,%0A%20%22tutorialS3Main%22:%20%7B%22message%22:%20%22%5B'%D0%A5%D0%BE%D1%87%D0%B5%D1%88%20%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D0%B8%20%D0%B2%D0%B6%D0%B5%20%D0%BF%D0%B5%D1%80%D0%B5%D0%B3%D0%BB%D1%8F%D0%BD%D1%83%D1%82%D0%B5%20%D0%B2%D1%96%D0%B4%D0%B5%D0%BE?',%20%7Bbr:%7B%7D%7D,%20'%D0%9D%D0%B0%D1%82%D0%B8%D1%81%D0%BA%D0%B0%D0%B9%20%D0%BD%D0%B0%20',%20%7Bimg:%20%7Bsrc:%20'#arrow'%7D%7D,%20'%20%D0%BD%D0%B0%20%D0%BF%D1%80%D0%B5%D0%B2%D1%8C%D1%8E%20%D0%B2%20%D0%BF%D0%B5%D1%80%D0%B5%D0%B3%D0%BB%D1%8F%D0%BD%D1%83%D1%82%D0%B8%D1%85%20%D0%B2%D1%96%D0%B4%D0%B5%D0%BE'%5D%22%7D,%0A%20%22tutorialS4Main%22:%20%7B%22message%22:%20%22%5B'%D0%92%D1%96%D0%B4%D0%B5%D0%BE%20%D0%BD%D0%B5%20%D0%BE%D0%B1%D0%BE%D0%B2%5C%5C'%D1%8F%D0%B7%D0%BA%D0%BE%D0%B2%D0%BE%20%D0%BF%D0%B5%D1%80%D0%B5%D0%B3%D0%BB%D1%8F%D0%B4%D0%B0%D1%82%D0%B8%20%E2%80%94',%20%7Bbr:%7B%7D%7D,%20'%D0%BD%D0%B0%D1%82%D0%B8%D1%81%D0%BA%D0%B0%D0%B9%20%D0%BD%D0%B0%20',%20%7Bimg:%20%7Bsrc:%20'#arrow'%7D%7D,%20',%20%D0%BE%D0%B1%D0%B8%D1%80%D0%B0%D0%B9%20%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%82%20%D1%96%20%D1%81%D0%BA%D0%B0%D1%87%D1%83%D0%B9.%20%D0%A6%D0%B5%20%D0%B7%D1%80%D1%83%D1%87%D0%BD%D0%BE!'%5D%22%7D,%0A%20%22tutorialS5Title%22:%20%7B%22message%22:%20%22%D0%9F%D1%80%D0%B8%D1%94%D0%BC%D0%BD%D0%BE%D1%97%20%D1%80%D0%BE%D0%B1%D0%BE%D1%82%D0%B8!%22%7D,%0A%20%22tutorialS5Main%22:%20%7B%22message%22:%20%22%5B'%D0%97%D0%B0%D0%BB%D0%B8%D1%88%D0%B8%D0%BB%D0%B8%D1%81%D1%8F%20%D0%BF%D0%B8%D1%82%D0%B0%D0%BD%D0%BD%D1%8F?%20%D0%84%20%D0%BF%D1%80%D0%BE%D0%BF%D0%BE%D0%B7%D0%B8%D1%86%D1%96%D1%97?%20%D0%97%D0%B0%D0%B3%D0%BB%D1%8F%D0%BD%D1%8C%D1%82%D0%B5%20%D0%BD%D0%B0%20',%7Ba:%20%7Btext:%20'%D1%81%D1%82%D0%BE%D1%80%D1%96%D0%BD%D0%BA%D1%83%20%D0%BF%D1%96%D0%B4%D1%82%D1%80%D0%B8%D0%BC%D0%BA%D0%B8',%20href:%20'#support'%7D%7D,'%20%D0%B0%D0%B1%D0%BE%20%D0%B2%D1%81%D1%82%D1%83%D0%BF%D0%B0%D0%B9%D1%82%D0%B5%20%D0%B2%20%D0%BD%D0%B0%D1%88%20',%20%7Ba:%20%7Btext:%20'%D0%92%D0%9A-%D1%81%D0%BE%D0%B1%D1%89%D0%B5%D1%81%D1%82%D0%B2%D0%BE',%20href:%20'#vk'%7D%7D%5D%22%7D,%0A%0A%20%22tutorialTooltipText%22:%20%7B%22message%22:%20%22%5B'%D0%A9%D0%BE%D0%B1%20',%7Bb:%20%7Btext:%20'%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D0%B8'%7D%7D,',%20%D0%BF%D1%80%D0%BE%D1%81%D1%82%D0%BE%20%D0%BA%D0%BB%D1%96%D0%BA%D0%BD%D1%96%D1%82%D1%8C%20%D0%BF%D0%BE%20%D0%BA%D0%BD%D0%BE%D0%BF%D1%86%D1%96'%5D%22%7D,%0A%0A%20%22ummyTooltipConfirm%22:%20%7B%22message%22:%20%22%5B'%D0%92%D0%B8%20%D0%B2%D0%B6%D0%B5%20%D0%B2%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%B8%D0%BB%D0%B8',%7Bbr:%7B%7D%7D,%7Bimg:%7B%7D%7D,'%20Ummy%20Video%20Downloader?'%5D%22%7D,%0A%20%22yes%22:%20%7B%22message%22:%20%22%D0%A2%D0%B0%D0%BA%22%7D,%0A%20%22no%22:%20%7B%22message%22:%20%22%D0%9D%D1%96%22%7D,%0A%20%22tooltipHide%22:%20%7B%22message%22:%20%22%D0%91%D1%96%D0%BB%D1%8C%D1%88%D0%B5%20%D0%BD%D0%B5%20%D0%BF%D0%BE%D0%BA%D0%B0%D0%B7%D1%83%D0%B2%D0%B0%D1%82%D0%B8%20%D1%86%D0%B5%20%D0%BF%D0%BE%D0%B2%D1%96%D0%B4%D0%BE%D0%BC%D0%BB%D0%B5%D0%BD%D0%BD%D1%8F%22%7D%0A%7D";

/**
 *
 * Created by Anton on 21.06.2014.
 *
 * Mono cross-browser engine.
 *
 **/

var mono = (typeof mono !== 'undefined') ? mono : undefined;

(function(window, base, factory) {
  "use strict";
  if (mono && mono.isLoaded) {
    return;
  }

  if (typeof window !== "undefined") {
    return mono = base(factory.bind(null, null, factory), mono);
  }

}(
typeof window !== "undefined" ? window : undefined,
function base(factory, _mono) {
  if (['interactive', 'complete'].indexOf(document.readyState) !== -1) {
    return factory(null, _mono);
  }

  if (typeof GM_getValue !== 'undefined') {
    return factory(null, _mono);
  }

  var objCreate = function(o) {
    if (typeof Object.create === 'function') {
      return Object.create(o);
    }
    var a = function(){};a.prototype = o;return new a();
  };

  var base = objCreate({
    isLoaded: true,
    onReadyStack: [],
    onReady: function() {
      base.onReadyStack.push([this, arguments]);
    },
    loadModuleStack: [],
    loadModule: function() {
      base.loadModuleStack.push([this, arguments]);
    }
  });

  var onLoad = function() {
    document.removeEventListener('DOMContentLoaded', onLoad, false);
    window.removeEventListener('load', onLoad, false);

    mono = factory(null, _mono);

    for (var key in base) {
      if (base.hasOwnProperty(key)) {
        mono[key] = base[key];
      }
    }

    var item;
    while (item = base.onReadyStack.shift()) {
      mono.onReady.apply(item[0], item[1]);
    }

    while (item = base.loadModuleStack.shift()) {
      mono.loadModule.apply(item[0], item[1]);
    }
  };

  document.addEventListener('DOMContentLoaded', onLoad, false);
  window.addEventListener('load', onLoad, false);

  return base;
},
function initMono(_addon, _mono) {
  var require;

  /*@if isVkOnly=0>*/
  var checkCompatibility = function() {
    if (typeof navigator === 'undfiend') {
      return;
    }
    var userAgent = navigator.userAgent;
    var version;
    if (mono.isTM || mono.isChrome || mono.isVM) {
      version = userAgent.match(/Chrome\/(\d+)/i);
      version = version && parseInt(version[1]);

      if (isNaN(version)) {
        return;
      }

      mono.isChromeVersion = version;
      if (version < 31) {
        mono.noMouseEnter = true;
        mono.noXhrJson = true;
      }
    } else
    if (mono.isSafari) {
      version = userAgent.match(/Version\/(\d+).+Safari/i);
      version = version && parseInt(version[1]);

      if (isNaN(version)) {
        return;
      }

      mono.isSafariVersion = version;
      if (version < 7) {
        mono.noMouseEnter = true;
        mono.noXhrJson = true;
        mono.badXhrHeadRedirect = true;
      }
    }
  };
  /*@if isVkOnly=0<*/

  var mono = {
    isLoaded: true,
    emptyFunc: function() {},
    msgType: undefined,
    storageType: undefined,
    msgList: {},
    storageList: {},
    onReady: function(cb) {
      cb();
    }
  };

  (function browserDefine() {

      mono.isGM = true;
      mono.msgType = 'gm';
      if (window.chrome !== undefined) {
        mono.isTM = true;
        checkCompatibility();
      } else if (navigator.userAgent.indexOf('Maxthon/') !== -1) {
        mono.isVM = true;
        checkCompatibility();
      } else {
        mono.isGmOnly = true;
      }
      return;

  })();

  mono.cloneObj = function(obj) {
    return JSON.parse(JSON.stringify(obj));
  };

  var msgTools = {
    cbObj: {},
    cbStack: [],
    id: 0,
    idPrefix: Math.floor(Math.random() * 1000) + '_',
    aliveTime: 120 * 1000,
    addCb: function(message, cb) {
      mono.onMessage.count === 0 && mono.onMessage(mono.emptyFunc);

      if (this.cbStack.length > mono.messageStack) {
        this.clean();
      }
      var id = message.callbackId = this.idPrefix + (++this.id);
      this.cbObj[id] = {
        fn: cb,
        time: Date.now()
      };
      this.cbStack.push(id);
    },
    callCb: function(message) {
      var cb = this.cbObj[message.responseId];
      if (cb === undefined) return;
      delete this.cbObj[message.responseId];
      this.cbStack.splice(this.cbStack.indexOf(message.responseId), 1);
      cb.fn(message.data);
    },
    mkResponse: function(response, callbackId, responseMessage) {
      responseMessage = {
        data: responseMessage,
        responseId: callbackId
      };
      response(responseMessage);
    },
    clearCbStack: function() {
      for (var item in this.cbObj) {
        delete this.cbObj[item];
      }
      this.cbStack.splice(0);
    },
    removeCb: function(cbId) {
      var cb = this.cbObj[cbId];
      if (cb === undefined) return;
      delete this.cbObj[cbId];
      this.cbStack.splice(this.cbStack.indexOf(cbId), 1);
    },
    clean: function(aliveTime) {
      var now = Date.now();
      aliveTime = aliveTime || this.aliveTime;
      for (var item in this.cbObj) {
        if (this.cbObj[item].time + aliveTime < now) {
          delete this.cbObj[item];
          this.cbStack.splice(this.cbStack.indexOf(item), 1);
        }
      }
    }
  };

  mono.messageStack = 50;
  mono.msgClearStack = msgTools.clearCbStack.bind(msgTools);
  mono.msgRemoveCbById = msgTools.removeCb.bind(msgTools);
  mono.msgClean = msgTools.clean.bind(msgTools);

  mono.sendMessage = function(message, cb, hook) {
    message = {
      data: message,
      hook: hook
    };
    if (cb) {
      msgTools.addCb(message, cb.bind(this));
    }
    mono.sendMessage.send.call(this, message);

    return message.callbackId;
  };

  mono.sendMessageToActiveTab = function(message, cb, hook) {
    message = {
      data: message,
      hook: hook
    };
    if (cb) {
      msgTools.addCb(message, cb.bind(this));
    }
    mono.sendMessage.sendToActiveTab.call(this, message);

    return message.callbackId;
  };

  mono.sendHook = {};

  mono.onMessage = function(cb) {
    var index = mono.onMessage.count++;
    var func = mono.onMessage.wrapFunc.bind(this, cb, index);
    cb.monoCbId = index;
    mono.onMessage.on.call(this, mono.onMessage.wrapper[index] = func);
  };
  mono.onMessage.count = 0;
  mono.onMessage.wrapper = {};
  mono.onMessage.wrapFunc = function(cb, index, message, response) {
    if (message.responseId !== undefined) {
      return msgTools.callCb(message);
    }
    if (message.data === undefined) {
      return;
    }
    var mResponse;
    if (message.callbackId === undefined) {
      mResponse = mono.emptyFunc;
    } else {
      mResponse = msgTools.mkResponse.bind(msgTools, response.bind(this), message.callbackId);
    }
    if (message.hook !== undefined) {
      if (index !== 0) {
        return;
      }
      var hookFunc = mono.sendHook[message.hook];
      if (hookFunc !== undefined) {
        return hookFunc(message.data, mResponse);
      }
    }
    cb.call(this, message.data, mResponse);
  };

  mono.offMessage = function(cb) {
    var func = mono.onMessage.wrapper[cb.monoCbId];
    if (func === undefined) {
      return;
    }
    delete mono.onMessage.wrapper[cb.monoCbId];
    delete cb.monoCbId;
    mono.onMessage.off(func);
  };

  mono.msgList.gm = function() {
    var gmMsg = {
      cbList: [],
      onMessage: function(_message) {
        var message = mono.cloneObj(_message);
        var response = gmMsg.onMessage;
        for (var i = 0, cb; cb = gmMsg.cbList[i]; i++) {
          if (this.isBg === cb.isBg) {
            continue;
          }
          cb(message, response.bind({
            isBg: cb.isBg
          }));
        }
      },
      on: function(cb) {
        cb.isBg = this.isBg;
        gmMsg.cbList.push(cb);
      },
      off: function(cb) {
        var cbList = gmMsg.cbList;
        var pos = cbList.indexOf(cb);
        if (pos === -1) {
          return;
        }
        cbList.splice(pos, 1);
      }
    };
    gmMsg.send = gmMsg.onMessage;

    mono.onMessage.on = gmMsg.on;
    mono.onMessage.off = gmMsg.off;
    mono.sendMessage.send = gmMsg.send;
    mono.sendMessage.sendToActiveTab = gmMsg.onMessage.bind({
      isBg: true
    });
  };

  var initFunc = mono.msgList[mono.msgType];
  if (initFunc !== undefined) {
    initFunc();
  } else {
    console.error('Msg transport is not defined!');
  }
  initFunc = undefined;
  mono.msgList = undefined;

  (function storageDefine() {

    if (mono.isGM) {
      mono.storageType = 'gm';
      return;
    }

  })();

  mono.storageList.gm = function() {
    var storage = {
      get: function(src, cb) {
        var key, value, obj = {},
          i, len;
        if (src === undefined || src === null) {
          src = GM_listValues();
        }
        if (Array.isArray(src) === false) {
          src = [src];
        }
        for (i = 0, len = src.length; i < len; i++) {
          key = src[i];
          value = GM_getValue(key, 'isMonoEmptyValue');
          //todo: rm null and 'undefined'
          if (value !== undefined && value !== null && value !== 'undefined' && value !== 'isMonoEmptyValue') {
            if (typeof value !== 'object') {
              obj[key] = value;
            } else {
              obj[key] = JSON.parse(JSON.stringify(value));
            }
          }
        }
        cb(obj);
      },
      set: function(obj, cb) {
        var value;
        for (var key in obj) {
          value = obj[key];
          if (typeof value !== 'object') {
            if (value === undefined) {
              storage.remove([key]);
            } else {
              GM_setValue(key, value);
            }
          } else {
            GM_setValue(key, JSON.parse(JSON.stringify(value)));
          }
        }
        cb && cb();
      },
      remove: function(arr, cb) {
        if (Array.isArray(arr) === false) {
          arr = [arr];
        }
        for (var i = 0, len = arr.length; i < len; i++) {
          var key = arr[i];
          if (storage.hasDeleteValue) {
            GM_deleteValue(key);
          } else {
            GM_setValue(key, 'isMonoEmptyValue');
          }
        }
        cb && cb();
      },
      clear: function(cb) {
        storage.remove(GM_listValues());
        cb && cb();
      }
    };
    storage.hasDeleteValue = typeof GM_deleteValue !== 'undefined';

    mono.storage = storage;
    mono.storage.local = mono.storage.sync = mono.storage;
  };

  initFunc = mono.storageList[mono.storageType];
  if (initFunc !== undefined) {
    initFunc();
  } else {
    console.error('Storage is not defined!');
  }
  initFunc = undefined;
  mono.storageList = undefined;

  //> utils
  if (mono.isChrome) {
    mono.onMessage.on.lowLevelHook.hasInject = function(message, sender, response) {
      if (location.href !== message.url) {
        return setTimeout(function() {
          response(null);
        }, 1000);
      }
      response(1);
    }
  }

  /*@if isVkOnly=0>*/
  mono.parseXhrHeader = function(head) {
    head = head.replace(/\r?\n/g, '\n').split('\n');
    var obj = {
      monoParsed: 1
    };
    for (var i = 0, len = head.length; i < len; i++) {
      var keyValue = head[i].split(':');
      if (keyValue.length < 2) {
        continue;
      }
      var key = keyValue[0].trim().toLowerCase();
      obj[key] = keyValue[1].trim();
    }
    return obj;
  };
  /*@if isVkOnly=0<*/

  mono.ajax = function(obj) {
    var url = obj.url;

    var method = obj.type || 'GET';
    method = method.toUpperCase();

    var data = obj.data;

    if (data && typeof data !== "string") {
      data = mono.param(data);
    }

    if (data && method === 'GET') {
      url += (!/\?/.test(url) ? '?' : '&') + data;
      data = undefined;
    }

    if (obj.cache === false && ['GET','HEAD'].indexOf(method) !== -1) {
      url += (!/\?/.test(url) ? '?' : '&') + '_=' + Date.now();
    }

    var xhr;
    if (obj.localXHR === undefined && mono.isGM) {
      xhr = {};
      xhr.method = method;
      xhr.url = url;
      xhr.data = data;
    } else {
      xhr = new (mono.isModule ? require('sdk/net/xhr').XMLHttpRequest : XMLHttpRequest)();
      xhr.open(method, url, true);
    }

    if (obj.timeout !== undefined) {
      xhr.timeout = obj.timeout;
    }

    if (obj.dataType) {
      obj.dataType = obj.dataType.toLowerCase();

      if (!(mono.noXhrJson && obj.dataType === 'json')) {
        xhr.responseType = obj.dataType;
      }
    }

    if (!obj.headers) {
      obj.headers = {};
    }

    if (obj.contentType) {
      obj.headers["Content-Type"] = obj.contentType;
    }

    if (data && !obj.headers["Content-Type"]) {
      obj.headers["Content-Type"] = 'application/x-www-form-urlencoded; charset=UTF-8';
    }

    /*@if isVkOnly=0>*/
    if (obj.localXHR === undefined && mono.isGM) {
      xhr.responseType = 'text';
      xhr.overrideMimeType = obj.mimeType;
      xhr.headers = obj.headers;
      xhr.onload = function(_xhr) {
        var xhr = mono.extend({}, _xhr);
        var isSuccess = xhr.status >= 200 && xhr.status < 300 || xhr.status === 304;
        if (!isSuccess) {
          return obj.error && obj.error(xhr);
        }

        var response;
        if (typeof xhr.responseText === 'string') {
          response = xhr.responseText;
        } else
        if (typeof xhr.response === 'string') {
          response = xhr.response;
        }

        if (typeof response === 'string') {
          xhr.response = response;
          xhr.responseText = response;

          if (obj.dataType === 'json') {
            try {
              xhr.response = JSON.parse(response);
            } catch (e) {
              console.error('[XHR] Data parse error!', obj, xhr);
            }
          }

          if (obj.mimeType === 'text/xml') {
            var parser = new DOMParser();
            xhr.response = xhr.responseXML = parser.parseFromString(response, 'text/xml');
          }
        }

        var responseHeaders = undefined;
        xhr.getResponseHeader = function(name) {
          name = name.toLowerCase();
          if (responseHeaders === undefined) {
            responseHeaders = mono.parseXhrHeader(xhr.responseHeaders);
          }
          return responseHeaders[name];
        };

        return obj.success && obj.success(xhr.response, xhr);
      };

      xhr.onerror = function(response) {
        obj.error && obj.error(response || {});
      };

      return GM_xmlhttpRequest(xhr);
    }
    /*@if isVkOnly=0<*/

    if (obj.withCredentials) {
      xhr.withCredentials = true;
    }

    if (obj.mimeType && !(mono.isOpera && obj.mimeType === 'application/json')) {
      xhr.overrideMimeType(obj.mimeType);
    }

    for (var key in obj.headers) {
      xhr.setRequestHeader(key, obj.headers[key]);
    }

    /*@if isVkOnly=0>*/
    if (mono.isOpera || mono.isSafari) {
      xhr.onreadystatechange = function () {
        if (mono.badXhrRedirect && xhr.readyState > 1 && (xhr.status === 302 || xhr.status === 0)) {
          // Opera xhr redirect
          if (obj.noRedirect === undefined) {
            obj.noRedirect = 0;
          }
          var location = xhr.getResponseHeader('Location');
          if (location && obj.noRedirect < 5) {
            obj.noRedirect++;
            var _obj = mono.extend({}, obj);
            _obj.url = location;
            delete obj.success;
            delete obj.error;
            var _xhr = mono.ajax(_obj);
            xhr.abort = _xhr.abort;
          }
        }
        if (mono.badXhrHeadRedirect && xhr.readyState > 1 && method === 'HEAD') {
          // Safari on HEAD 302 redirect fix
          obj.success && obj.success(undefined, xhr);
          delete obj.success;
          delete obj.error;
          xhr.abort();
        }
      };
    }
    /*@if isVkOnly=0<*/

    if (obj.onTimeout !== undefined) {
      xhr.ontimeout = function() {
        obj.onTimeout();
      };
    }

    xhr.onload = function () {
      if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304 ||
        ( mono.badXhrZeroResponse && xhr.status === 0 && xhr.response) ) {
        var response = (obj.dataType) ? xhr.response : xhr.responseText;
        if (obj.dataType === 'json' && typeof response !== 'object' && xhr.responseText) {
          try {
            response = JSON.parse(xhr.responseText);
          } catch (e) {}
        }
        return obj.success && obj.success(response, xhr);
      }
      obj.error && obj.error(xhr);
    };

    xhr.onerror = function(e) {
      obj.error && obj.error(xhr);
    };

    try {
      xhr.send(data);
    } catch (e) {
      // NS_ERROR_FILE_NOT_FOUND
      obj.error && obj.error({});
    }

    return xhr;
  };

  mono.extend = function() {
    var obj = arguments[0];
    for (var i = 1, len = arguments.length; i < len; i++) {
      var item = arguments[i];
      for (var key in item) {
        obj[key] = item[key];
      }
    }
    return obj;
  };

  mono.extendPos = function() {
    var obj = arguments[0];
    for (var i = 1, len = arguments.length; i < len; i++) {
      var item = arguments[i];
      for (var key in item) {
        delete obj[key];
        obj[key] = item[key];
      }
    }
    return obj;
  };

  mono.param = function(obj) {
    if (typeof obj === 'string') {
      return obj;
    }
    var itemsList = [];
    for (var key in obj) {
      if (!obj.hasOwnProperty(key)) {
        continue;
      }
      if (obj[key] === undefined || obj[key] === null) {
        obj[key] = '';
      }
      itemsList.push(encodeURIComponent(key)+'='+encodeURIComponent(obj[key]));
    }
    return itemsList.join('&');
  };

  mono.capitalize = function(word) {
    "use strict";
    return word.charAt(0).toUpperCase() + word.substr(1);
  };

  mono.create = function(tagName, obj) {
    "use strict";
    var el;
    var func;
    if (typeof tagName !== 'object') {
      el = document.createElement(tagName);
    } else {
      el = tagName;
    }
    for (var attr in obj) {
      var value = obj[attr];
      if (func = mono.create.hook[attr]) {
        func(el, value);
        continue;
      }
      el[attr] = value;
    }
    return el;
  };
  mono.create.hook = {
    text: function(el, value) {
      "use strict";
      el.textContent = value;
    },
    data: function(el, value) {
      "use strict";
      for (var item in value) {
        el.dataset[item] = value[item];
      }
    },
    class: function(el, value) {
      "use strict";
      if (Array.isArray(value)) {
        for (var i = 0, len = value.length; i < len; i++) {
          el.classList.add(value[i]);
        }
      } else {
        el.setAttribute('class', value);
      }
    },
    style: function(el, value) {
      "use strict";
      if (typeof value === 'object') {
        for (var item in value) {
          var key = item;
          if (key === 'float') {
            key = 'cssFloat';
          }
          el.style[key] = value[item];
        }
      } else {
        el.setAttribute('style', value);
      }
    },
    append: function(el, value) {
      "use strict";
      if (!Array.isArray(value)) {
        value = [value];
      }
      for (var i = 0, len = value.length; i < len; i++) {
        var node = value[i];
        if (!node && node !== 0) {
          continue;
        }
        if (typeof node !== 'object') {
          node = document.createTextNode(node);
        }
        el.appendChild(node);
      }
    },
    on: function(el, eventList) {
      "use strict";
      if (typeof eventList[0] !== 'object') {
        eventList = [eventList];
      }
      for (var i = 0, len = eventList.length; i < len; i++) {
        var args = eventList[i];
        if (!Array.isArray(args)) {
          continue;
        }
        mono.on(el, args[0], args[1], args[2]);
      }
    },
    onCreate: function(el, value) {
      "use strict";
      value.call(el, el);
    }
  };

  mono.parseTemplate = function(list, details) {
    details = details || {};

    if (typeof list === "string") {
      if (list[0] !== '[') {
        return document.createTextNode(list);
      }
      try {
        list = list.replace(/"/g, '\\u0022').replace(/\\'/g, '\\u0027').replace(/'/g, '"').replace(/([{,])\s*([a-zA-Z0-9]+):/g, '$1"$2":');
        list = JSON.parse(list);
      } catch (e) {
        return document.createTextNode(list);
      }
    }
    if (!Array.isArray(list)) {
      return document.createTextNode(list);
    }
    var fragment = details.fragment || document.createDocumentFragment();
    for (var i = 0, len = list.length; i < len; i++) {
      var item = list[i];
      if (typeof item === 'object') {
        for (var tagName in item) {
          var el = item[tagName];
          var append = el.append;
          delete el.append;
          var dEl;
          fragment.appendChild(dEl = mono.create(tagName, el));
          if (append !== undefined) {
            mono.parseTemplate(append, {
              fragment: dEl
            });
          }
        }
      } else {
        fragment.appendChild(document.createTextNode(item));
      }
    }
    return fragment;
  };

  mono.trigger = function(el, type, data) {
    if (data === undefined) {
      data = {};
    }
    if (data.bubbles === undefined) {
      data.bubbles = false;
    }
    if (data.cancelable === undefined) {
      data.cancelable = false;
    }
    var event = new CustomEvent(type, data);
    el.dispatchEvent(event);
  };

  mono.urlPatternToStrRe = function(value) {
    "use strict";
    if (value === '<all_urls>') {
      return '^https?:\\/\\/.+$';
    }

    var m = value.match(/(\*|http|https|file|ftp):\/\/([^\/]+)(?:\/(.*))?/);
    if (!m) {
      throw new Error("Invalid url-pattern");
    }

    var scheme = m[1];
    if (scheme === '*') {
      scheme = 'https?';
    }

    var host = m[2];
    if (host === '*') {
      host = '.+';
    } else {
      host = mono.escapeRegex(host);
      host = host.replace(/^\\\*\\\./, '(?:[^\/]+\\.)?');
      host = host.replace(/\\\.\\\*$/g, '\\.[a-z\\.]{2,}');
    }

    var pattern = ['^', scheme, ':\\/\\/', host];

    var path = m[3];
    if (!path) {
      pattern.push('$');
    } else
    if (path === '*') {
      path = '(?:|\/.*)';
      pattern.push(path);
      pattern.push('$');
    } else
    if (path) {
      path = '\/' + path;
      path = mono.escapeRegex(path);
      path = path.replace(/\\\*/g, '.*');
      pattern.push(path);
      pattern.push('$');
    }

    return pattern.join('');
  };

  mono.str2regexp = function(s) {
    return new RegExp('^' + s.replace(/\./g, '\\.').replace(/\*/g, '.*?') + '$');
  };

  mono.checkUrl = function(url, rules) {
    return rules.some(function(rule){
      if (typeof rule === 'string') {
        rule = mono.str2regexp(rule);
      }
      return rule.test(url)
    });
  };

  mono.isIframe = function() {
    /*@if isVkOnly=0>*/
    if (mono.isFF) {
      return window.parent !== window;
    }
    /*@if isVkOnly=0<*/
    return window.top !== window.self;
  };

  /*@if isVkOnly=0>*/
  mono.uniFix = function() {
    if (mono.uniFix.fired) {
      return;
    }
    mono.uniFix.fired = true;

    if (mono.isOpera) {
      if (typeof location === 'undefined') {
        location = document.location;
      }
      if (typeof navigator === 'undefined') {
        navigator = window.navigator;
      }
      if (typeof localStorage === 'undefined') {
        localStorage = window.localStorage;
      }
      if (typeof CustomEvent === 'undefined') {
        CustomEvent = window.CustomEvent;
      }
      if (typeof XMLHttpRequest === 'undefined') {
        XMLHttpRequest = window.XMLHttpRequest;
      }
      if (typeof btoa === 'undefined') {
        btoa = window.btoa.bind(window);
      }
      if (typeof atob === 'undefined') {
        atob = window.atob.bind(window);
      }
    }
    if (mono.isSafari && typeof CustomEvent === 'undefined') {
      CustomEvent = function (event, params) {
        params = params || { bubbles: false, cancelable: false };
        var evt = document.createEvent('CustomEvent');
        evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
        return evt;
      };
      CustomEvent.prototype = window.Event.prototype;
    }
  };
  /*@if isVkOnly=0<*/

  mono.userJsCheck = function() {
    "use strict";
    /*@if isVkOnly=0>*/
    if (mono.isGM) {
      return;
    }

    if (!mono.hasPageScript()) {
      return;
    }

    try {
      if(window.sessionStorage['savefrom-helper-userjs'] === '1') {
        mono.sendMessage({action: 'userjsDetected'});
      }
    } catch (e) {}
    /*@if isVkOnly=0<*/
  };

  mono.hasPageScript = function() {
    "use strict";
    var moduleLoadedList = mono.loadModule.moduleLoadedList;
    return moduleLoadedList.some(function(moduleName) {
      if (['sovetnik', 'dealply', 'aviaBar'].indexOf(moduleName) === -1) {
        return true;
      }
    });
  };

  mono.setExtensionSession = function() {
    "use strict";
    /*@if isVkOnly=0>*/
    try {
      if (!mono.hasPageScript()) {
        delete window.sessionStorage['savefrom-helper-extension'];
      } else {
        window.sessionStorage['savefrom-helper-extension'] = '1';
      }
    } catch (e) {}
    /*@if isVkOnly=0<*/
  };

  mono.loadModule = function(moduleName, cb, isAvailable, syncIsAvailable) {
    var moduleNameList = mono.loadModule.moduleNameList;
    if (moduleNameList.indexOf(moduleName) !== -1) {
      return;
    }
    moduleNameList.push(moduleName);

    /*@if isVkOnly=0>*/
    mono.uniFix();
    /*@if isVkOnly=0<*/

    if (syncIsAvailable && !syncIsAvailable()) {
      return;
    }

    var moduleList = mono.loadModule.moduleList;
    moduleList.push(arguments);
    if (moduleList.length > 1) {
      return;
    }

    if (mono.loadModule.initData) {
      mono.loadModule.moduleLoad(mono.loadModule.initData);
    } else {
      mono.loadModule.getData();
    }
  };
  mono.loadModule.getData = function() {
    "use strict";
    var hasData = false;
    var limit = 20;
    (function getData() {
      if (hasData) {
        return;
      }
      mono.sendMessage(['getPreference', 'getLanguage'], function(data) {
        if (hasData) {
          return;
        }
        hasData = true;

        mono.global.language = data.getLanguage;
        mono.global.preference = data.getPreference;

        mono.loadModule.initData = data;
        mono.loadModule.moduleLoad(mono.loadModule.initData);
      });

      limit--;
      if (limit < 0 || mono.isGM) {
        return;
      }
      setTimeout(function() {
        getData();
      }, 250);
    })();
  };
  mono.loadModule.initData = null;
  mono.loadModule.moduleNameList = [];
  mono.loadModule.moduleList = [];
  mono.loadModule.moduleLoadedList = [];
  mono.loadModule.moduleLoad = function(data) {
    var hasActiveModule = false;

    var moduleList = mono.loadModule.moduleList;
    var item, isAvailable, moduleName, cb;
    while (item = moduleList.shift()) {
      isAvailable = item[2];
      moduleName = item[0];
      cb = item[1];
      if (!isAvailable || isAvailable(data)) {
        mono.loadModule.moduleLoadedList.push(moduleName);
        cb(moduleName, data);
        hasActiveModule = true;
      }
    }
    mono.loadModule.initData = null;

    if (hasActiveModule && !mono.isGM) {
      mono.setExtensionSession();
      mono.userJsCheck();
    }
  };

  mono.openTab = function(url, select, active) {
    select = (select === undefined)?true:!!select;
    if (mono.isChrome) {
      var options = {url: url, selected: select};
      if (active) {
        options.active = !!active;
      }
      chrome.tabs.create(options);
      return;
    }
    /*@if isVkOnly=0>*/
    if (mono.isFF) {
      var tabs = require("sdk/tabs");
      tabs.open(url);
    } else
    if (mono.isSafari) {
      var tab;
      var window = safari.application.activeBrowserWindow;
      if (window) {
        tab = window.openTab();
      } else {
        tab = safari.application.openBrowserWindow().activeTab;
      }
      tab.url = url;
      if (select) {
        tab.activate();
      }
    } else
    if (mono.isOpera) {
      opera.extension.tabs.create({ url: url, focused: select });
    } else
    if (mono.isGM) {
      if (typeof GM_openInTab === 'undefined') {
        return;
      }
      GM_openInTab(url, {
        active: select,
        insert: true
      });
    }
    /*@if isVkOnly=0<*/
  };
  mono.getCurrentPageUrl = function(cb) {
    if (mono.isChrome) {
      return chrome.tabs.getSelected(null, function (tab) {
        cb(tab.url);
      });
    }
    /*@if isVkOnly=0>*/
    if (mono.isFF) {
      var tabs = require("sdk/tabs");
      cb(tabs.activeTab.url);
    } else
    if (mono.isSafari) {
      var url = safari.application.activeBrowserWindow &&
        safari.application.activeBrowserWindow.activeTab &&
        safari.application.activeBrowserWindow.activeTab.url || '';
      cb(url);
    } else
    if (mono.isOpera) {
      var tab = opera.extension.tabs.getFocused();
      cb(tab.url);
    } else
    if (mono.isGM) {
      cb(location.href);
    }
    /*@if isVkOnly=0<*/
  };
  mono.contains = function() {
    var rnative = /^[^{]+\{\s*\[native \w/;
    if (rnative.test(document.compareDocumentPosition) || rnative.test(document.contains)) {
      mono.contains = function(a, b) {
        // from Sizzle
        var adown = a.nodeType === 9 ? a.documentElement : a,
          bup = b && b.parentNode;
        return a === bup || !!( bup && bup.nodeType === 1 && (
            adown.contains ?
              adown.contains( bup ) :
            a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
          ));
      };
    } else {
      mono.contains = function(a, b) {
        if (b) {
          while (b = b.parentNode) {
            if (b === a) {
              return true;
            }
          }
        }
        return false;
      };
    }
    return mono.contains.apply(this, arguments);
  };
  (function() {
    "use strict";
    var getTwoElParent = function(a, b, parentList) {
      parentList.unshift(b);
      while (b = b.parentNode) {
        if (mono.contains(b, a)) {
          return b;
        }
        parentList.unshift(b);
      }
      return null;
    };
    var wrapEvent = function (origType, fixType, origEvent, capture) {
      return !capture ? function (event) {
        var related = event.relatedTarget;
        var target = this;
        if (!related || (related !== target && !mono.contains(target, related))) {
          origEvent.call(this, {
            type: origType,
            target: target,
            preventDefault: event.preventDefault,
            stopPropagation: event.stopPropagation
          });
        }
      } : function (event) {
        var related = event.relatedTarget;
        var target = event.target;
        var parentList = [];
        if (!related || mono.contains(related, target) || (related = getTwoElParent(related, target, parentList))) {
          if (parentList.length === 0) {
            while (target !== related) {
              parentList.unshift(target);
              target = target.parentNode;
            }
          }
          while (target = parentList.shift()) {
            origEvent.call(this, {
              type: origType,
              target: target,
              preventDefault: event.preventDefault,
              stopPropagation: event.stopPropagation
            });
          }
        }
      };
    };

    var functionMap = {
      key: 'fixEvent-',
      eventId: 0,
      replaceList: {},
      bindCount: {}
    };
    mono.on = function(el, type, onEvent, capture) {
      /*@if isVkOnly=0>*/
      if (type === 'mouseenter' || type === 'mouseleave') {
        if ((mono.isFF || (mono.isGM && !mono.isTM && !mono.isVM) || mono.isSafari) && el === document && !capture) {
          el = document.body;
        }

        if (mono.noMouseEnter) {
          var cacheEventKey = functionMap.key;
          var origEvent = onEvent;
          var origType = type;
          var origCapture = capture;

          if (type === 'mouseenter') {
            type = 'mouseover';
          } else
          if (type === 'mouseleave') {
            type = 'mouseout';
          }
          cacheEventKey += type;
          if (capture) {
            cacheEventKey += '-1';
            capture = false;
          }

          var eventId = origEvent[cacheEventKey];
          if (eventId === undefined) {
            eventId = functionMap.eventId++;
            origEvent[cacheEventKey] = eventId;

            onEvent = wrapEvent(origType, type, origEvent, origCapture);

            functionMap.replaceList[eventId] = onEvent;

            if (functionMap.bindCount[eventId] === undefined) {
              functionMap.bindCount[eventId] = 0;
            }
          } else {
            onEvent = functionMap.replaceList[eventId];
          }

          functionMap.bindCount[eventId]++;
        }
      }
      /*@if isVkOnly=0<*/

      el.addEventListener(type, onEvent, capture);
    };

    mono.off = function(el, type, onEvent, capture) {
      /*@if isVkOnly=0>*/
      if (type === 'mouseenter' || type === 'mouseleave') {
        if ((mono.isFF || (mono.isGM && !mono.isTM && !mono.isVM) || mono.isSafari) && el === document && !capture) {
          el = document.body;
        }

        if (mono.noMouseEnter) {
          var cacheEventKey = functionMap.key;
          if (type === 'mouseenter') {
            type = 'mouseover';
          } else
          if (type === 'mouseleave') {
            type = 'mouseout';
          }
          cacheEventKey += type;
          if (capture) {
            cacheEventKey += '-1';
            capture = false;
          }

          var eventId = onEvent[cacheEventKey];
          if (eventId !== undefined) {
            var origEvent = onEvent;
            onEvent = functionMap.replaceList[eventId];
            functionMap.bindCount[eventId]--;

            if (functionMap.bindCount[eventId] === 0) {
              delete origEvent[cacheEventKey];
              delete functionMap.replaceList[eventId];
              delete functionMap.bindCount[eventId];
            }
          }
        }
      }
      /*@if isVkOnly=0<*/

      el.removeEventListener(type, onEvent, capture);
    };
  }());

  (function() {
    var vars = {
      lastUrl: undefined,
      timer: undefined,
      eventList: []
    };

    var checkUrlChange = function() {
      var url = document.location.href;

      if (vars.lastUrl === url) {
        return;
      }

      var oldUrl = vars.lastUrl;
      vars.lastUrl = url;

      for (var i = 0, len = vars.eventList.length; i < len; i++) {
        vars.eventList[i](vars.lastUrl, oldUrl);
      }
    };

    mono.onUrlChange = function(cb, now) {
      if (vars.eventList.indexOf(cb) !== -1) {
        return;
      }

      var currentUrl = window.location.href;

      vars.eventList.push(cb);

      now && cb(currentUrl);

      if (vars.eventList.length > 1) {
        return;
      }

      vars.lastUrl = currentUrl;

      vars.timer = setInterval(checkUrlChange, 1000);

      // window.addEventListener('popstate', onUrlChangeListener);
    };

    mono.offUrlChange = function(cb) {
      var pos = vars.eventList.indexOf(cb);
      if (pos === -1) {
        return;
      }
      vars.eventList.splice(pos, 1);

      if (vars.eventList.length === 0) {
        clearInterval(vars.timer);
        // window.removeEventListener('popstate', onUrlChangeListener);
      }
    };

    mono.clearUrlChange = function() {
      vars.eventList.splice(0);
      clearInterval(vars.timer);
    };
  }());

  mono.global = {};

  mono.initGlobal = function(cb, args) {
    args = args || [];
    if (mono.global.language && mono.global.preference && args.length === 0) {
      return cb({getLanguage: mono.global.language, getPreference: mono.global.preference});
    }
    mono.sendMessage(['getLanguage', 'getPreference'].concat(args), function(response) {
      mono.global.language = response.getLanguage;
      mono.global.preference = response.getPreference;
      cb(response);
    });
  };

  mono.getParentByClass = function(el, classList) {
    if (typeof classList === 'string') {
      classList = [classList];
    }

    for(var parent = el; parent; parent = parent.parentNode) {
      if (parent.nodeType !== 1) {
        return null;
      }
      for (var i = 0, className; className = classList[i]; i++) {
        if (parent.classList.contains(className)) {
          return parent;
        }
      }
    }

    return null;
  };

  mono.parseUrlParams = function(url, options) {
    // deprecated
    options = options || {};
    var startFrom = url.indexOf('?');
    var query = url;
    if (!options.argsOnly && startFrom !== -1) {
      query = url.substr(startFrom + 1);
    }
    var sep = options.forceSep || '&';
    if (!options.forceSep && query.indexOf('&amp;') !== -1) {
      sep = '&amp;';
    }
    var dblParamList = query.split(sep);
    var params = {};
    for (var i = 0, len = dblParamList.length; i < len; i++) {
      var item = dblParamList[i];
      var ab = item.split('=');
      if (options.useDecode) {
        try {
          params[ab[0]] = decodeURIComponent(ab[1] || '');
        } catch (err) {
          params[ab[0]] = unescape(ab[1] || '');
        }
      } else {
        params[ab[0]] = ab[1] || '';
      }

    }
    return params;
  };

  mono.parseUrl= function(url, details) {
    details = details || {};
    var query = null;
    if (!details.params && /\?/.test(url)) {
      query = url.match(/[^\?]+\?(.+)/)[1];
    } else {
      query = url;
    }
    var separator = details.sep || '&';
    var dblParamList = query.split(separator);
    var params = {};
    for (var i = 0, len = dblParamList.length; i < len; i++) {
      var item = dblParamList[i];
      var keyValue = item.split('=');
      var key = keyValue[0];
      var value = keyValue[1] || '';
      if (!details.noDecode) {
        try {
          key = decodeURIComponent(key);
        } catch (err) {
          key = unescape(key);
        }
        try {
          params[key] = decodeURIComponent(value);
        } catch (err) {
          params[key] = unescape(value);
        }
      } else {
        params[key] = value;
      }
    }
    return params;
  };

  mono.throttle = function(fn, threshhold, scope) {
    threshhold = threshhold || 250;
    var last;
    var deferTimer;
    return function () {
      var context = scope || this;

      var now = Date.now();
      var args = arguments;
      if (last && now < last + threshhold) {
        // hold on to it
        clearTimeout(deferTimer);
        deferTimer = setTimeout(function () {
          last = now;
          fn.apply(context, args);
        }, threshhold);
      } else {
        last = now;
        fn.apply(context, args);
      }
    };
  };

  mono.debounce = function(fn, delay) {
    var timer = null;
    return function () {
      var context = this, args = arguments;
      clearTimeout(timer);
      timer = setTimeout(function () {
        fn.apply(context, args);
      }, delay);
    };
  };

  mono.getDomain = function(url, strip) {
    var m = url.match(/:\/\/(?:[^\/?#]*@)?([^:\/?#]+)/);
    m = m && m[1];
    if (m) {
      if (strip) {
        m = m.replace(/^www\./, '');
      }
      return m;
    }
  };

  // legacy

  mono.getQueryString = function(query, key_prefix, key_suffix) {
    if(!query || typeof(query) != 'object')
      return '';

    if(key_prefix === undefined)
      key_prefix = '';

    if(key_suffix === undefined)
      key_suffix = '';

    var str = '';
    for(var key in query)
    {
      if(str.length)
        str += '&';

      if(query[key] instanceof Object)
      {
        if(!key_prefix)
          key_prefix = '';

        if(!key_suffix)
          key_suffix = '';

        str += mono.getQueryString(query[key], key_prefix + key + "[", "]" + key_suffix);
      }
      else
        str += key_prefix + escape(key) + key_suffix + '=' + escape(query[key]);
    }

    return str;
  };

  mono.decodeUnicodeEscapeSequence = function(text) {
    return JSON.parse(JSON.stringify(text)
      .replace(mono.decodeUnicodeEscapeSequence.re, '$1'));
  };
  mono.decodeUnicodeEscapeSequence.re = /\\(\\u[0-9a-f]{4})/g;

  mono.fileName = {
    maxLength: 80,

    rtrim: /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,

    illegalRe: /[\/\?<>\\:\*\|":]/g,

    controlRe: /[\x00-\x1f\x80-\x9f]/g,

    reservedRe: /^\.+/,

    trim: function(text) {
      return text.replace(this.rtrim);
    },

    partsRe: /^(.+)\.([a-z0-9]{1,4})$/i,

    getParts: function (name) {
      return name.match(this.partsRe);
    },

    specialChars: ('nbsp,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2' +
    ',sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,Agrave,Aacute,Acirc,Atilde,Auml' +
    ',Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml' +
    ',times,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil' +
    ',egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,divide,oslash' +
    ',ugrave,uacute,ucirc,uuml,yacute,thorn,yuml').split(','),
    specialCharsList: [['amp','quot','lt','gt'], [38,34,60,62]],

    specialCharsRe: /&([^;]{2,6});/g,

    decodeSpecialChars: function(text) {
      var _this = this;
      return text.replace(this.specialCharsRe, function(text, word) {
        var code;
        if (word[0] === '#') {
          code = parseInt(word.substr(1));
          if (isNaN(code)) return '';
          return String.fromCharCode(code);
        }
        var pos = _this.specialCharsList[0].indexOf(word);
        if (pos !== -1) {
          code = _this.specialCharsList[1][pos];
        }
        pos = _this.specialChars.indexOf(word);
        if (pos !== -1) {
          code = pos + 160;
        }
        if (code !== undefined) {
          return String.fromCharCode(code);
        }
        return '';
      });
    },

    rnRe: /\r?\n/g,

    re1: /[\*\?"]/g,

    re2: /</g,

    re3: />/g,

    spaceRe: /[\s\t\uFEFF\xA0]+/g,

    dblRe: /(\.|\!|\?|_|,|\-|\:|\+){2,}/g,

    re4: /[\.,:;\/\-_\+=']$/g,

    modify: function (name) {
      if (!name) {
        return '';
      }

      name = mono.decodeUnicodeEscapeSequence(name);

      try {
        name = decodeURIComponent(name);
      } catch (err) {
        name = unescape(name);
      }

      name = this.decodeSpecialChars(name);

      name = name.replace(this.rnRe, ' ');

      name = this.trim(name);

      name = name.replace(this.re1, '')
        .replace(this.re2, '(')
        .replace(this.re3, ')')
        .replace(this.spaceRe, ' ')
        .replace(this.dblRe, '$1')
        .replace(this.illegalRe, '_')
        .replace(this.controlRe, '')
        .replace(this.reservedRe, '')
        .replace(this.re4, '');

      if (name.length <= this.maxLength) {
        return name;
      }

      var parts = this.getParts(name);
      if (parts && parts.length == 3) {
        parts[1] = parts[1].substr(0, this.maxLength);
        return parts[1] + '.' + parts[2];
      }

      return name;
    }
  };
  mono.getRandomInt = function (min, max) {
    return Math.floor(Math.random() * (max - min)) + min;
  };
  mono.dataAttr2Selector = function(dataName) {
    return 'data-'+dataName.replace(/[A-Z]/g, function(lit) {
        return '-'+lit.toLowerCase();
      });
  };
  mono.isEmptyObject = function(obj) {
    for (var item in obj) {
      return false;
    }
    return true;
  };

  mono.asyncCall = function(cb) {
    "use strict";
    var _setTimeout;
    if (mono.isModule) {
      _setTimeout = require("sdk/timers").setTimeout;
    } else {
      _setTimeout = setTimeout;
    }
    _setTimeout(function() {
      cb();
    });
  };

  mono.getPageScript = function(html, match) {
    "use strict";
    if (match && !Array.isArray(match)) {
      match = [match];
    }
    var scriptList = [];
    html.replace(/<script(?:|\s[^>]+[^\/])>/g, function(text, offset) {
      offset += text.length;
      var endPos = html.indexOf('<\/script>', offset);
      if (endPos !== -1) {
        var content = html.substr(offset, endPos - offset);
        if (match) {
          match.every(function(r) {
            return r.test(content);
          }) && scriptList.push(content);
        } else {
          scriptList.push(content);
        }
      }
    });
    return scriptList;
  };
  mono.findJson = function(html, match) {
    "use strict";
    if (match && !Array.isArray(match)) {
      match = [match];
    }
    var rawJson = [];
    var obj = {
      '{': 0,
      '[': 0
    };
    var map = {'}': '{', ']': '['};
    var jsonSymbols = /[{}\]\[":0-9.,]/;
    var whiteSpace = /\r\n\s\t/;
    var jsonText = '';
    for (var i = 0, symbol; symbol = html[i]; i++) {
      if (symbol === '"') {
        var end = i;
        while (end !== -1 && (end === i || html[end - 1] === '\\')) {
          end = html.indexOf('"', end + 1);
        }
        if (end === -1) {
          end = html.length - 1;
        }
        jsonText += html.substr(i, end - i + 1);
        i = end;
        continue;
      }

      if (!jsonSymbols.test(symbol)) {
        if (symbol === 't' && html.substr(i, 4) === 'true') {
          jsonText += 'true';
          i+=3;
        } else
        if (symbol === 'f' && html.substr(i, 5) === 'false') {
          jsonText += 'false';
          i+=4;
        } else
        if (symbol === 'n' && html.substr(i, 4) === 'null') {
          jsonText += 'null';
          i+=3;
        } else
        if (!whiteSpace.test(symbol)) {
          obj['{'] = 0;
          obj['['] = 0;
          jsonText = '';
        }
        continue;
      }

      jsonText += symbol;

      if (symbol === '{' || symbol === '[') {
        if (!obj['{'] && !obj['[']) {
          jsonText = symbol;
        }
        obj[symbol]++;
      } else
      if (symbol === '}' || symbol === ']') {
        obj[map[symbol]]--;
        if (!obj['{'] && !obj['[']) {
          rawJson.push(jsonText);
        }
      }
    }
    var jsonList = [];
    for (var i = 0, item; item = rawJson[i]; i++) {
      if (item === '{}' || item === '[]') {
        continue;
      }
      try {
        if (match) {
          match.every(function(r) {
            return r.test(item);
          }) && jsonList.push(JSON.parse(item));
        } else {
          jsonList.push(JSON.parse(item));
        }
      } catch(e) {
        // console.log('bad json', item);
      }
    }
    return jsonList;
  };

  mono.styleObjToText = function(insertStyle, btnId){
    btnId = btnId || '';

    var itemToText = function(styleList) {
      var content = [];
      for (var item in styleList) {
        var key = item.replace(/([A-Z])/g, function(text, letter) {
          return '-' + letter.toLowerCase();
        });
        content.push(key + ':' + styleList[item]);
      }
      return content.join(';');
    };

    var styleText = [];
    for (var selector in insertStyle) {
      var item = insertStyle[selector];
      var selectorList = selector.split(',');
      var cssSelector = '';
      for (var i = 0, len = selectorList.length; i < len; i++) {
        var selectorItem = selectorList[i];
        var sep = ' ';
        if (!selectorItem || [':', '\\'].indexOf(selectorItem[0]) !== -1) {
          sep = '';
          if (selectorItem[0] === '\\') {
            selectorItem = selectorItem.substr(1);
          }
        }
        if (i > 0) {
          cssSelector += ',';
        }
        cssSelector += btnId + sep + selectorItem;
      }
      styleText.push(cssSelector + '{' + itemToText(item) + '}');

    }

    return styleText.join('');
  };

  mono.style2Text = function(obj, parentSelector) {
    "use strict";
    var list = [];
    if (!Array.isArray(obj)) {
      obj = [obj];
    }

    var styleToText = function(section, styleList) {
      "use strict";
      var content = [];

      for (var item in styleList) {
        var value = styleList[item];

        var key = item.replace(/([A-Z])/g, function(text, letter) {
          return '-' + letter.toLowerCase();
        });

        content.push(key + ':' + value);
      }

      return [section.selector.join(''),'{',content.join(';'),'}'].join('');
    };

    for (var i = 0, item; item = obj[i]; i++) {
      if (!Array.isArray(item.selector)) {
        item.selector = [item.selector];
      }

      if (parentSelector) {
        item.selector.unshift.apply(item.selector, parentSelector.concat(item.join || ' '));
      }

      for (var key in item) {
        var value = item[key];
        if (key === 'append') {
          list.push(mono.style2Text(value, item.selector));
          continue;
        }

        if (key === 'style') {
          list.push(styleToText(item, value));
        }
      }
    }
    return list.join('');
  };

  mono.styleReset = {
    animation: "none 0s ease 0s 1 normal none running",
    backfaceVisibility: "visible",
    background: "transparent none repeat 0 0 / auto auto padding-box border-box scroll",
    border: "medium none currentColor",
    borderCollapse: "separate",
    borderImage: "none",
    borderRadius: "0",
    borderSpacing: "0",
    bottom: "auto",
    boxShadow: "none",
    boxSizing: "content-box",
    captionSide: "top",
    clear: "none",
    clip: "auto",
    color: "inherit",
    columns: "auto",
    columnCount: "auto",
    columnFill: "balance",
    columnGap: "normal",
    columnRule: "medium none currentColor",
    columnSpan: "1",
    columnWidth: "auto",
    content: "normal",
    counterIncrement: "none",
    counterReset: "none",
    cursor: "auto",
    direction: "ltr",
    display: "inline",
    emptyCells: "show",
    float: "none",
    font: "normal normal normal normal medium/normal inherit",
    height: "auto",
    hyphens: "none",
    left: "auto",
    letterSpacing: "normal",
    listStyle: "disc outside none",
    margin: "0",
    maxHeight: "none",
    maxWidth: "none",
    minHeight: "0",
    minWidth: "0",
    opacity: "1",
    orphans: "0",
    outline: "medium none invert",
    overflow: "visible",
    overflowX: "visible",
    overflowY: "visible",
    padding: "0",
    pageBreakAfter: "auto",
    pageBreakBefore: "auto",
    pageBreakInside: "auto",
    perspective: "none",
    perspectiveOrigin: "50% 50%",
    position: "static",
    right: "auto",
    tabSize: "8",
    tableLayout: "auto",
    textAlign: "inherit",
    textAlignLast: "auto",
    textDecoration: "none solid currentColor",
    textIndent: "0",
    textShadow: "none",
    textTransform: "none",
    top: "auto",
    transform: "none",
    transformOrigin: "50% 50% 0",
    transformStyle: "flat",
    transition: "none 0s ease 0s",
    unicodeBidi: "normal",
    verticalAlign: "baseline",
    visibility: "visible",
    whiteSpace: "normal",
    widows: "0",
    width: "auto",
    wordSpacing: "normal",
    zIndex: "auto",
    all: "initial"
  };

  mono.matchHost = function(host, hostList) {
    "use strict";
    var dotPos;
    while ((dotPos = host.indexOf('.')) !== -1) {
      if (hostList.indexOf(host) !== -1) {
        return true;
      }
      host = host.substr(dotPos + 1);
    }

    return false;
  };

  mono.storage.getExpire = function(arr, cb, noRemove) {
    "use strict";
    var prefix = mono.storage.getExpire.prefix;
    var now = parseInt(Date.now() / 1000);
    if (!Array.isArray(arr)) {
      arr = [arr];
    }
    var getArr = [];
    for (var i = 0, key, len = arr.length; i < len; i++) {
      key = arr[i];
      getArr.push.apply(getArr, [key, key + prefix]);
    }
    mono.storage.get(getArr, function(storage) {
      var obj = {};
      var rmList = [];
      var r = new RegExp(prefix + '$');
      for (var key in storage) {
        if (r.test(key)) {
          continue;
        }
        if (storage[key + prefix] > now) {
          obj[key] = storage[key];
        } else {
          rmList.push(key);
        }
      }
      !noRemove && rmList.length && mono.storage.removeExpire(rmList);
      return cb(obj, storage);
    });
  };

  mono.storage.getExpire.prefix = '_expire_';

  mono.storage.setExpire = function(obj, sec, cb) {
    "use strict";
    var prefix = mono.storage.getExpire.prefix;
    var now = parseInt(Date.now() / 1000);
    var setObj = {};
    for (var key in obj) {
      setObj[key] = obj[key];
      setObj[key + prefix] = now + sec;
    }
    mono.storage.set(setObj, function() {
      cb && cb();
    });
  };

  mono.storage.removeExpire = function(arr, cb) {
    "use strict";
    var prefix = mono.storage.getExpire.prefix;
    if (!Array.isArray(arr)) {
      arr = [arr];
    }
    var rmList = [];
    for (var i = 0, key, len = arr.length; i < len; i++) {
      key = arr[i];
      rmList.push.apply(rmList, [key, key + prefix]);
    }
    mono.storage.remove(rmList, function() {
      cb && cb();
    });
  };

  mono.onRemoveClassName = 'sf-notify-on-remove';
  mono.onRemoveEvent = function(node, event) {
    "use strict";
    node.classList.add(mono.onRemoveClassName);
    node.addEventListener('sf-removed', event);
  };
  mono.onRemoveListener = function(node) {
    "use strict";
    mono.trigger(node, 'sf-removed');
  };
  mono.offRemoveEvent = function(node, event) {
    "use strict";
    node.removeEventListener('sf-removed', event);
  };

  /**
   * @param {Node|Element} node
   * @param {String} selector
   * @returns {boolean}
   */
  mono.matches = function(node, selector) {
    "use strict";
    var el = document.createElement('div');
    if (typeof el.matches === 'function') {
      mono.matches = function(node, selector){
        return node.matches(selector);
      };
    } else
    if (typeof el.matchesSelector === 'function') {
      mono.matches = function(node, selector){
        return node.matchesSelector(selector);
      };
    } else
    if (typeof el.webkitMatchesSelector === 'function') {
      mono.matches = function(node, selector){
        return node.webkitMatchesSelector(selector);
      };
    } else
    if (typeof el.mozMatchesSelector === 'function') {
      mono.matches = function(node, selector){
        return node.mozMatchesSelector(selector);
      };
    } else
    if (typeof el.oMatchesSelector === 'function') {
      mono.matches = function(node, selector){
        return node.oMatchesSelector(selector);
      };
    } else
    if (typeof el.msMatchesSelector === 'function') {
      mono.matches = function(node, selector){
        return node.msMatchesSelector(selector);
      };
    } else {
      mono.matches = function (node, selector) {
        return false;
      };
    }
    el = null;

    return mono.matches.call(this, node, selector);
  };

  mono.getParent = function(node, selector) {
    if (!node || node.nodeType !== 1) {
      return null;
    }

    if (mono.matches(node, selector)) {
      return node;
    }

    if (!mono.matches(node, selector + ' ' + node.tagName)) {
      return null;
    }

    node = node.parentNode;
    for(var parent = node; parent; parent = parent.parentNode) {
      if (parent.nodeType !== 1) {
        return null;
      }

      if(mono.matches(parent, selector)) {
        return parent;
      }
    }

    return null;
  };

  mono.escapeRegex = function(value) {
    "use strict";
    return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
  };

  _mono && (function(tmpMono) {
    "use strict";
    _mono = null;
    var args, list;
    if (!(list = tmpMono['loadModuleStack'])) {
      return;
    }

    while (args = list.shift()) {
      mono.asyncCall(function(args) {
        mono.loadModule.apply(mono, args);
      }.bind(null, args));
    }
  })(_mono);
  //<utils

  //@insert

  return mono;
}
));

var utils = {
  getFileSize: function(message, cb) {
    "use strict";
    var url = message.url;
    var response = {
      fileSize: 0,
      fileType: '',
      status: 0
    };
    mono.ajax({
      url: url,
      type: 'HEAD',
      success: function(data, xhr) {
        if (!xhr.getResponseHeader) {
          return cb(response);
        }

        response.status = xhr.status;

        var contentLength = xhr.getResponseHeader('Content-Length');
        if(contentLength) {
          contentLength = parseInt(contentLength);
          if(!isNaN(contentLength)) {
            response.fileSize = contentLength;
          }
        }

        var contentType = xhr.getResponseHeader('Content-Type');
        if(contentType) {
          response.fileType = contentType;
        }
        cb(response);
      },
      error: function(xhr) {
        response.status = xhr.status;
        cb(response);
      }
    });
  },
  downloadFile: function(message) {
    "use strict";
    var url = message.options.url;
    var filename = message.options.filename;
    if (mono.isFF) {
      return mono.sendMessage({action: 'download', url: url, filename: filename}, undefined, 'service');
    }
    if (mono.isChrome) {
      chrome.downloads.download({
        url: url,
        filename: filename
      });
    }
    if (mono.isGM) {
      GM_download(url, filename);
    }
  },
  downloadList: function(message) {
    "use strict";
    var list = message.fileList;
    var path = message.path;
    list.forEach(function(item) {
      utils.downloadFile({options: {url: item.url, filename: path + item.filename}});
    });
  },
  getUmmyIcon: function(message, cb) {
    "use strict";
    var icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAB90lEQVQ4EcVSy2oUURCtqm7HcYgmYDTiYxEEERdZGP0B0UVwEcSv8LHIb4gbQcjGlVtB40YhfkAWuhs0uFOIgjJomiEzztzue4+n7rTgH6SaoqpPnao6fW+LHLapC9hdPHMbKT1UTcsQWxDBnAAdFkuvQ6QR1cD0QAUVoF+0kKdXBoO32j959maK8V1LVDaBDXkwm9q32atz/hmRpIZb5STqPaDIjP/oFAS5Xu1l/MPCBZhxt09uSRykCn1QhmQr1MiSQ3TPGYdIMtwfZPh3MjkhlvOWOcuTrJQB5VJeR0g5HlzjMSSVpp7mtQGFBJjXwJp69AlqtlTW0bpQ6nNLbTdjSCIxNhkOqUBwBconZYWZr1G6RgXcRoI782k0rO681vVq15o6SGyCrFefbHVnS6eNkmcSyMlOvr48ernimjlf5WcUuP1zr7C7W090/twiMcjw+y95dWcjXRr7Sn6Ba8mmB1RQ/MwqOK2mg356FPFi4xGm4z8I40nOT434OanElDdWM2aH/eAtHOlz98XZRBch0uPnHPu4J9uPn+dNzNGTLho/Kj+D1gza12fl1RuEtlmaaWPiGkOK8k0mecB5Nnes8DZvdiwPgRVrmbAp19aI8Fe2ZSDN86aOk9OpkfiHqfKoap9JfMTWfcavvNXN+/H9G596uPYX83AWUVC6/FsAAAAASUVORK5CYII=';
    cb(icon);
  },
  getWarningIcon: function(message, cb) {
    "use strict";
    var icon;
    var color = message.color || '#c2c2c2';
    if (message.type === 'audio') {
      icon = '<svg width="21px" height="24px" viewBox="0 0 21 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M21,2.76923077 L21,17.6487288 C21,17.6487288 21,17.6487288 21,17.6487288 L21,18.4615385 L20.9068729,18.4615385 C20.723595,19.2712249 20.2716013,20.0865791 19.5669296,20.7680198 C17.9203537,22.360313 15.5176896,22.6184747 14.2004289,21.3446402 C12.8831682,20.0708056 13.1501309,17.7473503 14.7967068,16.1550571 C16.0602516,14.9331676 17.7690324,14.4969051 19.0909091,14.9356816 L19.0909091,14.9356816 L19.0909091,4.15384615 L7.63636364,6.92307692 L7.63636364,19.4948826 C7.63636364,19.4948826 7.63636364,19.4948826 7.63636364,19.4948826 L7.63636364,20.3076923 L7.5432365,20.3076923 C7.35995859,21.1173788 6.90796493,21.9327329 6.20329323,22.6141737 C4.55671732,24.2064669 2.15405328,24.4646286 0.836792552,23.190794 C-0.480468173,21.9169595 -0.213505501,19.5935041 1.43307041,18.0012109 C2.69661523,16.7793214 4.40539601,16.343059 5.72727273,16.7818354 L5.72727273,16.7818354 L5.72727273,6.46153846 L5.72727273,3.69230769 L21,0 L21,2.76923077 Z" fill="'+color+'"></path></svg>';
    } else
    if (message.type === 'playlist') {
      icon = '<svg width="24px" height="18px" viewBox="0 0 24 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M0,0 L0,3.6 L3.42857143,3.6 L3.42857143,0 L0,0 Z M0,7.2 L0,10.8 L3.42857143,10.8 L3.42857143,7.2 L0,7.2 Z M5.14285714,0 L5.14285714,3.6 L24,3.6 L24,0 L5.14285714,0 Z M5.14285714,7.2 L5.14285714,10.8 L20.5714286,10.8 L20.5714286,7.2 L5.14285714,7.2 Z M0,14.4 L0,18 L3.42857143,18 L3.42857143,14.4 L0,14.4 Z M5.14285714,14.4 L5.14285714,18 L22.2857143,18 L22.2857143,14.4 L5.14285714,14.4 Z" fill="'+color+'"></path></svg>';
    } else {
      // photo
      icon = '<svg width="24px" height="18px" viewBox="0 0 24 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M19.5,3 L21.0089096,3 C22.6582294,3 24,4.34288718 24,5.99942248 L24,15.0005775 C24,16.6556493 22.6608432,18 21.0089096,18 L2.99109042,18 C1.34177063,18 0,16.6571128 0,15.0005775 L0,5.99942248 C0,4.34435073 1.33915679,3 2.99109042,3 L7.5,3 C7.5,1.34651712 8.84187067,0 10.497152,0 L16.502848,0 C18.1583772,0 19.5,1.34314575 19.5,3 L19.5,3 Z M13.5,16.5 C16.8137087,16.5 19.5,13.8137087 19.5,10.5 C19.5,7.18629134 16.8137087,4.5 13.5,4.5 C10.1862913,4.5 7.5,7.18629134 7.5,10.5 C7.5,13.8137087 10.1862913,16.5 13.5,16.5 Z M13.5,15 C15.9852815,15 18,12.9852815 18,10.5 C18,8.0147185 15.9852815,6 13.5,6 C11.0147185,6 9,8.0147185 9,10.5 C9,12.9852815 11.0147185,15 13.5,15 Z" fill="'+color+'"></path></svg>';
    }
    cb('data:image/svg+xml;utf8,'+encodeURIComponent(icon));
  },
  /*@if isVkOnly=0>*/
  getUmmyRadioLogo: function(msg, cb) {
    "use strict";
    var icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAtCAIAAAC1eHXNAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADwpJREFUeNqMWAmQldWVvufe+2/vve7X+0J3A40CIpGeIIIgKAiogQGtGc1Sao0mErepZOKkHDPUTFkuExNHrehYJmjFSJxUJqnoqMQAgmIkEYNgBHXCEqCBZuumt7f9y13m3P//aRrQmbx69d6/3nvuOd/5zncu3Pf+AMGPBvMLRGtNRn0AIDlIro+cftYHH/t/nzlr8OQVjhZoos0p3hhlgzamwVlmKaU+dRowz5tfvPsXWjyytuSAKzNj6o54tNN/eFEDRWtxVJK8Y2aD+EVzRIGMfh7i+c2TiVGjftA6qpW5NcoHo23i6UvaPK4Sb5mnScnNlastSxMWJG6BdNVn+eEcr5yaeWQ1Zm7lkghIZjjKVorxSDS5PuI8rtOYxLEBwrQMuD1YW9Xe27do86b2Q3+2iwVQUp/tZxh9YCaF2EXnGqtwKTTM5Xraz9s+48qe5vp8f8mNAgWUjI6LVnpkPKp10c0EOW/5upcXr3mhqnu3GcVyyGfFGs480fqzgECi8BKAheP/843lt6y76jpRYFm/okwQcdYkLnGoYqeo0LIrOe/v/uuHV7z4OPFyYVOHpkDOyCHAZRCpdLGkS0UdCaJkAnFgDCw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2OhBJAt1ej97ZMMz3ZAlxA8F3uTxxhuOXixrECLvcg/bLSHRc9xUCcDWnytJTdE2kKnmrNZCTSiGAmkqOaBQt4YjQyAZTn2ZtvQIz2qb4V3M2Xg/+Qxple7jnrIm1TkqNhbDh0PjMb5vcAKGe6VJCvwlSd9sc8BGNRD6pG+ESIOH1CDxFKGAXqyyGcTKAxEWCHUSqTJu/P9XgAEAq0m0B23WLYgAAAAASUVORK5CYII=';
    cb(icon);
  },
  checkUrlsOfOpenTabs: function(regExpList, callback) {
    "use strict";
    var getUrlList = mono.isGM ? function(cb) {
      cb([location.href]);
    } : mono.isChrome ? function(cb) {
      var urlList = [];
      chrome.tabs.query({}, function (tabs) {
        tabs.forEach(function (tab) {
          urlList.push(tab.url);
        });
        cb(urlList);
      });
    } : mono.isFF ? function(cb) {
      var urlList = [];
      var ffTabs = require("sdk/tabs");
      for (var tab in ffTabs) {
        urlList.push(ffTabs[tab].url);
      }
      cb(urlList);
    } : mono.isOpera ? function(cb) {
      var urlList = [];
      var oTabs = opera.extension.tabs.getAll();
      oTabs.forEach(function(tab) {
        urlList.push(tab.url);
      });
      cb(urlList);
    } : mono.isSafari ? function(cb) {
      var urlList = [];

      safari.application &&
      safari.application.activeBrowserWindow &&
      safari.application.activeBrowserWindow.tabs &&
      safari.application.activeBrowserWindow.tabs.forEach(function (tab) {
        if (!tab.url) {
          return 1;
        }
        urlList.push(tab.url);
      });

      cb(urlList);
    } : function(cb) {
      cb([]);
    };

    getUrlList(function(urlList) {
      var foundUrlList = [];
      urlList.forEach(function(url) {
        regExpList.forEach(function(regexp) {
          if (url.search(regexp) !== -1 ) {
            foundUrlList.push(url);
          }
        });
      });
      callback(foundUrlList);
    });
  },
  /*@if isVkOnly=0<*/
  getData: function(message, cb) {
    "use strict";
    var url = message.url;
    if (!url) {
      return cb();
    }

    mono.ajax({
      url: url,
      success: function(data) {
        cb(data);
      },
      error: function() {
        cb();
      }
    });
  }
};
/*@if isVkOnly=0>*/
if (typeof window === 'undefined') {
  exports.init = function(_mono, _engine) {
    mono = _mono;
    engine = _engine;
    return utils;
  };
}
/*@if isVkOnly=0<*/
typeof window === 'undefined' && (function() {
  var _window = require('sdk/window/utils').getMostRecentBrowserWindow();
  window = {};
  window.navigator = _window.navigator;
  _window = null;

  var self = require('sdk/self');
  mono = require('toolkit/loader').main(require('toolkit/loader').Loader({
    paths: {
      'data/': self.data.url('js/')
    },
    name: self.name,
    prefixURI: self.data.url().match(/([^:]+:\/\/[^/]+\/)/)[1],
    globals: {
      console: console,
      _require: function(path) {
        "use strict";
        switch (path) {
          case 'sdk/simple-storage':
            return require('sdk/simple-storage');
          case 'sdk/net/xhr':
            return require('sdk/net/xhr');
          case 'sdk/tabs':
            return require('sdk/tabs');
          case 'sdk/timers':
            return require('sdk/timers');
          default:
            console.error('Module is not found!', path);
        }
      }
    }
  }), "data/mono");
  self = null;
})();

var engine = {};

engine.varCache = {
  // helper name
  helperName: undefined,
  // extension version
  currentVersion: undefined,
  // cache user js detected state
  userjsDetected: undefined,
  // trackTime for userTrack
  trackTime: 0,
  opButton: null,
  //current language from navigator
  navigatorLanguage: undefined,
  langList: ['en', 'de', 'ru', 'tr', 'uk', 'es', 'fr', 'id'],
  fromId: undefined,
  hasSovetnik: false,
  lastVersion: undefined,
  meta: {},
  lastTrackTime: 0,
  lastCountryRequest: 0,

  isFirstrun: false,
  isUpgrade: false
};

engine.defaultPreferences = {
  version: '0',
  button: 1,
  lmFileHosting: 1,
  lmMediaHosting: 1,
  moduleYoutube: 1,
  moduleDailymotion: 1,
  moduleVimeo: 1,
  moduleFacebook: 1,
  moduleSoundcloud: 1,
  moduleVkontakte: 1,
  moduleOdnoklassniki: 1,
  moduleMailru: 1,
  moduleInstagram: 1,
  moduleRutube: 1,
  moduleShowDownloadInfo: 1,
  ytHideFLV: 0,
  ytHideMP4: 0,
  ytHideWebM: 1,
  ytHide3GP: 1,
  ytHide3D: 1,
  ytHideMP4NoAudio: 1,
  ytHideAudio_MP4: 1,
  vkShowBitrate: 0,
  sovetnikEnabled: 1,
  showUmmyInfo: 1,
  showUmmyBtn: 1,
  gmNativeDownload: 0,
  expIndex: 0,
  advPreShow: 0,
  showTutorial: 0,
  showUmmyLanding: 0,
  aviaBarEnabled: 1
};

engine.preferences = {
  sfHelperName: undefined,
  country: undefined,
  hasDP: undefined,
  hasAviaBar: undefined,
  cohortIndex: undefined,
  downloads: undefined,
  ummyDetected: undefined,
  iframeDownload: undefined,
  showUmmyItem: undefined,
  button: undefined
};

engine.preferenceMap = {
  youtube: 'moduleYoutube',
  dailymotion: 'moduleDailymotion',
  vimeo: 'moduleVimeo',
  facebook: 'moduleFacebook',
  soundcloud: 'moduleSoundcloud',
  vk: 'moduleVkontakte',
  odnoklassniki: 'moduleOdnoklassniki',
  mailru: 'moduleMailru',
  instagram: 'moduleInstagram',
  rutube: 'moduleRutube'
};

engine.modules = {};

engine.onEvent = function(nameList, cb) {
  "use strict";
  if (!Array.isArray(nameList)) {
    nameList = [nameList];
  }
  var readyList = engine.onEvent.readyList;
  var found = nameList.every(function(name) {
    return readyList.indexOf(name) !== -1;
  });
  if (found) {
    return cb();
  }
  var onReadyList = engine.onEvent.onReadyList;
  onReadyList.push([nameList, cb]);
};
engine.onEvent.onReadyList = [];
engine.onEvent.readyList = [];
engine.onEvent.ready = function(name) {
  "use strict";
  var readyList = engine.onEvent.readyList;
  readyList.push(name);

  var onReadyList = engine.onEvent.onReadyList;
  var found;
  var rmList = [];
  var nameList;
  var cb;
  var runList = [];
  for (var i = 0, item; item = onReadyList[i]; i++) {
    nameList = item[0];
    cb = item[1];
    found = nameList.every(function(name) {
      return readyList.indexOf(name) !== -1;
    });
    if (found) {
      rmList.push(item);
      runList.push(cb);
    }
  }
  while (item = rmList.shift()) {
    onReadyList.splice(onReadyList.indexOf(item), 1);
  }
  while (item = runList.shift()) {
    item();
  }
};
engine.onEvent.listeners = {};
engine.onEvent.addListener = function(name, cb) {
  "use strict";
  var listeners = engine.onEvent.listeners;
  if (!listeners[name]) {
    listeners[name] = [];
  }

  listeners[name].push(cb);
};
engine.onEvent.fire = function(name) {
  "use strict";
  var listeners = engine.onEvent.listeners;
  var cbList = listeners[name];

  if (!cbList) {
    return;
  }

  for (var i = 0, func; func = cbList[i]; i++) {
    func();
  }
};

engine.getHelperName = function() {
  "use strict";
  if (mono.isChrome) {
    var browser = engine.getHelperName.getBrowserName();
    browser = browser || 'chrome';
    if (/sandbox.html#bg/.test(location.href)) {
      browser = 'chameleon';
    }
    return browser;
  }
  if (mono.isFF) {
    if (!engine.varCache.ffButton) {
      return 'firefox-mobile';
    }
    if (engine.ffNoStore) {
      return 'firefox-sf';
    }
    return 'firefox';
  }
  if (mono.isSafari) {
    return 'safari';
  }
  if (mono.isOpera) {
    return 'opera';
  }
  if (mono.isGM) {
    return 'userjs-' + engine.getHelperName.getBrowserName();
  }

  return 'undefined';
};
engine.getHelperName.getBrowserName = function() {
  "use strict";
  var browser = '';
  if(navigator.userAgent.indexOf('YaBrowser\/') !== -1) {
    browser = 'yabrowser';
  } else
  if(navigator.userAgent.indexOf('Maxthon\/') !== -1) {
    browser = 'maxthon';
  } else
  if(navigator.userAgent.indexOf('OPR\/') !== -1) {
    browser = 'opera-chromium';
  } else
  if(navigator.userAgent.indexOf('Opera\/') !== -1) {
    browser = 'opera';
  } else
  if(navigator.userAgent.indexOf('Firefox\/') !== -1) {
    browser = 'firefox';
  } else
  if(navigator.userAgent.indexOf('Chrome\/') !== -1) {
    browser = 'chrome';
  } else
  if(navigator.userAgent.indexOf('Safari\/') !== -1) {
    browser = 'safari';
  }
  return browser;
};

engine.dblTrackCheck = function(cb) {
  "use strict";
  if (!mono.isGM) {
    return cb();
  }

  mono.storage.get('dblTrack', function(storage) {
    var now = Date.now();
    if (typeof storage.dblTrack !== 'string') {
      storage.dblTrack = '';
    }

    var dataList = storage.dblTrack.split(',');
    if (dataList[1] > now) {
      return;
    }

    var uuid = engine.generateUuid();
    var expire = now + 60000;
    mono.storage.set({dblTrack: uuid+','+expire});

    setTimeout(function() {
      mono.storage.get('dblTrack', function(storage) {
        if (typeof storage.dblTrack !== 'string') {
          storage.dblTrack = '';
        }

        var dataList = storage.dblTrack.split(',');
        if (dataList[0] !== uuid) {
          return;
        }

        cb();
      });
    }, 5000);
  });
};

engine.getUuid = function() {
  "use strict";
  if (typeof engine.getUuid.uuid === 'string' && engine.getUuid.uuid.length === 36) {
    return engine.getUuid.uuid;
  }

  var uuid = engine.getUuid.uuid = engine.generateUuid();
  mono.storage.set({uuid: uuid});
  return uuid;
};
engine.getUuid.uuid = null;

engine.generateUuid = function() {
  "use strict";
  return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
    var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
    return v.toString(16);
  });
};

engine.hasSovetnik = function() {
  "use strict";
  if (!mono.isFF && !mono.isChrome && !mono.isGM && !mono.isOpera) {
    return false;
  }
  if (mono.isFF && !engine.varCache.ffButton) {
    return false;
  }
  return true;
};

engine.langIsInList = function(lang, langList, countryList) {
  "use strict";
  countryList = countryList || [];
  langList = langList || [];

  lang = lang.substr(0, 2).toLowerCase();

  if (langList.indexOf(lang) !== -1) {
    return true;
  }

  if (countryList.indexOf(engine.preferences.country) !== -1) {
    return true;
  }

  return false;
};

engine.loadLanguage = function(cb, forceLocale) {
  var locale, lang;
  var currentLanguage = engine.varCache.navigatorLanguage.substr(0,2).toLowerCase();
  var langList = engine.varCache.langList;
  var availableLang = langList.indexOf(currentLanguage) !== -1 ? currentLanguage : langList[0];
  var language = {};

  var url = '_locales/{locale}/messages.json';

  if (mono.isGM) {
    lang = _languageList[availableLang];
    _languageList = null;
    lang = JSON.parse(decodeURI(lang));
    engine.loadLanguage.chrome2lang(lang, language);
    return cb(language);
  } else
  if (mono.isFF) {
    locale = require("sdk/l10n").get('lang');
    if (locale === 'lang') {
      locale = availableLang;
    }
    url = url.replace('{locale}', forceLocale || locale);
    try {
      lang = require('sdk/self').data.load(url);
      lang = JSON.parse(lang);
    } catch (e) {
      if (forceLocale !== undefined) {
        return cb(language);
      }
      return engine.loadLanguage(cb, 'en');
    }
    engine.loadLanguage.chrome2lang(lang, language);
    return cb(language);
  } else
  if (mono.isChrome) {
    locale = chrome.i18n.getMessage('lang');
    url = url.replace('{locale}', forceLocale || locale);
  } else
  if (mono.isSafari || mono.isOpera) {
    url = url.replace('{locale}', forceLocale || availableLang);
  }
  mono.ajax({
    mimeType: "application/json",
    dataType: 'json',
    url: url,
    success: function(lang) {
      engine.loadLanguage.chrome2lang(lang, language);
      cb(language);
    },
    error: function() {
      if (forceLocale !== undefined) {
        console.error('Language is not loaded', url);
        return cb(language);
      }
      engine.loadLanguage(cb, 'en');
    }
  });
};
engine.loadLanguage.chrome2lang = function(lang, language) {
  "use strict";
  for (var key in lang) {
    language[key] = lang[key].message;
  }
};

engine.language = {};
engine.operaShowButton = function(enabled) {
  "use strict";
  if (engine.varCache.opButton !== null) {
    opera.contexts.toolbar.removeItem(engine.varCache.opButton);
    engine.varCache.opButton = null;
  }
  if (!enabled) {
    return;
  }
  engine.varCache.opButton = opera.contexts.toolbar.createItem({
    title: 'SaveFrom.net helper',
    icon: "img/icon_18.png",
    popup: {
      href: "popup.html",
      width: 482,
      height: 404
    }
  });
  opera.contexts.toolbar.addItem(engine.varCache.opButton);
};

engine.gmShowButton = function(enabled) {
  if (enabled) {
    _menu.setTitle(engine.language.extName, engine.varCache.currentVersion);
    mono.storage.get('gmIconTop', function(storage) {
      if (storage.gmIconTop === 0 || storage.gmIconTop) {
        _menu.style.menu.initial.top = storage.gmIconTop + 'px';
      }
      _menu.create(1);
    });
  } else {
    _menu.hide();
  }
};

engine.userTrack2 = function() {
  var now = parseInt(Date.now() / 1000);
  if (engine.varCache.lastTrackTime > now) {
    return;
  }
  engine.varCache.lastTrackTime = String(now + 12 * 60 * 60);
  mono.storage.set({lastTrackTime: engine.varCache.lastTrackTime});

  engine.metrika && engine.metrika.sendParamRequest('init');
  engine.ga && engine.ga.sendScreenViewStats('init');
};

engine.tabListener = {
  extendJsList: {},
  excludeList: [
    "*://*.google.*/*",
    "*://*.acidtests.org/*",

    "*://*.savefrom.net/*",
    "*://*.youtube.com/*",
    "*://*.vimeo.com/*",
    "*://*.dailymotion.*/*",
    "*://*.vk.com/*",
    "*://*.vkontakte.ru/*",
    "*://*.odnoklassniki.ru/*",
    "*://my.mail.ru/*",
    "*://*.ok.ru/*",
    "*://*.soundcloud.com/*",
    "*://*.facebook.com/*",
    "*://*.instagram.com/*",
    "*://*.rutube.ru/*"
  ],
  matchCache: null,
  rHostname: /:\/\/(?:[^@\/?#]+@)?([^\/?:#]+)/,
  getHostname: function(url) {
    "use strict";
    var m = url.match(this.rHostname);
    return m && m[1];
  },
  checkUrl: function(url) {
    "use strict";
    if (url.substr(0, 4) !== 'http') {
      return;
    }

    if (this.matchCache.test(url)) {
      return;
    }

    return true;
  },
  oldChromeMode: null,
  onChChange: function(tab) {
    "use strict";
    var preferences = engine.preferences;
    var list = [];

    if (preferences.lmFileHosting || preferences.lmMediaHosting) {
      list.push('includes/components.js');
      list.push('includes/link_modifier.js');
    }

    if (engine.varCache.hasSovetnik && preferences.sovetnikEnabled) {
      list.push('includes/sovetnik-sf.js');
    }

    for (var key in this.extendJsList) {
      var scriptList = this.extendJsList[key].getScriptList(tab.url);
      for (var ii = 0, scriptPath; scriptPath = scriptList[ii]; ii++) {
        if (list.indexOf(scriptPath) === -1) {
          list.push(scriptPath);
        }
      }
    }

    if (list.length === 0) {
      if (mono.isEmptyObject(this.extendJsList)) {
        this.rmListener();
      }
      return;
    }

    list.unshift('js/mono.js');

    for (var i = 0, file; file = list[i]; i++) {
      chrome.tabs.executeScript(tab.id, { file: file, runAt: 'document_end' });
    }
  },
  chListener: function(tabId, changeInfo, tab) {
    "use strict";
    var _this = engine.tabListener;
    if (changeInfo.status !== 'loading') { // complete or loading
      return;
    }

    if (!_this.checkUrl(tab.url)) {
      return;
    }

    var onResponse = function(response) {
      if (response === 1) {
        return;
      }

      chrome.tabs.get(tabId, function(tab) {
        tab && _this.onChChange(tab);
      });
    };

    var msg = {hook: 'hasInject', url: tab.url};
    if (_this.oldChromeMode) {
      chrome.tabs.sendRequest(tabId, msg, onResponse);
    } else
    if (mono.isChromeVersion >= 41) {
      chrome.tabs.sendMessage(tabId, msg, {frameId: 0}, onResponse);
    } else {
      chrome.tabs.sendMessage(tabId, msg, onResponse);
    }
  },
  onFfChange: function(tab) {
    "use strict";
    var preferences = engine.preferences;
    var self = require('sdk/self');
    var list = [];

    var options = {};

    if (preferences.lmFileHosting || preferences.lmMediaHosting) {
      list.push('includes/components.js');
      list.push('includes/link_modifier.js');
    }

    var sovAvailable = false;
    if (engine.varCache.hasSovetnik && preferences.sovetnikEnabled) {
      if (engine.ffNoStore) {
        list.push('includes/sovetnik-sf.js');
      } else
      if (engine.ffSovetnik && engine.ffSovetnik.api.isReady) {
        sovAvailable = true;
        if (!engine.ffSovetnik.isDenyURL(tab.url)) {
          engine.ffSovetnik.api.onTabReady(tab);
        }
      }
    }

    for (var key in this.extendJsList) {
      var scriptList = this.extendJsList[key].getScriptList(tab.url);
      for (var ii = 0, scriptPath; scriptPath = scriptList[ii]; ii++) {
        if (list.indexOf(scriptPath) === -1) {
          list.push(scriptPath);
        }
      }
    }

    if (list.length === 0) {
      if (!sovAvailable && mono.isEmptyObject(this.extendJsList)) {
        this.rmListener();
      }
      return;
    }

    list.unshift('js/mono.js');

    options.contentScriptFile = list.map(function(item) {
      return self.data.url(item);
    });

    var worker = tab.attach(options);
    engine.varCache.monoLib.addPage(worker);
  },
  ffListener: function (tab) {
    "use strict";
    var _this = engine.tabListener;
    if (!_this.checkUrl(tab.url)) {
      return;
    }
    _this.onFfChange(tab);
  },
  rmListener: function() {
    "use strict";
    if (mono.isChrome) {
      chrome.tabs.onUpdated.removeListener(this.chListener);
    } else
    if (mono.isFF) {
      require("sdk/tabs").removeListener('ready', this.ffListener);
    }
  },
  addListener: function() {
    "use strict";
    if (!mono.isChrome && !mono.isFF) {
      return;
    }

    if (!this.matchCache) {
      this.matchCache = this.excludeList.map(function(pattern) {
        return mono.urlPatternToStrRe(pattern);
      }).join('|');
      this.matchCache = new RegExp(this.matchCache);
    }

    this.rmListener();

    if (mono.isChrome) {
      this.oldChromeMode = false;
      if (!(chrome.hasOwnProperty('runtime') && chrome.runtime.onMessage)) {
        this.oldChromeMode = true;
      }

      chrome.tabs.onUpdated.addListener(this.chListener);
    } else
    if (mono.isFF) {
      require("sdk/tabs").on('ready', this.ffListener);
    }
  },
  injectLmInActiveTab: function() {
    "use strict";
    var _this = this;
    var list = [
      'js/mono.js',
      'includes/components.js',
      'includes/link_modifier.js'
    ];
    if (mono.isChrome) {
      chrome.tabs.getSelected(null, function (tab) {
        if (!_this.checkUrl(tab.url)) {
          return;
        }
        list.forEach(function(file) {
          chrome.tabs.executeScript(tab.id, { file: file, runAt: 'document_end' });
        });
      });
    } else
    if (mono.isFF) {
      var self = require('sdk/self');
      var tab = require("sdk/tabs").activeTab;
      if (!this.checkUrl(tab.url)) {
        return;
      }
      var options = {
        contentScriptFile: list.map(function(file) {
          return self.data.url(file);
        })
      };
      var worker = tab.attach(options);
      engine.varCache.monoLib.addPage(worker);
    }
  }
};

engine.cohort = {
  data: {},
  isAllow: function(index) {
    if (index === 1) {
      return mono.isGM || engine.preferences.sfHelperName === 'ff-sf' || mono.isSafari || mono.isOpera || mono.isChrome;
    }
    return false;
  },
  setIndex: function(index) {
    engine.preferences.cohortIndex = index;
  },
  forceSetCohort: function(index) {
    if (!this.isAllow(index)) {
      return;
    }

    var data = this.data;
    if (data.index && this.isAllow(data.index)) {
      return;
    }

    data.index = index;

    mono.storage.set({cohort: data});
    this.setIndex(index);
  },
  firstRun: function() {
    var data = this.data;
    if (data.index && this.isAllow(data.index)) {
      return;
    }

    /*data.index = parseInt('cohort index');

     if (!this.isAllow(data.index)) {
     return;
     }

     mono.storage.set({cohort: data});
     this.setIndex(data.index);*/
  },
  run: function() {
    var data = this.data;
    if (!data.index) {
      return;
    }

    if (!this.isAllow(data.index)) {
      return;
    }

    this.setIndex(data.index);
  },
  track: {
    event: function(category, action, label) {
      var params = {
        ec: category, // share-button
        ea: action, // click
        el: label, // vk
        t: 'event'
      };

      engine.cohort.track.sendData(params);
    },
    sendScreen: function(screenName) {
      var params = {
        an: 'helper',
        aid: engine.varCache.helperName,
        av: engine.varCache.currentVersion,
        t: 'screenview',
        cd: screenName
      };

      engine.cohort.track.sendData(params);
    },
    tidList: {
      1: 'UA-7055055-8',
      2: undefined,
      3: undefined,
      4: undefined
    },
    sendData: function(params) {
      var preferences = engine.preferences;
      if (!engine.cohort.isAllow(preferences.cohortIndex)) {
        return;
      }

      if(!params.t) {
        return;
      }

      var defaultParams = {
        v: 1,
        ul: engine.varCache.navigatorLanguage,
        tid: engine.cohort.track.tidList[preferences.cohortIndex],
        cid: engine.getUuid()
      };

      for (var key in defaultParams) {
        if(!params.hasOwnProperty(key)) {
          params[key] = defaultParams[key];
        }
      }

      if (params.tid === undefined) {
        return;
      }

      mono.ajax({
        url: 'https://www.google-analytics.com/collect',
        type: 'POST',
        data: mono.param(params)
      });
    }
  }
};

engine.getCountry = function() {
  "use strict";
  var country;
  var preferences = engine.preferences;
  var varCache = engine.varCache;

  var lang2country = {
    be: 'by', kk: 'kz', ru: 'ru',
    uk: 'ua', hy: 'am', ro: 'md',
    az: 'az', ka: 'ge', ky: 'kg',
    uz: 'uz', lv: 'lv', lt: 'lt',
    et: 'ee', tg: 'tj', fi: 'fi',
    tk: 'tm'
  };
  if (country = lang2country[varCache.navigatorLanguage.substr(0, 2).toLowerCase()]) {
    preferences.country = country;
    engine.onEvent.ready('getCountry');
    return;
  }

  var requestCountry = function() {
    var xh = preferences.sfHelperName+' '+varCache.currentVersion;
    mono.ajax({
      type: 'POST',
      url: 'https://sf-addon.com/helper/geoip/country.php',
      data: {
        sig: xh.length
      },
      headers: {
        'X-Helper': xh
      },
      success: function(data) {
        if (!data || typeof data !== 'string') {
          return;
        }

        country = data.toLowerCase().substr(0, 2);
        mono.storage.setExpire({country: preferences.country = country}, 259200);
        engine.onEvent.ready('getCountry');
      }
    });
  };

  mono.storage.getExpire('country', function(storage, _storage) {
    if (_storage.country) {
      preferences.country = _storage.country;
    }

    if (storage.country) {
      return;
    }

    var now = parseInt(Date.now() / 1000);
    if (varCache.lastCountryRequest < now) {
      requestCountry();

      mono.storage.set({lastCountryRequest: varCache.lastCountryRequest = now + 86400});
    }
  }, 1);
};

engine.forceMetaRequest = false;
engine.getMeta = function(onComplete, force) {
  "use strict";
  if (mono.isEmptyObject(engine.expList) && !engine.forceMetaRequest) {
    return onComplete && onComplete();
  }

  var requestMeta = function() {
    var done = function(meta) {
      if (done.fired) {
        return;
      }
      done.fired = true;

      if (meta) {
        var _meta = engine.varCache.meta;
        for (var key in _meta) {
          delete _meta[key];
        }

        mono.extend(_meta, meta);
        engine.onEvent.ready('getMeta');
      }

      onComplete && onComplete();
    };

    var cDate = (function() {
      var _date = new Date();
      var date = _date.getDate();
      var month = _date.getMonth() + 1;
      var cDate = '';

      cDate += date < 10 ? '0' + date : date;
      cDate += month < 10 ? '0' + month : month;
      cDate += _date.getFullYear();

      return cDate;
    })();

    var _setTimeout;
    if (mono.isModule) {
      _setTimeout = require("sdk/timers").setTimeout;
    } else {
      _setTimeout = setTimeout;
    }

    _setTimeout(function() {
      done();
    }, 6000);

    mono.ajax({
      url: 'http://sf-addon.com/helper/app/meta.json' + '?_=' + cDate,
      dataType: 'json',
      success: function(meta) {
        if (typeof meta !== 'object' || meta === null) {
          return done();
        }

        mono.storage.setExpire({meta: meta}, 86400);

        done(meta);
      }
    });
  };

  mono.storage.getExpire('meta', function(storage, _storage) {
    if (_storage.meta) {
      mono.extend(engine.varCache.meta, _storage.meta);
    }

    if (force || !storage.meta) {
      mono.storage.setExpire({meta: engine.varCache.meta}, 21600);
      return requestMeta();
    }

    onComplete && onComplete();
  }, 1);
};

engine.onEvent('firstrun', function getFromInstallId() {
  if (engine.varCache.fromId) {
    return;
  }

  mono.ajax({
    url: 'http://savefrom.net/tools/get_vid.php',
    success: function(data) {
      if (!data || typeof data !== 'string' || isNaN(parseInt(data))) {
        return;
      }
      mono.storage.set({fromId: engine.varCache.fromId = data});
    }
  });
});

engine.onEvent('init', function() {
  "use strict";
  if (!mono.isSafari) {
    return;
  }

  safari.extension.settings.addEventListener('change', function(event) {
    if (event.key !== 'show_options') {
      return;
    }
    mono.openTab(safari.extension.baseURI + 'options.html', true);
  });
});

engine.onOptionChange = {
  button: function(enabled) {
    if (mono.isOpera) {
      engine.operaShowButton(enabled);
    } else
    if (mono.isGM) {
      engine.gmShowButton(enabled);
    }
  },
  sovetnikEnabled: function(value, oldValue) {
    var func = engine.onOptionChange.sovetnikEnabled;
    if (value === oldValue) {
      return;
    }

    if (engine.varCache.hasSovetnik) {
      if (value) {
        engine.tabListener.addListener();
      }

      if (mono.isOpera || mono.isChrome) {
        if (window.sovetnik && window.sovetnik.setRemovedState) {
          window.sovetnik.setRemovedState(!value)
        }
      }

      if (mono.isFF && !mono.ffNoStore) {
        if (engine.ffSovetnik && engine.ffSovetnik.api.isReady) {
          engine.ffSovetnik.api.setRemovedState(!value)
        }
      }
    } else
    if (engine.preferences.hasDP) {
      func.dpOnChange && func.dpOnChange();
    }
  },
  lmFileHosting: function(value) {
    if (value) {
      engine.tabListener.addListener();
    }
  },
  lmMediaHosting: function(value) {
    if (value) {
      engine.tabListener.addListener();
    }
  },
  gmNativeDownload: function(value) {
    if (!mono.isGM) {
      return;
    }
    engine.preferences.downloads = !!value;
    if (mono.global.preference) {
      // GM only!
      mono.global.preference.downloads = engine.preferences.downloads;
    }
  }
};

engine.getHelperVersion = function(cb) {
  "use strict";
  if (mono.isChrome) {
    return cb(chrome.app.getDetails().version);
  }
  if (mono.isFF) {
    return cb(require('sdk/self').version);
  }
  if (mono.isOpera) {
    return cb(widget.version);
  }
  if (mono.isGM) {
    var version = 'GM_unknown';
    if(typeof GM_info !== 'undefined' && GM_info.script && GM_info.script.version) {
      version = GM_info.script.version;
    }
    cb(version);
    return;
  }
  if (mono.isSafari) {
    mono.ajax({
      url: safari.extension.baseURI + 'Info.plist',
      success: function(data, xhr) {
        if (!xhr.responseText) {
          return cb('unknown');
        }

        var parser=new DOMParser();
        var xmlDoc=parser.parseFromString(xhr.responseText,"text/xml");
        var elList = xmlDoc.getElementsByTagName('key');
        for (var i = 0, el; el = elList[i]; i++) {
          if (el.textContent === 'CFBundleShortVersionString') {
            return cb(el.nextElementSibling.textContent);
          }
        }

        cb('unknown');
      },
      error: function() {
        cb('unknown');
      }
    });
    return;
  }
};

engine.sendInGa = function(params, details) {
  "use strict";
  details = details || {};
  var stack = engine.sendInGa.stack;

  if (details.id) {
    var hasItem = stack.some(function(stackItem) {
      var _details = stackItem[2];
      if (_details.id === details.id) {
        return true;
      }
    });
    if (hasItem) {
      return;
    }
  }

  stack.unshift([Date.now(), params, details]);

  stack.splice(100);

  engine.sendInGa.send();
};
engine.sendInGa.stack = [];
engine.sendInGa.lock = false;
engine.sendInGa.checkStack = function() {
  "use strict";
  var now = parseInt(Date.now() / 1000);
  var checkStack = engine.sendInGa.checkStack;
  if (checkStack.time > now) {
    return;
  }
  checkStack.time = now + 60 * 60;

  engine.sendInGa.send();
};
engine.sendInGa.checkStack.time = 0;
engine.sendInGa.send = function() {
  "use strict";
  var stack = engine.sendInGa.stack;
  if (!stack.length) {
    return;
  }

  if (engine.sendInGa.lock) {
    return;
  }
  engine.sendInGa.lock = true;

  var item = stack.slice(-1)[0];

  var time = item[0];
  var params = item[1];
  var details = item[2];

  var now = Date.now();

  var delta = now - time;
  if (delta >= 14400000) {
    delta = 14400000 - ((stack.length + 1) * 1000);
  }
  params.qt = delta;

  var _setTimeout, _clearTimeout;
  if (mono.isModule) {
    var sdkTimers = require("sdk/timers");
    _setTimeout = sdkTimers.setTimeout;
    _clearTimeout = sdkTimers.clearTimeout;
  } else {
    _setTimeout = setTimeout;
    _clearTimeout = clearTimeout;
  }

  var timeout = _setTimeout(function() {
    engine.sendInGa.lock = false;
  }, 60 * 1000);

  mono.ajax({
    url: 'https://www.google-analytics.com/collect?z=' + Date.now(),
    type: 'POST',
    data: mono.param(params),
    success: function() {
      var pos = stack.indexOf(item);
      if (pos !== -1) {
        stack.splice(pos, 1);
      }

      details.onSuccess && details.onSuccess();

      engine.sendInGa.lock = false;
      _clearTimeout(timeout);

      engine.sendInGa.send();
    },
    error: function() {
      engine.sendInGa.lock = false;
      _clearTimeout(timeout);
    }
  });
};

engine.actionList = {
  getLanguage: function(message, cb) {
    cb(engine.language);
  },
  getNavigatorLanguage: function(msg, cb) {
    cb(engine.varCache.navigatorLanguage);
  },
  getPreference: function(message, cb) {
    var preferences = engine.preferences;
    if (mono.isSafari || mono.isGM) {
       preferences = mono.extend({}, engine.preferences);
    }
    cb( preferences);

    engine.userTrack();

    if (engine.metrika || engine.ga) {
      engine.userTrack2();
    }

    engine.sendInGa.checkStack();

    mono.msgClean();
  },
  getVersion: function(message, cb) {
    cb(engine.varCache.currentVersion);
  },
  getLastVersionInfo: function(message, cb) {
    var currentVersion = engine.varCache.currentVersion;
    var lastVersion = engine.varCache.lastVersion;
    if (!lastVersion || typeof currentVersion !== 'string') {
      return cb();
    }

    if (currentVersion.indexOf(lastVersion) === 0) {
      return cb();
    }

    cb(lastVersion);
  },
  updateOption: function(message) {
    var oldValue = engine.preferences[message.key];
    engine.preferences[message.key] = message.value;

    var obj = {};
    obj[message.key] = message.value;
    mono.storage.set(obj);

    if (engine.onOptionChange[message.key] !== undefined) {
      engine.onOptionChange[message.key](message.value, oldValue);
    }
  },
  downloadFromCurrentPage: function() {
    var url = 'http://savefrom.net/';
    mono.getCurrentPageUrl(function(cUrl) {
      var args = mono.param({
        url: cUrl,
        utm_source: engine.preferences.sfHelperName,
        utm_medium: 'extensions',
        utm_campaign: 'bookmarklet'
      });
      mono.openTab(url + '?' + args, 1);

      var domain = mono.getDomain(cUrl, 1);
      engine.trackEvent('extensionMenu', 'openSfPage', domain);
      if ([1].indexOf(engine.preferences.cohortIndex) !== -1) {
        engine.cohort.track.event('extensionMenu', 'openSfPage', domain);
      }
    });
  },
  openPoll: function() {
    if (['en', 'uk', 'ru'].indexOf(engine.language.lang) === -1) {
      return;
    }
    var url = 'http://'+engine.language.lang+'.savefrom.net/helper-form.php';
    mono.getCurrentPageUrl(function(cUrl) {
      var domain = mono.getDomain(cUrl) || '';

      var args = '?' + mono.param({
          version: engine.varCache.currentVersion,
          helper: engine.preferences.sfHelperName,
          url: domain
        });
      mono.openTab(url+args, 1);
    });
  },
  reportBug: function() {
    var url = 'http://savefrom.userecho.com/forum/20869-/';
    if(engine.language.lang === 'ru') {
      url = 'http://savefrom.userecho.com/forum/19523-/';
    }
    mono.openTab(url);
  },
  viaMenu_updateLinks: function() {
    mono.sendMessageToActiveTab({action: 'updateLinks'});
  },
  viaMenu_downloadMP3Files: function() {
    mono.sendMessageToActiveTab({action: 'downloadMP3Files'});
  },
  viaMenu_downloadPlaylist: function() {
    mono.sendMessageToActiveTab({action: 'downloadPlaylist'});
  },
  viaMenu_downloadPhotos: function() {
    mono.sendMessageToActiveTab({action: 'downloadPhotos'});
  },
  viaMenu_changeState: function(msg) {
    if (Array.isArray(msg.prefKey)) {
      for (var i = 0, key; key = msg.prefKey[i]; i++) {
        engine.actionList.updateOption({key: key, value: msg.state});
      }
    } else {
      engine.actionList.updateOption({key: msg.prefKey, value: msg.state});
    }

    if (msg.state && msg.moduleName === 'lm' && msg.needInclude) {
      if (mono.isChrome || mono.isFF) {
        engine.tabListener.injectLmInActiveTab();
      }
      return;
    }
    mono.sendMessageToActiveTab({action: 'changeState', moduleName: msg.moduleName, state: msg.state});
  },
  showOptions: function() {
    if (mono.isGM) {
      return _options.show();
    }
    var url = 'options.html';
    if (mono.isFF) {
      url = require('sdk/self').data.url(url);
    } else
    if (mono.isSafari) {
      url = safari.extension.baseURI + url;
    }
    mono.openTab(url, true);
  },
  getActiveTabModuleInfo: function(msg, cb) {
    mono.sendMessageToActiveTab({action: 'getModuleInfo', url: msg.url}, function(moduleInfo) {
      cb(moduleInfo);
    });
  },
  getActiveTabUrl: function(message, cb) {
    mono.getCurrentPageUrl(cb);
  },
  getActiveTabInfo: function(msg, cb) {
    var preferences = engine.preferences;
    mono.getCurrentPageUrl(function(url) {
      if (url.indexOf('http') !== 0) {
        return cb({});
      }
      var hostList = {
        dailymotion: ["*://*.dailymotion.*/*"],
        facebook: ["*://*.facebook.com/*"],
        mailru: ["*://my.mail.ru/*"],
        odnoklassniki: ["*://*.ok.ru/*", "*://*.odnoklassniki.ru/*"],
        savefrom: ["*://*.savefrom.net/*"],
        soundcloud: ["*://*.soundcloud.com/*"],
        vimeo: ["*://*.vimeo.com/*"],
        vk: ["*://*.vk.com/*", "*://*.vkontakte.ru/*"],
        youtube: ["*://*.youtube.com/*"],
        instagram: ["*://*.instagram.com/*"],
        rutube: ["*://*.rutube.ru/*"]
      };
      var moduleName = 'lm';
      var prefKey;
      var state;
      for (var key in hostList) {
        var regList = hostList[key];
        var re = regList.map(function(pattern) {
          return mono.urlPatternToStrRe(pattern);
        }).join('|');
        re = new RegExp(re);

        if (re.test(url)) {
          moduleName = key;
          prefKey = engine.preferenceMap[moduleName];
          state = preferences[prefKey];
          break;
        }
      }
      if (moduleName === 'lm') {
        prefKey = ['lmFileHosting', 'lmMediaHosting'];
        state = preferences.lmFileHosting || preferences.lmMediaHosting;
      }
      cb({moduleName: moduleName, prefKey: prefKey, url: url, state: state});
    });
  },
  popupResize: function() {
    if (mono.isSafari) {
      safari.extension.popovers[0].height = message.height;
    } else
    if (mono.isOpera) {
      var varCache = engine.varCache;
      if (varCache.opButton === null) {
        return;
      }
      varCache.opButton.popup.height = message.height;
      varCache.opButton.popup.width = message.width;
    }
  },
  userjsDetected: function() {
    if (engine.varCache.userjsDetected) {
      return;
    }
    engine.varCache.userjsDetected = 1;

    mono.storage.get('userjsDetected', function(storage) {
      if (storage.userjsDetected === 1) {
        return;
      }
      mono.storage.set({userjsDetected: 1});

      var uuid = engine.getUuid();
      mono.ajax({
        url: 'https://www.google-analytics.com/collect',
        type: 'POST',
        data: 'v=1&tid=UA-7055055-1&cid=' + uuid + '&t=pageview&dh=savefrom.net&dp=%2Fextension%2Fuserjs_installed.ext'
      });
    });
  },
  hasSovetnik: function(message, cb) {
    cb(engine.varCache.hasSovetnik || engine.preferences.hasDP);
  },
  hasAviaBar: function(message, cb) {
    "use strict";
    cb(!!engine.preferences.hasAviaBar);
  },
  getBrowser: function(message, cb) {
    cb(engine.varCache.helperName);
  },
  hideDownloadWarning: function(message, cb) {
    if (message.set !== undefined) {
      return mono.storage.set({hideDownloadWarning: message.set});
    }
    mono.storage.get('hideDownloadWarning', function(storage) {
      cb(storage.hideDownloadWarning);
    });
  },
  storage: function(message, cb) {
    if (message.subaction === 'clear') {
      return;
    }
    if (message.keys) {
      for (var i = 0, len = message.keys.length; i < len; i++) {
        var key = message.keys[i];
        if (!message.data.hasOwnProperty(key)) {
          message.data[key] = undefined;
        }
      }
    }
    mono.storage[message.subaction](message.data, cb);
  },
  trackEvent: function(message) {
    if (message.label === '%domain%') {
      return mono.getCurrentPageUrl(function(cUrl) {
        message.label = mono.getDomain(cUrl, 1);
        engine.trackEvent(message.category, message.event, message.label, message.params);
      });
    }
    engine.trackEvent(message.category, message.event, message.label, message.params);
  },
  trackSocial: function(message) {
    engine.trackSocial(message.target, message.event, message.network);
  },
  trackCohort: function(message) {
    if (!engine.preferences.cohortIndex) {
      return;
    }
    if (message.label === '%domain%') {
      return mono.getCurrentPageUrl(function(cUrl) {
        message.label = mono.getDomain(cUrl, 1);
        engine.cohort.track.event(message.category, message.event, message.label);
      });
    }
    engine.cohort.track.event(message.category, message.event, message.label);
  },
  addToClipboard: function(message) {
    if (mono.isFF) {
      var clipboard = require("sdk/clipboard");
      clipboard.set(message.text);
    } else
    if (mono.isChrome) {
      var text = message.text;
      var textArea;
      document.body.appendChild(textArea = mono.create('textarea', {
        text: text
      }));
      textArea.select();
      mono.asyncCall(function() {
        document.execCommand("copy", false, null);
        textArea.parentNode.removeChild(textArea);
      });
    }
  },
  setIconBadge: function(msg) {
    "use strict";
    var text = String(msg.text);

    if (mono.isChrome) {
      chrome.browserAction && chrome.browserAction.setBadgeText({
        text: text
      });
    }
    if (mono.isModule && engine.varCache.ffButton) {
      var button = engine.varCache.ffButton;
      button.badge = text;
    }
  },
  trackError: function(msg) {
    "use strict";
    try {
      var trackError = engine.actionList.trackError;
      if (!trackError.dDbl) {
        trackError.dDbl = {};
      }

      var exd = msg.desc.substr(0, 150);

      if (trackError.dDbl[exd]) {
        return;
      }
      trackError.dDbl[exd] = true;

      var params = {
        t: 'exception',
        exd: exd,
        tid: 'UA-7055055-9'
      };

      engine.sendStatsInfo(params);
    } catch(e) {}
  }
};

engine.onMessage = function(message, cb) {
  if (!engine.onMessage.ready) {
    engine.onMessage.stack.push(arguments);
    return;
  }

  var func;
  var action = message.action || message;
  if ((func = engine.actionList[action]) !== undefined) {
    return func.call(engine.actionList, message, cb);
  }

  for (var moduleName in engine.modules) {
    var module = engine.modules[moduleName];
    if ((func = module[action]) !== undefined) {
      return func.call(module, message, cb);
    }
  }

  if ((func = utils[action]) !== undefined) {
    return func.call(utils, message, cb);
  }
};
engine.onMessage.stack = [];
engine.onMessage.ready = false;

engine.loadSettings = function(cb) {
  var varCache = engine.varCache;
  var preferences = engine.preferences;
  var defaultPreferences = engine.defaultPreferences;

  var keys = [];
  for (var key in defaultPreferences) {
    keys.push(key);
  }

  var preload = {
    cohort: function(value) {
      engine.cohort.data = value || {};
    },
    fromId: function(value) {
      if (value && isNaN(parseInt(value))) {
        value = undefined;
        mono.storage.remove('fromId');
      }
      varCache.fromId = value;
    },
    lastTrackTime: function(value) {
      varCache.lastTrackTime = value || 0;
    },
    trackTime: function(value) {
      varCache.trackTime = value || 0;
    },
    meta: function(value) {
      mono.extend(varCache.meta, value);
    },
    uuid: function(value) {
      engine.getUuid.uuid = value;
    },
    ummyDetected: function(value) {
      if (value === undefined) {
        value = preferences.showUmmyInfo ? 0 : 1;
        mono.storage.set({ummyDetected: value});
      }
      preferences.ummyDetected = value;
    },
    country: function(value) {
      preferences.country = value;
    },
    lastCountryRequest: function(value) {
      "use strict";
      varCache.lastCountryRequest = value || 0;
    }
  };

  keys.push.apply(keys, Object.keys(preload));

  mono.storage.get(keys, function(storage) {
    var key;
    for (key in defaultPreferences) {
      var defaultValue = defaultPreferences[key];
      if (storage[key] === undefined) {
        storage[key] = defaultValue;
      } else
      if (typeof storage[key] === 'string' && typeof defaultValue === 'number') {
        var numValue = parseFloat(storage[key]);
        if (!isNaN(numValue)) {
          storage[key] = numValue;
        } else {
          console.error('Bad storage value!', key, storage[key]);
        }
      }
      preferences[key] = storage[key];
    }

    if (preferences.version === '0') {
      mono.storage.set({
        showTutorial: preferences.showTutorial = 1,
        showUmmyLanding: preferences.showUmmyLanding = 1
      });
    }

    for (key in preload) {
      preload[key](storage[key]);
    }

    if (mono.isChrome) {
      if (mono.isChromeVersion < 31) {
        preferences.downloads = false;
        preferences.moduleShowDownloadInfo = 0;
        preferences.iframeDownload = false;
      } else {
        preferences.downloads = chrome.downloads !== undefined;
        if (preferences.downloads) {
          preferences.moduleShowDownloadInfo = 0;
          preferences.iframeDownload = false;
        } else {
          preferences.iframeDownload = true;
        }
      }
    } else {
      preferences.moduleShowDownloadInfo = 0;
    }

    if (mono.isGM) {
      if (mono.isTM) {
        preferences.iframeDownload = true;
      }
      preferences.downloads = false;
      if ( typeof GM_download !== 'undefined' && (preferences.gmNativeDownload || (typeof GM_info !== 'undefined' && GM_info.downloadMode === 'browser'))) {
        preferences.gmNativeDownload = 1;
        preferences.downloads = true;
      }
    }

    if (mono.isFF && varCache.ffButton) {
      preferences.downloads = true;
    }

    cb();
  });
};

engine.expList = {};
engine.exp = {
  list: engine.expList,
  getExpIndex: function(type) {
    if (type === 'firstRun') {
      var value = mono.getRandomInt(0, 100);

      for (var index in this.list) {
        var item = this.list[index];
        if (value < item.percent) {
          return parseInt(index);
        }

        value -= item.percent;
      }
    }

    return 0;
  },
  disable: function() {
    if (engine.preferences.expIndex > 0) {
      engine.actionList.updateOption({key: 'expIndex', value: 0});
    }
  },
  cancel: function() {
    engine.preferences.expIndex = 0;
  },
  run: function(expIndex) {
    var varCache = engine.varCache;
    if (!this.list.hasOwnProperty(expIndex)) {
      this.disable();
      return;
    }
    if (varCache.meta.exp && varCache.meta.exp[expIndex] && varCache.meta.exp[expIndex].cancel) {
      this.cancel();
      return;
    }
    this.list[expIndex](engine.preferences, varCache);
  },
  initList: function(cb) {
    var preferences = engine.preferences;
    var varCache = engine.varCache;

    if (mono.isEmptyObject(this.list)) {
      this.disable();
      return cb();
    }

    if (!varCache.isFirstrun && !varCache.isUpgrade) {
      // just run
      this.run(preferences.expIndex);
      return cb();
    }

    if (!varCache.meta.exp) {
      this.disable();
      return cb();
    }

    var metaExpList = varCache.meta.exp;
    var expList = this.list;
    for (var index in expList) {
      var item = metaExpList[index];
      if (!item || !item.enable) {
        delete expList[index];
        continue;
      }
      var func;
      if ((func = expList[index].isAvailable) && !func.call(expList[index], preferences, varCache)) {
        delete expList[index];
        continue;
      }
      expList[index].percent = item.percent || 0;
    }

    var expIndex;
    if (varCache.isFirstrun) {
      // first run
      expIndex = this.getExpIndex('firstRun');

      if (expIndex > 0) {
        engine.actionList.updateOption({key: 'expIndex', value: expIndex});
      }
    } else
    if (varCache.isUpgrade) {
      // on update
      // check current experiment and run it
      if (preferences.expIndex > 0 && !this.list.hasOwnProperty(preferences.expIndex)) {
        this.disable();
      }

      if (preferences.expIndex === 0) {
        // exp is not set!
        expIndex = this.getExpIndex('nextRun');

        if (expIndex > 0) {
          engine.actionList.updateOption({key: 'expIndex', value: expIndex});
        }
      }
    }

    this.run(preferences.expIndex);

    return cb();
  }
};

engine.checkSovetnik = function() {
  "use strict";
  engine.varCache.hasSovetnik = engine.langIsInList(engine.varCache.navigatorLanguage, [
    'be', 'kk', 'ru', 'uk',
    'hy', 'ro', 'az', 'ka',
    'ky', 'uz', 'lv', 'lt',
    'et', 'tg', 'fi', 'tk'
  ], [
    'by', 'kz', 'ru', 'ua',
    'am', 'md', 'az', 'ge',
    'kg', 'uz', 'lv', 'lt',
    'ee', 'tj', 'fi', 'tm'
  ]);

  if (engine.varCache.hasSovetnik) {
    if (mono.isOpera || mono.isChrome) {
      if (engine.sovetnikInit) {
        mono.asyncCall(function () {
          engine.sovetnikInit();
        });
      }
    }

    if (mono.isFF && !mono.ffNoStore) {
      if (engine.ffSovetnik && !engine.ffSovetnik.api.isReady) {
        engine.ffSovetnik.loadSovetnik();
      }
    }
  }

  engine.tabListener.addListener();

  engine.onEvent.fire('hasSovetnikUpdate');
};

engine.prepare = function(cb) {
  "use strict";
  var varCache = engine.varCache;

  engine.onEvent(['getHelperVersion'], function() {
    engine.getCountry();
  });

  engine.onEvent('loadSettings', function() {
    if (engine.hasSovetnik()) {
      engine.checkSovetnik();
      engine.onEvent('getCountry', engine.checkSovetnik);
    }
  });

  engine.onEvent(['loadLanguage', 'loadSettings', 'getHelperVersion'], function() {
    varCache.isFirstrun = engine.preferences.version === '0';
    varCache.isUpgrade = !varCache.isFirstrun && engine.preferences.version !== varCache.currentVersion;

    engine.getMeta(function() {
      engine.exp.initList(cb);
    }, varCache.isFirstrun || varCache.isUpgrade);
  });

  mono.asyncCall(function() {
    engine.loadLanguage(function(_language) {
      for (var key in _language) {
        engine.language[key] = _language[key];
      }
      engine.onEvent.ready('loadLanguage');
    });
  });

  mono.asyncCall(function() {
    engine.loadSettings(function() {
      engine.onEvent.ready('loadSettings');
    });
  });

  mono.asyncCall(function() {
    engine.getHelperVersion(function(version) {
      varCache.currentVersion = version || undefined;
      engine.onEvent.ready('getHelperVersion');
    });
  });
};

engine.initMessageListener = function() {
  if (engine.initMessageListener.fired) {
    return;
  }
  engine.initMessageListener.fired = 1;

  mono.onMessage.call({
    isBg: true
  }, function (message, response) {
    if (!Array.isArray(message)) {
      return engine.onMessage(message, response);
    }

    var countWait = message.length;
    var countReady = 0;
    var resultList = {};
    var ready = function (key, data) {
      countReady += 1;
      resultList[key] = data;
      if (countWait === countReady) {
        response(resultList);
      }
    };
    message.forEach(function (msg) {
      engine.onMessage(msg, function (data) {
        ready(msg.action || msg, data);
      });
    });
  });
};

engine.langNormalization = function(lang) {
  "use strict";
  lang = String(lang || '').toLowerCase();

  var m = lang.match(/\(([^)]+)\)/);
  m = m && m[1];
  if (m) {
    lang = m;
  }

  var tPos = lang.indexOf('-');
  if (tPos !== -1) {
    var left = lang.substr(0, tPos);
    var right = lang.substr(tPos + 1);
    if (left === right) {
      lang = left;
    } else {
      lang = left + '-' + right.toUpperCase();
    }
  }

  return lang;
};

engine.init = function() {
  engine.initMessageListener();

  var varCache = engine.varCache;
  var preferences = engine.preferences;

  var _navigator = (mono.isFF ? window.navigator : navigator);

  varCache.helperName = engine.getHelperName();
  varCache.navigatorLanguage = engine.langNormalization(_navigator.language);

  preferences.showUmmyItem = /^Win|^Mac/.test(_navigator.platform) ? 1 : 0;

  preferences.sfHelperName = varCache.helperName;
  if (preferences.sfHelperName === 'firefox-sf') {
    preferences.sfHelperName = 'ff-sf';
  } else
  if (preferences.sfHelperName === 'firefox-mobile') {
    preferences.sfHelperName = 'ff-mobile';
  } else
  if (preferences.sfHelperName === 'firefox') {
    preferences.sfHelperName = 'ff';
  }

  engine.onEvent.ready('init');

  engine.prepare(function(){
    var uuid = engine.getUuid();
    engine.metrika && engine.metrika.init(
      varCache.currentVersion, varCache.helperName,
      varCache.fromId, uuid,
      varCache.navigatorLanguage, engine.language.lang);
    engine.ga && engine.ga.init(
      varCache.currentVersion, varCache.helperName,
      varCache.fromId, uuid,
      varCache.navigatorLanguage, engine.language.lang);

    engine.checkVersion();

    engine.cohort.run();

    engine.onMessage.ready = true;
    while (engine.onMessage.stack.length > 0) {
      engine.onMessage.apply(null, engine.onMessage.stack.shift());
    }

    engine.onEvent.ready('prepare');
  });
};

mono.isModule && (function(origFunc) {
  engine.init = function(addon, button, monoLib, ffInitPopup) {
    engine.varCache.monoLib = monoLib;
    mono = mono.init(addon);
    var modules = engine.modules;
    modules.vimeo = require('./vimeo_com_embed.js').init(mono, engine);
    modules.dailymotion = require('./dailymotion_com_embed.js').init(mono, engine);
    modules.youtube = require('./youtube_com_embed.js').init(mono, engine);
    modules.soundcloud = require('./soundcloud_com_embed.js').init(mono, engine);
    modules.vkontakte = require('./vkontakte_ru_embed.js').init(mono, engine);
    modules.odnoklassniki = require('./odnoklassniki_ru_embed.js').init(mono, engine);
    modules.facebook = require('./facebook_com_embed.js').init(mono, engine);
    modules.mail_ru = require('./mail_ru_embed.js').init(mono, engine);
    utils = require('./utils.js').init(mono, engine);
    engine.varCache.ffButton = button;

    if (!engine.ffNoStore) {
      engine.ffSovetnik = require('./sovetnik.lib.init.js');
      engine.ffSovetnik.init(mono, engine);
    }

    engine.onEvent('prepare', function() {
      "use strict";
      ffInitPopup();
    });

    origFunc();
  };
})(engine.init);

engine.userTrack = function () {
  var now = Date.now();
  if (engine.varCache.trackTime > now) {
    return;
  }

  var next = function() {
    engine.sendScreenViewStats(null, {
      id: 'init',
      onSuccess: function() {
        "use strict";
        engine.varCache.trackTime = String(now + 12 * 60 * 60 * 1000);
        mono.storage.set({trackTime: engine.varCache.trackTime});

        if (engine.preferences.cohortIndex) {
          engine.cohort.track.sendScreen('init');
        }

        if (engine.preferences.expIndex && [13].indexOf(engine.preferences.expIndex) === -1) {
          engine.sendScreenViewStats({
            tid: 'UA-7055055-11'
          });
        }

        if (engine.preferences.hasAviaBar) {
          engine.sendScreenViewStats({
            tid: 'UA-70432435-1'
          });
        }
      }
    });
  };

  return engine.dblTrackCheck(next);
};

engine.sendScreenViewStats = function(overParams, details) {
  var params = {
    t: 'screenview',
    cd: 'init',
    tid: 'UA-7055055-5'
  };

  for (var key in overParams) {
    params[key] = overParams[key];
  }

  engine.sendStatsInfo(params, details);
};

engine.trackSocial = function(target, action, network) {
  var params = {
    st: target, // /home
    sa: action, // like
    sn: network, // facebook
    t: 'social'
  };

  engine.sendStatsInfo(params);
};

engine.trackEvent = function(category, action, label, overParams) {
  overParams = overParams || {};
  var params = {
    ec: category, // share-button
    ea: action, // click
    el: label, // vk
    t: 'event'
  };

  var noRewrite = overParams.noRewrite;
  delete overParams.noRewrite;

  if (!noRewrite && engine.preferences.expIndex && [13].indexOf(engine.preferences.expIndex) === -1) {
    overParams.tid = 'UA-7055055-11';
  }

  for (var key in overParams) {
    params[key] = overParams[key];
  }

  engine.sendStatsInfo(params);
};

engine.sendStatsInfo = function(params, details) {
  if(!params.t) {
    return;
  }

  var preferences = engine.preferences;

  var defaultParams = {
    v: 1,
    ul: engine.varCache.navigatorLanguage,
    tid: 'UA-67738130-2',
    cid: engine.getUuid(),
    cd3: engine.language.lang,

    an: 'helper',
    aid: engine.varCache.helperName,
    av: engine.varCache.currentVersion
  };

  for (var key in defaultParams) {
    if(!params.hasOwnProperty(key)) {
      params[key] = defaultParams[key];
    }
  }

  if (preferences.expIndex) {
    params.cd1 = 'test_' + preferences.expIndex;
  }

  if (engine.varCache.fromId) {
    params.cd2 = engine.varCache.fromId;
  }

  if (engine.varCache.hasSovetnik) {
    params.cd4 = preferences.sovetnikEnabled ? 'true' : 'false';
  }

  if (preferences.hasDP) {
    params.cd5 = preferences.sovetnikEnabled ? 'true' : 'false';
  }

  params.cd6 = preferences.ummyDetected ? 'true' : preferences.showUmmyItem ? 'false' : 'none';

  if (preferences.hasAviaBar) {
    params.cd7 = preferences.aviaBarEnabled ? 'true' : 'false';
  }

  engine.sendInGa(params, details);
};

engine.checkVersion = function () {
  var needSaveVersion = false;
  if(engine.varCache.isFirstrun) {
    engine.onEvent.ready('firstrun');

    needSaveVersion = true;
  } else
  if(engine.varCache.isUpgrade) {
    engine.onEvent.ready('upgrade');

    needSaveVersion = true;
  }

  if (needSaveVersion) {
    engine.actionList.updateOption({key: 'version', value: engine.varCache.currentVersion});
  }
};

engine.onEvent('firstrun', function() {
  "use strict";
  if (mono.isGM) {
    return;
  }

  var url = 'http://savefrom.net/user.php?helper=' + engine.preferences.sfHelperName + ';firstrun';

  utils.checkUrlsOfOpenTabs([
    /https?:\/\/([\w\-]+\.)?savefrom\.net\/(update-helper|userjs-setup)\.php/i
  ], function(foundUrls) {
    if (foundUrls.length > 0) {
      return;
    }

    utils.checkUrlsOfOpenTabs([
      /https?:\/\/legal\.yandex\.(ru|com\.tr)\//i
    ], function(foundUrls) {
      var active = foundUrls.length === 0;
      mono.openTab(url, active, active);
    });
  });
});

engine.onEvent('prepare', function() {
  "use strict";
  var preferences = engine.preferences;

  if (preferences.showTutorial) {
    mono.storage.get(['onceYtTutorial', 'onceYtTutorialTooltip'], function(storage) {
      if (storage.onceYtTutorial && storage.onceYtTutorialTooltip) {
        mono.storage.set({showTutorial: preferences.showTutorial = 0});
        return;
      }

      if (!storage.onceYtTutorial) {
        engine.actionList.setIconBadge({text: '?'});
      }
    });
  }

  if (preferences.showUmmyLanding) {
    mono.storage.get(['onceUmmyLandingHide'], function(storage) {
      if (storage.onceUmmyLandingHide > 2) {
        mono.storage.set({showUmmyLanding: preferences.showUmmyLanding = 0});
      }
    });
  }
});

engine.onEvent('prepare', function() {
  "use strict";
  if (!mono.isChrome && !mono.isFF) {
    return;
  }

  engine.tabListener.addListener();
});

engine.onEvent('init', function() {
  "use strict";
  if (!mono.isChrome || !chrome.runtime || !chrome.runtime.setUninstallURL) {
    return;
  }

  var varCache = engine.varCache;
  var preferences = engine.preferences;

  var updateUrl = function() {
    var uninstallUrl = 'http://savefrom.net/goodbye.php';

    var params = mono.param({
      version: varCache.currentVersion,
      language: engine.language.lang,
      appid: varCache.helperName,
      country: preferences.country
    });

    var url = (uninstallUrl + '?' + params).substr(0, 255);
    chrome.runtime.setUninstallURL(url);
  };

  updateUrl();

  engine.onEvent('prepare', function() {
    updateUrl();
  });

  engine.onEvent('getCountry', function() {
    updateUrl();
  });
});

engine.onEvent('prepare', function() {
  "use strict";
  if (!mono.isOpera) {
    return;
  }

  engine.operaShowButton(engine.preferences.button);
});

engine.onEvent('prepare', function() {
  "use strict";
  if (!mono.isGM) {
    return;
  }

  if (!mono.isIframe()) {
    engine.menuCommands.register(_moduleName);

    if (engine.preferences.button && engine.preferences[engine.preferenceMap[_moduleName]] || _moduleName === 'savefrom') {
      engine.gmShowButton(1);
    }
  }
});

engine.menuCommands = {
  commands: [
    {
      id: 'downloadFromCurrentPage',
      command: function() {
        engine.actionList.downloadFromCurrentPage();
      }
    }, {
      id: 'updateLinks',
      notify: 'updateLinksNotification',
      modules: ['vk', 'odnoklassniki', 'facebook', 'lm',
        'youtube',
        'dailymotion', 'instagram', 'rutube']
    }, {
      id: 'downloadMP3Files',
      modules: ['vk', 'odnoklassniki', 'mailru']
    }, {
      id: 'downloadPlaylist',
      modules: ['vk', 'odnoklassniki', 'mailru']
    }, {
      id: 'downloadPhotos',
      modules: ['vk']
    }, {
      id: 'showOptions',
      command: function() {
        _options.show();
      }
    }, {
      id: 'reportBug',
      command: function() {
        engine.actionList.reportBug();
      }
    }, {
      id: 'enableDisableModule',
      command: function() {
        engine.actionList.getActiveTabInfo(undefined, function(tabInfo) {
          var state = tabInfo.state ? 0 : 1;
          engine.actionList.viaMenu_changeState({state: state, prefKey: tabInfo.prefKey, moduleName: tabInfo.moduleName});
          if (state) {
            if (engine.preferences.button === 1) {
              engine.gmShowButton(1);
            } else {
              engine.gmShowButton(0);
            }
          } else {
            engine.gmShowButton(0);
          }
        });
      }
    }, {
      id: 'showHideButton',
      command: function() {
        var hiddenBtn = _menu.menu === null;
        engine.actionList.updateOption({action: 'updateOption', key: 'button', value: hiddenBtn ? 1 : 0});
      }
    }
  ],
  registerModule: function (params) {
    if (typeof GM_registerMenuCommand === 'undefined') {
      return;
    }

    var strId = params.id;

    var name = engine.language[strId];

    if(params.command) {
      return GM_registerMenuCommand(name, params.command);
    }

    var fn = function() {
      engine.onMessage({action: ( params.modules !== undefined ? 'viaMenu_' : '' ) + params.id});

      if(params.notify && typeof GM_notification !== 'undefined') {
        GM_notification(engine.language[params.notify], null, null, null, 3000);
      }
    };

    return GM_registerMenuCommand(name, fn);
  },
  register: function (moduleName) {
    var hasRmFunc = typeof GM_unregisterMenuCommand !== "undefined";
    for (var i = 0, item; item = this.commands[i]; i++) {
      if (hasRmFunc) {
        if (item.gmId) {
          GM_unregisterMenuCommand(item.gmId);
        }
      } else
      if (item.hasOwnProperty("gmId")) {
        continue;
      }

      if (!item.modules || item.modules.indexOf(moduleName) > -1) {
        item.gmId = this.registerModule(item);
      }
    }
  }
};

engine.onEvent('prepare', function() {
  "use strict";
  engine.checkUpdate();
});

engine.checkUpdate = function() {
  "use strict";
  engine.varCache.lastVersion = undefined;
  var typeList = engine.checkUpdate.typeList;
  var type = (mono.isChrome && !engine.isOperaNext) ? 'chrome' : (mono.isFF && engine.ffNoStore) ? 'ff' : mono.isGM ? 'gm' : mono.isSafari ? 'safari' : undefined;
  if (!typeList[type]) {
    return;
  }

  var requestVersion = function() {
    mono.ajax({
      type: 'GET',
      url: typeList[type].url,
      dataType: 'text',
      cache: false,
      success: function(data) {
        if (!data || typeof data !== 'string') {
          return;
        }

        var version = typeList[type].getVersion(data);
        if (!version) {
          return;
        }

        engine.varCache.lastVersion = version;

        mono.storage.setExpire({
          lastVersion: version
        }, 604800);
      }
    });
  };

  mono.storage.getExpire(['lastVersion'], function(storage) {
    if (engine.varCache.isUpgrade) {
      delete storage.lastVersion;
    }

    if (storage.hasOwnProperty('lastVersion')) {
      engine.varCache.lastVersion = storage.lastVersion;
      return;
    }

    storage.lastVersion = '';
    mono.storage.setExpire(storage, 86400);

    requestVersion();
  });
};

engine.checkUpdate.typeList = {
  chrome: {
    url: 'http://sf-addon.com/helper/chrome/updates-3.xml',
    getVersion: function(data) {
      var version = data.match(/updatecheck.+version=['"](.+)['"]/);
      version = version && version[1];
      if (!version) {
        return;
      }
      return version;
    }
  },
  ff: {
    url: 'https://sf-addon.com/helper/mozilla/update.rdf',
    getVersion: function(data) {
      var version = data.match(/<em:version>(.+)<\/em:version>/);
      version = version && version[1];
      if (!version) {
        return;
      }
      return version;
    }
  },
  safari: {
    url: 'https://sf-addon.com/helper/safari/update.plist',
    getVersion: function(data) {
      var pos = data.indexOf('<key>CFBundleVersion</key>');
      if (pos === -1) {
        return;
      }
      data = data.substr(pos);
      var version = data.match(/<string>(.+)<\/string>/);
      version = version && version[1];
      if (!version) {
        return;
      }
      return version;
    }
  },
  gm: {
    url: 'https://sf-addon.com/helper/chrome/helper.meta.js',
    getVersion: function(data) {
      var version = data.match(/@version\s+(.+)\s*\r?\n/);
      version = version && version[1];
      if (!version) {
        return;
      }
      return version;
    }
  }
};
engine.forceMetaRequest = true;
engine.onEvent('init', function() {
  "use strict";
  if (mono.isFF && !engine.varCache.ffButton) {
    return;
  }

  var language = engine.language;
  var preferences = engine.preferences;
  var meta = engine.varCache.meta;

  var isDeny = function() {
    if (!preferences.hasDP || !preferences.sovetnikEnabled) {
      return true;
    }

    return false;
  };

  var updateState = function() {
    delete engine.tabListener.extendJsList.dp;

    engine.onEvent('loadLanguage', function() {
      if (!language.origOptionsSovetnikEnabled) {
        language.origOptionsSovetnikEnabled = language.optionsSovetnikEnabled;
      }

      if (preferences.hasDP) {
        language.optionsSovetnikEnabled = 'Offers4U';
      } else {
        language.optionsSovetnikEnabled = language.origOptionsSovetnikEnabled;
      }
    });

    if (isDeny()) {
      return;
    }

    engine.tabListener.extendJsList.dp = dp;

    if (mono.isGM && meta.dp && meta.dp.listExp) {
      preferences.dpListExp = 1;
    }

    engine.tabListener.addListener();
  };

  var dp = {
    getScriptList: function() {
      var list = [];

      if (isDeny()) {
        updateState();
        return list;
      }

      list.push('includes/advisor-sf.js');

      return list;
    }
  };

  var checkCountry = function() {
    var countryList = [
      'ar', 'au', 'at', 'be',
      'br', 'ca', 'co', 'cz',
      'dk', 'fr', 'de', 'hk',
      'hu', 'in', 'id', 'it',
      'jp', 'ke', 'my', 'mx',
      'nl', 'nz', 'ng', 'no',
      'ph', 'pl', 'pt', 'ro',
      'rs', 'sg', 'sk', 'za',
      'es', 'se', 'th', 'gb',
      'us'
    ];

    if (countryList.indexOf(preferences.country) !== -1) {
      return true;
    }

    return false;
  };

  engine.onOptionChange.sovetnikEnabled.dpOnChange = function() {
    updateState();
  };

  var dpIsAvailable = function() {
    if (engine.varCache.hasSovetnik) {
      preferences.hasDP = 0;
    } else
    if (meta.dp && (!meta.dp.enable || meta.dp.cancel)) {
      preferences.hasDP = 0;
    } else {
      preferences.hasDP = checkCountry() ? 1 : 0;
    }
  };

  engine.onEvent('loadSettings', function() {
    var onGetCountry = function() {
      dpIsAvailable();

      updateState();
    };

    onGetCountry();

    engine.onEvent('getCountry', function() {
      onGetCountry();
    });
  });

  engine.onEvent('getMeta', function() {
    dpIsAvailable();

    updateState();
  });

  engine.onEvent.addListener('hasSovetnikUpdate', function() {
    dpIsAvailable();

    updateState();
  });
});
engine.onEvent('init', function() {
  "use strict";
  if (mono.isFF && !engine.varCache.ffButton) {
    return;
  }

  var preferences = engine.preferences;

  var isDeny = function() {
    if (!preferences.hasAviaBar || !preferences.aviaBarEnabled) {
      return true;
    }

    return false;
  };

  var updateState = function() {
    delete engine.tabListener.extendJsList.aviaBar;

    if (isDeny()) {
      return;
    }

    engine.tabListener.extendJsList.aviaBar = aviaBar;

    engine.tabListener.addListener();
  };

  var aviaBar = {
    matchCache: /null/,
    includeList: [
      '*://*.ozon.travel/*',
      '*://*.onetwotrip.com/*',
      '*://*.skyscanner.*/*',
      '*://*.aeroflot.ru/*',
      '*://*.momondo.*/*',
      '*://*.anywayanyday.com/*',
      '*://*.svyaznoy.travel/*',
      '*://avia.tickets.ru/*',
      '*://*.s7.ru/*',
      '*://*.kupibilet.ru/*',
      '*://*.trip.ru/*',
      '*://*.sindbad.ru/*',
      '*://*.aviakassa.ru/*',
      '*://*.biletix.ru/*',
      '*://*.utair.ru/*',

      '*://*.kayak.*/*',
      '*://*.orbitz.com/*',
      '*://*.travelocity.com/*',
      '*://*.expedia.com/*',
      '*://*.priceline.com/*'
    ],
    getScriptList: function(url) {
      var list = [];

      if (isDeny()) {
        updateState();
        return list;
      }

      if (this.matchCache.test(url)) {
        list.push('includes/components.js');
        list.push('includes/aviaBar.js');
      }
      return list;
    }
  };

  aviaBar.matchCache = aviaBar.includeList.map(function(pattern) {
    return mono.urlPatternToStrRe(pattern);
  }).join('|');
  aviaBar.matchCache = new RegExp(aviaBar.matchCache);

  var checkCountry = function() {
    var countryList = [
      'ru', 'by', 'kz', 'ua', 'us'
    ];

    if (countryList.indexOf(preferences.country) !== -1) {
      return true;
    }

    var lang2country = {
      be: 'by', kk: 'kz', ru: 'ru', uk: 'ua'
    };

    var country = lang2country[engine.varCache.navigatorLanguage.substr(0, 2).toLowerCase()];
    if (country) {
      return true;
    }
  };

  engine.onOptionChange.aviaBarEnabled = function() {
    updateState();
  };

  engine.onEvent('loadSettings', function() {
    var onGetCountry = function() {
      preferences.hasAviaBar = checkCountry() ? 1 : 0;

      updateState();
    };

    onGetCountry();

    engine.onEvent(['getCountry'], function() {
      onGetCountry();
    });
  });
});
//@insert

if (mono.isModule) {
  exports.init = engine.init;
} else
mono.onReady(function() {
  if (mono.isGM) {
    engine.initMessageListener();
  } else {
    engine.init();
  }
});
(function() {
  var language = {};
  var preference = {};
  var varCache = {
    icons: {},
    activeTabInfo: {}
  };
  var menuContainer = undefined;

  var translatePage = function() {
    var elList = menuContainer.querySelectorAll('*[data-i18n]');
    for(var i = 0, len = elList.length; i < len; i++) {
      var el = elList[i];
      var key = el.dataset.i18n;
      el.textContent = language[key];
      if (el.classList.contains('label')) {
        el.title = language[key];
      }
    }
  };

  var onModuleToggle = function() {
    var state = varCache.moduleTrigger.classList.contains('disabled') ? 1 : 0;
    setCheckboxState(state);
    var tabInfo = varCache.activeTabInfo;
    tabInfo.state = state;
    if (Array.isArray(tabInfo.prefKey)) {
      for (var i = 0, key; key = tabInfo.prefKey[i]; i++) {
        preference[key] = state;
      }
    } else {
      preference[tabInfo.prefKey] = state;
    }
    mono.sendMessage({action: 'viaMenu_' + 'changeState', state: state ?  1 : 0, prefKey: tabInfo.prefKey, moduleName: tabInfo.moduleName, needInclude: tabInfo.isNotResponse});
    tabInfo.isNotResponse = false;
    updateMenuItem(tabInfo);
  };

  var menuItemAction = function(event) {
    event.preventDefault();
    event.stopPropagation();
    var node = this;

    if (node.classList.contains('inactive')) {
      return;
    }

    var action = node.dataset.action;

    var isModule = node.classList.contains('module');

    if ([1].indexOf(preference.cohortIndex) !== -1) {
      if (['updateLinks', 'downloadPlaylist', 'downloadPhotos', 'downloadMP3Files'].indexOf(action) !== -1) {
        if (['dailymotion', 'facebook', 'mailru', 'odnoklassniki', 'savefrom', 'soundcloud', 'vimeo', 'vk',
            'youtube',
            'instagram', 'rutube'].indexOf(varCache.activeTabInfo.moduleName) !== -1) {
          mono.sendMessage({action: 'trackCohort', category: 'extensionMenu', event: 'click', label: action});
        } else {
          mono.sendMessage({action: 'trackCohort', category: 'sitesNotSupporded', event: action, label: '%domain%'});
        }
      }
    }

    mono.sendMessage({action: 'trackEvent', category: 'extensionMenu', event: 'click', label: action});

    if (action === 'enableModule') {
      return onModuleToggle();
    } else {
      mono.sendMessage({action: (isModule ? 'viaMenu_' : '') + action});
    }

    if (mono.isGM) {
      _menu.hideMenuItems();
      return;
    }
    if (mono.isFF) {
      mono.addon.postMessage('hidePopup');
      return;
    }
    if (mono.isSafari) {
      safari.extension.popovers[0].hide();
      return;
    }
    window.close();
  };

  var updateMenu = function() {
    if (!menuContainer) {
      return;
    }

    updateDescription('showAboutPage');

    mono.sendMessage('getPreference', function(resp) {
      preference = resp;
      updateMenuItem();
    });

    mono.msgClean();
  };

  var setItemState = function (className, show) {
    var li = menuContainer.querySelectorAll('div.' + className);
    for(var i = 0; i < li.length; i++) {
      if (show) {
        li[i].classList.remove('inactive');
      } else {
        li[i].classList.add('inactive');
      }
    }
  };

  var safariBlankLink = function() {
    mono.openTab(this.href, true);
  };

  var updateSafariLinks = function() {
    var links = menuContainer.querySelectorAll('a[href][target="_blank"]');
    for (var i = 0, len = links.length; i < len; i++) {
      links[i].removeEventListener('click', safariBlankLink);
      links[i].addEventListener('click', safariBlankLink);
    }
  };

  var initSocial = function() {
    var targetUrl = 'http://savefrom.net/user.php';
    var url = encodeURIComponent(targetUrl);
    var image = encodeURIComponent('http://savefrom.net/img/icon_100.png');
    var title = encodeURIComponent(language.extName);
    var desc = encodeURIComponent(language.socialDesc);
    var btnList = {
      vk: {
        network: 'vkontakte',
        title: language.shareIn.replace('%w', 'VK'),
        href: 'http://vk.com/share.php?url='+url+'&image='+image+'&title='+title+'&description='+desc
      },
      ok: {
        network: 'odnoklassniki',
        title: language.shareIn.replace('%w', 'OK.ru'),
        href: 'http://www.odnoklassniki.ru/dk?st.cmd=addShare&st.s=1&st._surl='+url+'&st.comments='+desc
      },
      mailru: {
        network: 'mail.ru',
        title: language.shareIn.replace('%w', 'Mail.ru'),
        href: 'http://connect.mail.ru/share?url='+url+'&title='+title+'&description='+desc+'&imageurl='+image
      },
      tw: {
        network: 'twitter',
        title: language.shareIn.replace('%w', 'Twitter'),
        href: 'https://twitter.com/intent/tweet?text='+title+'&url='+url
      },
      fb: {
        network: 'facebook',
        title: language.shareIn.replace('%w', 'Facebook'),
        href: 'http://www.facebook.com/sharer.php?s=100&p[url]='+url+'&p[title]='+title+'&p[summary]='+desc+'&p[images][0]='+image
      },
      gp: {
        network: 'google+',
        title: language.shareIn.replace('%w', 'Google+'),
        href: 'https://plus.google.com/share?url='+url
      },
      lj: {
        network: 'livejournal',
        title: language.shareIn.replace('%w', 'Livejournal'),
        href: 'http://www.livejournal.com/update.bml?subject='+title+'&event='+desc+' '+url
      }
    };
    for (var item in btnList) {
      var link = menuContainer.querySelector('.social-btn.'+item);
      if (!link) {
        continue;
      }
      link.title = btnList[item].title;
      link.href = btnList[item].href;
      link.dataset.network = btnList[item].network;
    }
    link.parentNode.addEventListener('click', function(e) {
      var btn = e.target;
      if (!btn.classList.contains('social-btn')) {
        return;
      }
      var network = btn.dataset.network;
      mono.sendMessage({action: 'trackSocial', target: targetUrl, event: 'share', network: network});
    });
  };

  var setModuleBtnState = function(tabInfo) {
    setItemState(tabInfo.moduleName, true);

    if (tabInfo.moduleName === 'youtube') {
      setItemState('plYoutube', false);
      var isPlaylist = false;
      var url = tabInfo.url;
      if (url.indexOf('/playlist?') !== -1) {
        isPlaylist = true;
      } else
      if ((/[?&]{1}list=/).test(url)) {
        isPlaylist = true;
      } else {
        var matched = url.match(/(user|channel|show)\/[^\/]+(\/feed|\/featured|\/videos|$)/i);
        if (!matched) {
          matched = url.match(/\/(feed)\/(subscriptions|history)/i);
        }
        if (!matched || matched.length < 3) {
          isPlaylist = false;
        } else {
          isPlaylist = true;
        }
      }
      if (isPlaylist) {
        setItemState('plYoutube', true);
      }
    }
  };

  var onGetTabInfo = function(tabInfo, force) {
    varCache.activeTabInfo = tabInfo;

    if (tabInfo.moduleName) {
      setCheckboxState(tabInfo.state);
      setItemState('enableModule', true);
    }

    if (['odnoklassniki'].indexOf(tabInfo.moduleName) !== -1) {
      setItemState('bookmarklet', false);
    }

    if (tabInfo.state) {
      setModuleBtnState(tabInfo);
    }

    if (tabInfo.moduleName === 'savefrom') {
      setCheckboxState('force');
      setItemState('enableModule', false);
    }

    if (!force) {
      tabInfo.isNotResponse = true;
      mono.sendMessage({action: 'getActiveTabModuleInfo', url: tabInfo.url}, function(moduleInfo) {
        tabInfo.isNotResponse = false;
        if (moduleInfo.moduleName !== tabInfo.moduleName) return;
        moduleInfo.url = tabInfo.url;

        setCheckboxState(moduleInfo.state);

        if (moduleInfo.state) {
          setModuleBtnState(moduleInfo);
        } else {
          setItemState('module', false);
        }
      });
    }
  };

  var updateMenuItem = function(moduleInfo) {
    setItemState('module', false);
    setItemState('bookmarklet', true);
    setItemState('enableModule', false);
    setCheckboxState(0);

    varCache.activeTabInfo = {};

    if (moduleInfo) {
      onGetTabInfo(moduleInfo, 1);
    } else {
      mono.sendMessage('getActiveTabInfo', onGetTabInfo);
    }

    if (preference._safariUpdateWarning && typeof safariUpdateWarning !== 'undefined') {
      safariUpdateWarning();
    }
  };

  var setIconState = function(el, state) {
    var type = el.getAttribute('data-type');
    var path = el.querySelector('path');
    if (state === 'hover') {
      path.setAttribute('fill', '#ffffff');
    } else
    if (state === 'active') {
      path.setAttribute('fill', '#AAAAAA');
    } else
    if (state) {
      if (type === 'downloadMP3Files') {
        path.setAttribute('fill', '#00CCFF');
      } else
      if (type === 'downloadPlaylist') {
        path.setAttribute('fill', '#77D1FA');
      } else
      if (type === 'downloadPhotos') {
        path.setAttribute('fill', '#88cb66');
      } else
      if (type === 'showAboutPage') {
        path.setAttribute('fill', '#ADE61B');
      } else
      if (type === 'updateLinks') {
        path.setAttribute('fill', '#CB7FBD');
      } else
      if (type === 'downloadFromCurrentPage') {
        path.setAttribute('fill', '#CB7FBD');
      }
    }
  };

  var updateDescription = function(action, label) {
    var desc = varCache.desc;
    var text = varCache.deskText;
    var title = varCache.descTitel;
    var more = varCache.descMore;
    desc.dataset.page = action;

    var icon = varCache.icons[ action ];
    var subIcon = desc.querySelector('.icon');
    if (icon) {
      var _icon = icon.cloneNode(true);
      setIconState(_icon, 'active');
      if (subIcon) {
        subIcon.parentNode.replaceChild(_icon, subIcon);
      }
      subIcon.style.visibility = 'visible';
    } else {
      subIcon.style.visibility = 'hidden';
    }
    if (action === 'showAboutPage') {
      title.textContent = language.aboutTitle;
      text.textContent = '';
      var aboutText = mono.create('p', {text: language.aboutDescription});
      var linkSupport = mono.create('a', {href: 'http://savefrom.net/faq.php#supported_resourses', target: '_blank', text: language.aboutSupported});
      var linkHome = mono.create('a', {href: 'http://savefrom.net/user.php?helper=' + varCache.browser, target: '_blank', text: language.homePage});
      linkSupport.style.display = 'block';
      linkHome.style.display = 'block';
      text.appendChild(aboutText);
      text.appendChild(linkSupport);
      text.appendChild(linkHome);
      more.style.display = 'none';
    } else {
      title.textContent = label;
      text.textContent = language['menu'+mono.capitalize(action)] || '';
      more.style.display = 'block';
    }
    if (mono.isSafari) {
      updateSafariLinks();
    }
  };

  var onReady = function() {
    translatePage();

    varCache.descMore.href = 'http://savefrom.net/user.php?helper=' + varCache.browser;

    var el = menuContainer.querySelectorAll('div[data-action]');
    for(var i = 0; i < el.length; i++) {
      var icon = el[i].querySelector('svg');
      if (icon) {
        varCache.icons[ el[i].dataset.action ] = icon;
        setIconState(icon, 1);
      }
      if (el[i].style.display === 'none') continue;
      el[i].addEventListener('click', menuItemAction, false);
      mono.on(el[i], 'mouseenter', function(e) {
        var action = this.dataset.action;
        var icon = varCache.icons[ action ];
        if (icon) {
          setIconState(icon, 'hover');
        }
        var span = this.querySelector('span');
        var title = '';
        if (span) {
          title = span.textContent;
        }
        updateDescription(action, title);
      });
      mono.on(el[i], 'mouseleave', function(e) {
        var action = this.dataset.action;
        var icon = varCache.icons[ action ];
        if (icon) {
          setIconState(icon, 1);
        }
      });
    }

    initSocial();
    if (mono.isSafari) {
      updateSafariLinks();
    }

    updateDescription('showAboutPage');

    updateMenuItem();

    menuContainer.classList.remove('loading');
  };

  var setCheckboxState = function(state) {
    if (state === 'force') {
      varCache.moduleTrigger.classList.add('enableForce');
    } else {
      varCache.moduleTrigger.classList.remove('enableForce');
    }
    if (state) {
      varCache.moduleTrigger.classList.remove('disabled');
      varCache.moduleTrigger.nextElementSibling.textContent = language.disableModule;
    } else {
      varCache.moduleTrigger.classList.add('disabled');
      varCache.moduleTrigger.nextElementSibling.textContent = language.enableModule;
    }
    if (varCache.desc.dataset.page !== 'showAboutPage') {
      updateDescription('enableModule', state ? language.disableModule : language.enableModule);
    }
  };

  var tutorial = {
    show: function() {
      "use strict";
      if (!SaveFrom_Utils.tutorialTooltip) {
        return;
      }

      if (!preference.showTutorial) {
        return;
      }

      if (mono.isGM) {
        mono.storage.set({onceYtTutorial: 1});
        return;
      }

      mono.storage.get('onceYtTutorial', function(storage) {
        if (storage.onceYtTutorial) {
          return;
        }
        storage.onceYtTutorial = 1;

        SaveFrom_Utils.tutorial.show({
          container: menuContainer,
          width: 482,
          height: 404 + (mono.isGM ? 2 : 0),
          padding: 4,
          slideList: SaveFrom_Utils.tutorial.getYtSlideList('black'),
          onClose: function() {
            mono.storage.set(storage);

            mono.sendMessage({action: 'setIconBadge', text: ''});
          },
          checkExists: function(cb) {
            mono.storage.get('onceYtTutorial', function(storage) {
              if (storage.onceYtTutorial) {
                return cb(1);
              }
              cb();
            });
          },
          trackId: 'Menu',
          boxStyle: {
            backgroundColor: 'transparent'
          },
          containerStyle: {
            borderRadius: '3px',
            backgroundColor: 'rgba(0, 104, 255, 0.9)',
            padding: 0,
            margin: '4px',
            boxShadow: 'none'
          },
          slideStyle: {
            backgroundColor: 'transparent',
            borderRadius: 0
          },
          leftBtnStyle: {
            top: '4px',
            left: '4px'
          },
          rightBtnStyle: {
            top: '4px',
            right: '4px'
          },
          closeBtnStyle: {
            backgroundColor: '#fff',
            color: 'rgba(0, 104, 255, 0.9)'
          },
          cssStyle: {
            ' .sf-dots': {
              'paddingTop': '2px'
            },
            ' .sf-dot i': {
              backgroundColor: '#fff'
            },
            ' .sf-dot.active i': {
              backgroundColor: 'transparent',
              borderRadius: '6px',
              margin: '-1px',
              width: '6px',
              height: '6px',
              border: '2px solid #fff'
            },
            ' .sf-slider-conteiner span': {
              color: '#fff !important'
            },
            ' .sf-slider-conteiner a': {
              color: '#fff !important'
            }
          },
          arrowColor: '#fff',
          arrowColorActive: '#fff',
          onResize: function(details) {
            details.box.style.position = 'absolute';
          },
          withOpacity: true,
          withDelay: 250,
          onShow: function() {
            mono.isSafari && updateSafariLinks();

            mono.sendMessage({action: 'setIconBadge', text: '?'});
          }
        });
      });
    }
  };

  var run = function(parent) {
    menuContainer = (parent || document).getElementsByClassName('sf-menu-container')[0];
    if (!menuContainer) {
      return;
    }

    setTimeout(function() {
      menuContainer.classList.remove('loading');
    }, 1000);

    varCache.list = menuContainer.querySelector('.sf-menu-list');
    varCache.desc = menuContainer.querySelector('.sf-menu-desc');
    varCache.descTitel = varCache.desc.querySelector('.title');
    varCache.deskText = varCache.desc.querySelector('.desc');
    varCache.descMore = varCache.desc.querySelector('.more');
    var version = varCache.desc.querySelector('.version');


    varCache.list.style.height = varCache.list.offsetHeight + 'px';

    mono.sendMessage(['getLanguage', 'getPreference', 'getVersion', 'getLastVersionInfo', 'getBrowser'], function(response) {
      language = response.getLanguage;
      preference = response.getPreference;

      mono.global.language = language;
      mono.global.preference = preference;

      varCache.browser = response.getBrowser;

      version.textContent = '';
      mono.create(version, {
        append: [
          mono.create('span', {
            text: language.aboutVersion+' '+response.getVersion
          }),
          !response.getLastVersionInfo ? undefined : mono.create('a', {
            text: language.updateTo.replace('%d', response.getLastVersionInfo),
            href: 'http://savefrom.net/user.php?helper=' + varCache.browser + '&update=' + response.getVersion,
            target: '_blank',
            on: ['click', function() {
              mono.sendMessage({action: 'trackEvent', category: 'extensionMenu', event: 'click', label: 'updateVersion'});
            }]
          })
        ]
      });

      if (['en', 'uk', 'ru'].indexOf(language.lang) === -1) {
        menuContainer.classList.add('no-poll');
      }

      varCache.moduleTrigger = menuContainer.querySelector('.sf-checkbox');

      tutorial.show();

      onReady();
    });
  };

  mono.onReady(function() {
    mono.onMessage(function (mesasge, response) {
      if (mesasge === 'updateMenu') {
        updateMenu();
      }
    });

    if (mono.isGM) {
      _menu.initMenu = run;
    } else
    if (mono.isSafari) {
      safari.application.addEventListener('popover', function () {
        if (!varCache.first) {
          varCache.first = 1;
          run();
        } else {
          updateMenu();
        }
      }, true);
    } else {
      run();
    }
  });

  //@insert
})();

var dailymotion_com_embed = {
  getDailymotionLinks: function (request, callback)
  {
    function callback_links(data)
    {
      if (!data) {
        data = {};
      }
      var response = {
        action: request.action,
        extVideoId: request.extVideoId,
        links: data.links,
        title: data.title,
        duration: data.duration,
        thumb: data.thumb
      };

      callback(response);
    }

    dailymotion_com_embed.getEmbedVideoInfo(request.extVideoId, callback_links)
  },

  getPlayerV5Links: function(text, cb, noRead) {
    var metadata;
    try {
      var scriptList = mono.getPageScript(text, /playerV5/)[0];
      var jsonList = scriptList && mono.findJson(scriptList)[0];
      if (jsonList && jsonList.metadata) {
        metadata = jsonList.metadata;
      } else {
        metadata = JSON.parse(text.replace(/\r?\n/g, '').match(/\.playerV5\s+=[^{]+({.+}})\);/)[1]).metadata;
      }
      delete metadata.qualities.auto;
    } catch (e) {
      return cb();
    }

    var qualities = metadata.qualities;

    var links = [];
    var info = {
      title: metadata.title,
      duration: metadata.duration,
      thumb: metadata.poster_url,
      links: undefined
    };

    for (var size in qualities) {
      var linkList = qualities[size];
      if (!Array.isArray(linkList)) continue;

      for (var i = 0, item; item = linkList[i]; i++) {
        if (!/mp4|flv/.test(item.type) || !item.url) {
          continue;
        }
        if (!noRead) {
          var linkObj = dailymotion_com_embed.readLink(item.url);
          linkObj && links.push(linkObj);
        } else {
          links.push(item.url);
        }
      }
    }

    if (links.length) {
      if (!noRead) {
        links.sort(function(a,b) {
          return a.height < b.height;
        });
      }
      info.links = links;
    }

    cb(info);
  },

  readLink: function(url) {
    url = url.replace(/\\\//g, '/');
    url = url.replace(/\@\@[\w\-]+$/, '');
    var size = '';
    var t = url.match(/\/cdn\/\w+\-(\d+x\d+)\//i);
    if(t && t.length > 1)
    {
      size = t[1];
    }
    else
    {
      t = url.match(/\D(\d+x\d+)\D/i);
      if(t && t.length > 1)
      {
        size = t[1];
      }
    }

    var ext = 'FLV';
    t = url.match(/\.(\w{1,6})(?:$|\?)/);
    if(t && t.length > 1)
    {
      ext = t[1].toUpperCase();
    }

    if(size !== '80x60')
    {
      var height = parseInt(size.split('x').slice(-1)[0]);
      return {url: url, name: ext+' '+height, ext: ext, info_url: '', height: height};
    }
  },

  getLinks: function(text, cb, noRead)
  {
    var about = {};
    var links = [];
    var info = text.match(/(?:var|,)\s*info\s*=\s*\{(.*?)\}\s*(?:;|,\s*\w+\s*=)/i);

    if(!info || info.length < 2) {
      return dailymotion_com_embed.getPlayerV5Links(text, cb, noRead);
    }
    info = info[1];
    try {
      info = JSON.parse('{' + info + '}');
      if(!info) {
        return cb();
      }
      about.title = info.title;
      about.duration = info.duration;
      about.thumb = info.thumbnail_medium_url;
      for(var i in info)
      {
        if (!info.hasOwnProperty(i)) {
          continue;
        }
        if (typeof info[i] !== 'string') {
          continue;
        }
        if(info[i].search(/^https?:\/\/[^\s\"]+\.(mp4|flv)(\?|$)/) > -1)
        {
          if (noRead) {
            links.push(info[i]);
          } else {
            var link = dailymotion_com_embed.readLink(info[i]);
            if (link !== undefined) {
              links.push(link);
            }
          }
        }
      }
    } catch(e){}
    if (links.length > 0) {
      if (!noRead) {
        links.sort(function(a,b) {
          return a.height < b.height;
        });
      }
      about.links = links;
    }
    cb(about);
  },

  getDailymotionEmbedVideoInfoMsg: function(message, cb) {
    mono.ajax({
      url: message.url,
      success: function (data) {
        if (!data) {
          return cb();
        }

        dailymotion_com_embed.getLinks(data, cb, true);
      },
      error: function () {
        cb();
      }
    });
  },

  getEmbed: function(url, cb) {
    mono.ajax({
      url: url,
      success: function(data) {
        if (!data) {
          return cb();
        }

        dailymotion_com_embed.getLinks(data, cb);
      },
      error: function() {
        cb();
      }
    });
  },

  getEmbedVideoInfo: function (id, callback) {
    var url = "http://www.dailymotion.com/embed/video/" + id;
    dailymotion_com_embed.getEmbed(url, callback);
  }
};

if (typeof window === 'undefined') {
  exports.init = function(_mono, _engine) {
    mono = _mono;
    engine = _engine;
    return dailymotion_com_embed;
  };
} else {
  engine.modules.dailymotion = dailymotion_com_embed;
}

var odnoklassniki_ru_embed = {
  getOdnoklassnikiLinks: function (request, callback)
  {
    function callback_links(links)
    {
      var response = {
        action: request.action,
        extVideoId: request.extVideoId,
        links: links,
        title: request.title
      };

      callback(response);
    }

    odnoklassniki_ru_embed._getOdnoklassnikiLinks(request.extVideoId, callback_links);
  },

  getOdnoklassnikiAudioLinks: function (request, callback)
  {
    function callback_links(data)
    {
      var response = {
        action: request.action,
        trackId: request.trackId,
        jsessionId: request.jsessionId,
        data: data
      };

      callback(response);
    }

    odnoklassniki_ru_embed._getOdnoklassnikiAudioLinks(request.url, request.trackId, request.jsessionId, callback_links);
  },

  _getOdnoklassnikiLinks: function(extVideoId, callback)
  {
    if(!extVideoId)
    {
      callback(null);
      return;
    }

    var url = 'http://in.video.mail.ru/cgi-bin/video/oklite?eid=' + extVideoId;

    mono.ajax({
      url: url,
      success: function(data, xhr) {
        if (!data) {
          return callback(null);
        }
        var u = 'http://www.okcontent.video.mail.ru/media/';

        var host = data.match(/\$vcontentHost=([^\s\"'\<\>]+)/i);
        if(host && host.length > 1)
          u = 'http://' + host[1] + '/media/';

        u += extVideoId;

        var links = [];

        var quality = '';
        var qulityMatch = data.match(/\$height=([0-9]+)/);
        if(qulityMatch && qulityMatch.length > 1) {
          quality = qulityMatch[1];
        }

        links.push({
          url: u + '-v.mp4',
          name: 'SD',
          ext: 'FLV',
          subname: quality
        });

        if(data.search(/\$HDexist=1/i) > -1)
        {
          quality = '';
          var qulityMatch = data.match(/\$HDheight=([0-9]+)/);
          if(qulityMatch && qulityMatch.length > 1) {
            quality = qulityMatch[1];
          }

          links.push({
            url: u + '-hv.mp4',
            name: 'HD',
            ext: 'MP4',
            subname: quality
          });
        }

        if(links)
        {
          callback(links);
        }
      },
      error: function(xhr) {
        callback(null);
      }
    });
  },

  _getOdnoklassnikiAudioLinks: function(pageUrl, trackId, jSessionId, cb)
  {
    if(!trackId || !jSessionId) {
      return cb(null);
    }

    mono.ajax({
      url: 'http://wmf1.odnoklassniki.ru/play;jsessionid=' + jSessionId + '?tid=' + trackId + '&',
      success: function(data) {
        var obj;
        try {
          obj = JSON.parse(data);
        } catch (e) {}
        cb(obj);
      },
      error: function() {
        cb(null);
      }
    });
  },

  getOkAudioListLinks: function(msg, cb) {
    var responseList = [];
    var trackIdList = msg.trackIdArr;
    var jSessionId = msg.jsessionId;
    if(!Array.isArray(trackIdList) || typeof jSessionId !== 'string'  || !trackIdList.length) {
      return cb(responseList);
    }

    var waitCount = trackIdList.length;
    var readyCount = 0;
    var onReady = function() {
      readyCount++;
      if (readyCount !== waitCount) {
        return;
      }
      return cb(responseList);
    };
    var onGetData = function(data) {
      if (data) {
        responseList.push(data);
      }
      onReady();
    };
    for (var i = 0, trackId; trackId = trackIdList[i]; i++) {
      this._getOdnoklassnikiAudioLinks(undefined, trackId, jSessionId, onGetData);
    }
  },

  getClipyouLinks: function(id, hash, quality, title, cb) {
    mono.ajax({
      dataType: 'json',
      url: 'http://media.clipyou.ru/api/player/secure_link?record_id='+id+'&type=mp4&resource_hash='+hash,
      success: function(data) {
        if (!data || !data.data || data.data.length === 0) {
          return cb();
        }
        var links = [];
        data.data.forEach(function(item) {
          links.push({
            quality: quality,
            url: item,
            title: title
          });
        });
        cb(links);
      },
      error: function() {
        cb();
      }
    });
  },

  getClipyouHash: function(id, cb) {
    mono.ajax({
      url: 'http://media.clipyou.ru/api/player_data.json?id='+id,
      success: function(data, xhr) {
        if (!xhr.responseText) {
          return cb();
        }

        var content = xhr.responseText;
        if (!content) {
          return cb();
        }
        var data = content.match('resource_hash".?:.?"([^"]*)"');
        if (!data || data.length < 2) {
          return cb();
        }
        var hash = data[1];
        cb(hash)
      },
      error: function() {
        cb();
      }
    });
  },

  getPladformVideo: function(message, cb) {
    "use strict";
    var response = {
      action: message.action,
      extVideoId: message.extVideoId,
      links: [],
      title: message.title
    };

    var dune = function() {
      cb(response);
    };

    var playerId = message.extVideoId.playerId;
    var videoId = message.extVideoId.videoId;

    mono.ajax({
      mimeType: 'text/xml',
      url: 'http://out.pladform.ru/getVideo?pl='+playerId+'&videoid='+videoId,
      success: function(data, xhr) {
        var xml = xhr.responseXML;
        if (!xml) {
          return dune();
        }

        var srcList = xml.querySelectorAll('src');
        if (srcList.length === 0) {
          return dune();
        }

        var cover = xml.querySelector('cover') || undefined;
        if (cover && (cover = cover.textContent) && cover.substr(0, 2) === '//') {
          cover = 'http:' + cover;
        }

        var time = xml.querySelector('time') || undefined;
        time = time && time.textContent;

        var title = xml.querySelector('title');
        title = title && title.textContent;
        if (title) {
          response.title = title;
        }

        var firstLink = srcList[0];
        var type = firstLink.getAttribute('type');
        var id = firstLink.textContent || '';
        var quality = firstLink.getAttribute('quality');
        if (firstLink) {
          if (type === 'clipyou') {
            odnoklassniki_ru_embed.getClipyouHash(id, function(hash) {
              if (!hash) {
                return dune();
              }

              odnoklassniki_ru_embed.getClipyouLinks(id, hash, quality, title, function(links) {
                response.links = links;

                dune();
              });
            });
            return;
          } else
          if (type === 'rutube') {
            var externalEmbed = xml.querySelector('external_embed');
            externalEmbed = externalEmbed && externalEmbed.textContent;
            if (externalEmbed) {
              response.action = 'getRutubeLinks';
              response.links = [externalEmbed];
            }

            return dune();
          }
        }

        var qualityList = ['ld', 'sd'];
        var sizeList = ['360', '720'];

        for (var i = 0, src; src = srcList[i]; i++) {
          id = src.textContent || '';
          quality = src.getAttribute('quality');

          if (/^\d+p$/.test(quality)) {
            quality = quality.match(/^(\d+)p$/)[1];
          }

          var qIndex = qualityList.indexOf(quality);
          if (qIndex !== -1) {
            quality = sizeList[qIndex];
          }

          type = src.getAttribute('type');

          if (type === 'video') {
            response.links.push({url: id, quality: quality, title: title, cover: cover, duration: time});
          }
        }

        return dune();
      },
      error: function() {
        dune();
      }
    })
  },

  getOkMetadata: function(message, cb) {
    var url = message.url;
    if (!url) {
      return cb();
    }
    mono.ajax({
      url: url,
      success: function(data) {
        var obj;
        try {
          obj = JSON.parse(data);
        } catch (e) {}
        cb(obj);
      },
      error: function() {
        cb();
      }
    });
  },

  getOkViaMobile: function(message, cb) {
    "use strict";
    var metadata = message.metadata;
    var params = {
      'st.cmd': 'movieLayer',
      'st.mvId': message.mvId
    };
    var url = 'http://m.ok.ru/dk?' + mono.param(params);

    var response = {
      action: message.action,
      links: null,
      title: metadata.movie.title
    };

    mono.ajax({
      url: url,
      success: function(data) {
        if (typeof data !== 'string') {
          return cb();
        }

        var r = new RegExp('href="([^"]+st\\.cmd=moviePlaybackRedirect[^"]+st\\.mvid='+message.mvId+'[^"]+)"');
        var moviePlaybackRedirect = data.match(r);
        moviePlaybackRedirect = moviePlaybackRedirect && moviePlaybackRedirect[1];
        if (!moviePlaybackRedirect) {
          return cb();
        }

        moviePlaybackRedirect = mono.fileName.decodeSpecialChars(moviePlaybackRedirect);

        response.links = [{url: moviePlaybackRedirect}];

        if (!/st.mq=\d+/.test(moviePlaybackRedirect)) {
          return cb(response);
        }

        var videos = metadata.videos;
        if (!videos || !videos.length) {
          return cb(response);
        }

        videos.forEach(function(item) {
          if (!item.url) {
            return;
          }

          var params = mono.parseUrlParams(item.url);
          if (params.type === undefined) {
            return;
          }

          item.url = moviePlaybackRedirect.replace(/(st.mq=)\d+/, '$1' + params.type);
        });

        response.links = videos;

        cb(response);
      },
      error: function() {
        cb();
      }
    });
  },

  okDirectOrMobile: function(message, cb) {
    "use strict";
    var metadata = message.metadata;
    var url = null;
    metadata.videos && metadata.videos.some(function(item) {
      if (item.url) {
        url = item.url;
        return true;
      }
    });

    var onAbort = function() {
      message.action = 'getOkViaMobile';
      odnoklassniki_ru_embed.getOkViaMobile(message, cb);
    };

    if (!url) {
      return onAbort();
    }

    mono.ajax({
      url: url,
      type: 'HEAD',
      success: function() {
        message.action = 'getOkViaMobileNoWrap';
        message.links = metadata.videos;
        return cb(message);
      },
      error: function() {
        onAbort();
      }
    })
  }
};

if (typeof window === 'undefined') {
  exports.init = function(_mono, _engine) {
    mono = _mono;
    engine = _engine;
    return odnoklassniki_ru_embed;
  };
} else {
  engine.modules.odnoklassniki = odnoklassniki_ru_embed;
}

var soundcloud_com_embed = {
  getSoundcloudTrackInfo: function (request, callback)
  {
    function callback_links(data, isValid)
    {
      var response = {
        action: request.action,
        trackUrl: request.trackUrl,
        client_id: request.client_id,
        data: data,
        checkLinks: isValid
      };

      callback(response);
    }

    soundcloud_com_embed._getSoundcloudTrackInfo(request.trackUrl, request.client_id, callback_links);
  },

  _getSoundcloudTrackInfo: function (trackUrl, client_id, callback)
  {
    if(!trackUrl || !client_id)
    {
      callback(null);
      return;
    }

    var url = 'http://api.soundcloud.com/resolve.json?url=' + trackUrl +
      '&client_id=' + client_id;

    mono.ajax({
      url: url,
      dataType: 'json',
      headers: {
        Referer: url
      },
      success: function(data) {
        soundcloud_com_embed.checkSoundcloudLinks(data, client_id, callback);
      },
      error: function() {
        callback();
      }
    });
  },

  checkSoundcloudLinks: function (data, client_id, cb) {
    if (!data) {
      return cb();
    }
    var info = data;

    if(info.kind !== 'track' && info.tracks && info.tracks.length === 1) {
      info = info.tracks[0];
    }

    if(info.kind === 'track' && info.stream_url) {
      soundcloud_com_embed.validateSoundcloudTrackUrl(info.stream_url, client_id, function (isValid) {
        cb(data, isValid);
      });
      return;
    }

    if (info.tracks && info.tracks[0]) {
      soundcloud_com_embed.validateSoundcloudTrackUrl(info.tracks[0].stream_url, client_id, function(isValid) {
        cb(data, isValid);
      });
      return;
    }

    return cb(data);
  },

  validateSoundcloudTrackUrl: function (url, client_id, cb) {
    url += (url.indexOf('?') === -1) ? '?' : '&';
    url += 'client_id=' + client_id;
    mono.ajax({
      url: url,
      type: 'HEAD',
      success: function() {
        cb(true);
      },
      error: function() {
        cb(false);
      }
    });
  }
};

if (typeof window === 'undefined') {
  exports.init = function(_mono, _engine) {
    mono = _mono;
    engine = _engine;
    return soundcloud_com_embed;
  };
} else {
  engine.modules.soundcloud = soundcloud_com_embed;
}

var vimeo_com_embed = {
  getVimeoLinks: function(request, callback) {
    "use strict";
    function callback_links(links, title, thumb) {
      var response = {
        action: request.action,
        extVideoId: request.extVideoId,
        links: links,
        title: title,
        thumb: thumb
      };

      callback(response);
    }

    vimeo_com_embed._getVimeoLinks(request.extVideoId, callback_links);
  },
  _getVimeoLinks: function(videoId, callback) {
    "use strict";
    vimeo_com_embed.getVimeoNoEmbedLinks(videoId, function(links, title, thumb){
      if(links) {
        return callback(links, title, thumb);
      }

      vimeo_com_embed.getVimeoEmbedLinks(videoId, callback);
    });
  },
  getVimeoEmbedLinks: function(videoId, callback) {
    "use strict";
    var abort = function() {
      return callback(null, '', '');
    };

    mono.ajax({
      url: 'https://player.vimeo.com/video/' + videoId,
      success: function(data) {
        if (!data) {
          return abort();
        }

        var jsonList = mono.findJson(data, [/"files":/]);
        var config = null;
        jsonList.some(function(obj) {
          "use strict";
          if (!obj.video || !obj.request || !obj.request.files) {
            return;
          }

          config = obj;
          return true;
        });

        data = vimeo_com_embed.getLinksFromConfig(config);
        if (data) {
          return callback(data.links, data.title, data.thumb);
        }

        return abort();
      },
      error: function() {
        return abort();
      }
    });
  },
  getConfig: function(url, cb) {
    "use strict";
    var abort = function() {
      return cb(null, '', '');
    };

    mono.ajax({
      url: url,
      success: function(data) {
        if (!data) {
          return abort();
        }

        data = vimeo_com_embed.getVimeoDataFromConfig(data);
        if(data) {
          return cb(data.links, data.title, data.thumb);
        }

        return abort();
      },
      error: function() {
        return abort();
      }
    });
  },
  getClipPageConfig: function(data, cb) {
    "use strict";
    var abort = function() {
      return cb(null, '', '');
    };

    var configUrl = null;
    var scriptList = mono.getPageScript(data, /['"]config_url['"]\s*:\s*/);
    scriptList.some(function(script) {
      var configList = mono.findJson(script, /['"]config_url['"]\s*:\s*/);
      return configList.some(function(config) {
        if (config.player) {
          configUrl = config.player.config_url;
          if (configUrl) {
            return true;
          }
        }
      });
    });

    if (configUrl) {
      return vimeo_com_embed.getConfig(configUrl, cb);
    }

    return abort();
  },
  getVimeoNoEmbedLinks: function(videoId, cb) {
    "use strict";
    var abort = function() {
      return cb(null, '', '');
    };

    mono.ajax({
      url: 'https://vimeo.com/' + videoId,
      success: function(data) {
        if (!data) {
          return abort();
        }

        var configUrl = data.match(/data-config-url=["']([^\s"'<>]+)/i);
        configUrl = configUrl && configUrl[1].replace(/&amp;/ig, '&');

        if(configUrl) {
          vimeo_com_embed.getConfig(configUrl, cb);
        } else {
          vimeo_com_embed.getClipPageConfig(data, cb);
        }
      },
      error: function() {
        return abort();
      }
    });
  },
  getLinksFromConfig: function(config) {
    "use strict";
    if (!config || !config.video || !config.request || !config.request.files) {
      return null;
    }

    var video = config.video;
    var files = config.request.files;

    var data = {};

    data.title = video.title || '';

    var maxSize = null;
    for (var size in video.thumbs) {
      if (maxSize === null || maxSize < size) {
        maxSize = size;
        data.thumb = video.thumbs[size];
      }
    }

    data.links = [];

    for (var type in files) {
      if (!Array.isArray(files[type])) {
        continue;
      }
      files[type].forEach(function(item) {
        if (!item || !item.url || !item.mime) {
          return;
        }

        var ext = item.mime.split('/')[1];
        if (!ext) {
          ext = item.url.match(/\.(\w{2,4})(?:\?|#|$)/i);
          ext = ext && ext[1] || 'mp4';
        }

        var name = item.quality;
        if (/^\d+p$/.test(name)) {
          name = name.replace(/p$/, '');
        }

        data.links.push({
          url: item.url,
          name: name,
          type: ext.toUpperCase(),
          format: ext.toUpperCase(),
          ext: ext
        });
      });
    }

    if (!data.links.length) {
      data = null;
    }

    return data;
  },
  getVimeoDataFromConfig: function(config) {
    "use strict";
    config = config.replace(/(\{|,)\s*(\w+)\s*:/ig, '$1"$2":').
      replace(/(:\s+)\'/g, '$1"').replace(/\'([,\]\}])/g, '"$1');

    try {
      config = JSON.parse(config);
    } catch(err) {
      return null;
    }

    return this.getLinksFromConfig(config);
  }
};

if (typeof window === 'undefined') {
  exports.init = function(_mono, _engine) {
    mono = _mono;
    engine = _engine;
    return vimeo_com_embed;
  };
} else {
  engine.modules.vimeo = vimeo_com_embed;
}

var vkontakte_ru_embed = {
  getVKLinks: function (request, callback)
  {
    function callback_links(vid, links, title, duration, thumb, data, embed)
    {
      if(embed)
      {
        embed.origRequest = request;
        engine.onMessage(embed, callback);
        return;
      }

      var response = {
        action: request.action,
        extVideoId: vid ? vid : request.extVideoId,
        links: links,
        title: title,
        duration: duration,
        thumb: thumb,
        data: data,
        checkLinks: null
      };

      if(request.checkLinks && links && links.length > 0)
      {
        vkontakte_ru_embed.checkVkLinks(links, function(checkUrl, isValid, status){
          response.checkLinks = isValid;
          callback(response);
        });
        return;
      }

      callback(response);
    }

    vkontakte_ru_embed._getVKLinks(request.extVideoId, callback_links);
  },

  preparePladformLinks: function(pladformLinks) {
    var links;
    var obj = {
      links: links = []
    };
    pladformLinks.forEach(function(item) {
      obj.title = item.title;
      obj.duration = item.duration;
      obj.thumb = item.cover;

      var ext = item.url.match(/[\w]+\.(mp4|flv)(?:\?|$)/i);
      if (!ext) {
        ext = 'flv';
      } else {
        ext = ext[1];
      }
      links.push({
        url: item.url,
        name: ext.toUpperCase(),
        subname: item.quality.toUpperCase(),
        type: ext.toLowerCase()
      });
    });
    return obj;
  },

  _getVKLinks: function (videoId, callback) {
    var links = [], title = videoId, duration = '', thumb = '', data = null, embed = null;

    var vid = videoId;
    if(vid.search(/^video-?\d+_\d+/i) == -1)
    {
      var oid = '', id = '';
      var m = vid.match(/(?:^|&)oid=(-?\d+)/i);
      if(m && m.length > 1)
        oid = m[1];

      m = vid.match(/(?:^|&)id=(-?\d+)/i);
      if(m && m.length > 1)
        id = m[1];

      vid = '';
      if(oid && id)
        vid = 'video' + oid + '_' + id;
    }

    if(!vid)
    {
      callback(vid, links, title);
      return;
    }

    title = vid;

    var url = 'http://vk.com/' + vid;

    mono.ajax({
      url: url,
      success: function(response) {
        if (!response) {
          return callback(vid, links, title, duration, thumb, data, embed);
        }

        var data;
        var type = 1;
        var json = response
          .replace(/\{[-a-zA-Z_\.]+\}/ig, '')
          .match(/var\svars\s*=\s*(\{[^\}]+\})/i);
        if (!json) {
          type = 2;
          json = response
            .replace(/\{[-a-zA-Z_\.]+\}/ig, '')
            .match(/var\sopts\s*=\s*(\{[^\}]+\})/i);
          if (json) {
            try {
              json = json[1].replace(/\\n/g, '').replace(/\\\//g, '/').replace(/([{,])\s*(\w+)\s*:/g, '$1"$2":').replace(/'/g, '"');
              json = JSON.parse(json);
            } catch (e) {
              json = null;
            }
            if (!json || !json.url || !/\/\/.*pladform\..*\//.test(json.url)) {
              json = null;
            }
          }
          if (!json) {
            type = 0;
          }
        }
        if(type === 1) {
          try {
            json = json[1];

            if(json.search(/^\{\s*\\\"/) > -1)
              json = json.replace(/\\\"/g, '"');

            json = JSON.parse(json);
            if(json) {
              data = json;
              links = vkontakte_ru_embed.getVkVideoLinks(json);

              if(json.md_title)
                title = json.md_title;

              if(json.thumb)
                thumb = json.thumb;
              else if(json.jpg)
                thumb = json.jpg;

              if(thumb && thumb.search(/\\\//) > -1)
                thumb = thumb.replace(/\\\//g, '/');
            }
          } catch(err){}
        } else
        if (type === 2) {
          /*@if isVkOnly=0>*/
          var params = mono.parseUrlParams(json.url);
          var okEmbed = engine.modules.odnoklassniki;
          okEmbed.getPladformVideo({
            extVideoId: {
              playerId: params.pl,
              videoId: params.videoid
            }
          }, function(response) {
            if (response && response.action === 'getRutubeLinks') {
              response.links = null;
            }

            var pladformLinks = response && response.links;
            if (!Array.isArray(pladformLinks)) {
              return callback(vid, links, title, duration, thumb, data, embed);
            }

            var videoInfo = vkontakte_ru_embed.preparePladformLinks(pladformLinks);

            callback(vid, videoInfo.links, videoInfo.title, videoInfo.duration, videoInfo.thumb, data, embed);
          });
          return;
          /*@if isVkOnly=0<*/
        } else {
          /*@if isVkOnly=0>*/
          var frame = response.match(/<iframe[^>]+>/ig);
          var m;
          if(frame) {
            for(var i=0, l=frame.length; i<l; i++) {
              m = frame[i].match(/youtube.com\\?\/embed\\?\/([\w\-]+)/i);
              if(m && m.length > 1) {
                embed = {
                  action: 'getYoutubeLinks',
                  extVideoId: m[1]
                };
                break;
              }
              m = frame[i].match(/vimeo.com\\?\/video\\?\/(\d+)/i);
              if(m && m.length > 1) {
                embed = {
                  action: 'getVimeoLinks',
                  extVideoId: m[1]
                };
                break;
              }
            }
          }
          if (embed === null) {
            var ajaxPreload = response.lastIndexOf('ajax.preload');
            if (ajaxPreload !== -1) {
              data = response.substr(ajaxPreload);
              var dmId = data.match(/url: '(?:[\w\\/]+.)?dailymotion.com(?:\\\/swf)?\\\/video\\\/([\w\d]+)\??/);
              if (dmId && dmId.length > 1) {
                embed = {
                  action: 'getDailymotionLinks',
                  extVideoId: dmId[1]
                }
              }
            }
          }
          /*@if isVkOnly=0<*/
        }

        var _duration = response.match(/(['"]?)duration\1\s*:\s*(\d+)/i);
        if(_duration && _duration.length > 2)
        {
          duration = _duration[2];
        }

        callback(vid, links, title, duration, thumb, data, embed);
      },
      error: function() {
        callback(vid, links, title, duration, thumb, data, embed);
      }
    });
  },

  checkVkLinks: function (links, callback)
  {
    var checkUrl = '';

    if(links && links.length > 0)
    {
      if(links[0].type == 'mp4')
        checkUrl = links[0].url;
      else if(links.length > 1)
        checkUrl = links[1].url;
      else
        checkUrl = links[0].url;
    }

    if(checkUrl)
    {
      mono.ajax({
        url: checkUrl,
        type: 'HEAD',
        success: function(data, xhr) {
          callback(checkUrl, true, xhr.status);
        },
        error: function(xhr) {
          callback(checkUrl, false, xhr.status);
        }
      });
      return;
    }

    callback();
  },

  getVkVideoLinks: function (v) {
    if(!v || !v.host || !v.vtag || (!v.vkid && !v.uid))
      return null;

    if(typeof(v.host) != 'string' && v.host.toString)
      v.host = v.host.toString();

    v.host = v.host.replace(/\\\//g, '/');

    if(v.hd > 0 && (!v.hd_def || v.hd > v.hd_def))
      v.hd_def = v.hd;

    var links = [];
    if(v.hd_def <= 0 && v.no_flv == 0)
    {
      links.push({
        url: vkontakte_ru_embed.getVkFlvLink(v),
        name: 'FLV',
        subname: '',
        type: 'flv'
      });
    }
    else
    {
      links.push({
        url: vkontakte_ru_embed.getVkMp4Link(v, 240),
        name: (v.no_flv == 0) ? 'FLV' : 'MP4',
        subname: '240',
        type: (v.no_flv == 0) ? 'flv' : 'mp4'
      });

      if(v.hd_def > 0)
      {
        links.push({
          url: vkontakte_ru_embed.getVkMp4Link(v, 360),
          name: 'MP4',
          subname: '360',
          type: 'mp4'
        });

        if(v.hd_def > 1)
        {
          links.push({
            url: vkontakte_ru_embed.getVkMp4Link(v, 480),
            name: 'MP4',
            subname: '480',
            type: 'mp4'
          });

          if(v.hd_def > 2)
          {
            links.push({
              url: vkontakte_ru_embed.getVkMp4Link(v, 720),
              name: 'MP4',
              subname: '720',
              type: 'mp4'
            });
          }
        }
      }
    }

    return links;
  },

  getVkFlvLink: function (v)
  {
    if(v.host.search(/^https?:\/\//i) != -1)
    {
      if(v.host.charAt(v.host.length - 1) != '/')
        v.host += '/';

      if(v.host.search(/^https?:\/\/cs\d+\./i) != -1)
        return v.host + 'u' + v.uid + '/videos/' + v.vtag + '.flv';

      return v.host + 'assets/video/' + v.vtag + v.vkid + '.vk.flv';
    }

    var url = v['url240'];
    if (url !== undefined) {
      url = decodeURIComponent(url.replace(/\\\//g, '/'));
      var ePos = url.indexOf('?');
      if (ePos === -1) {
        ePos = url.length;
      }
      if (url) {
        return url.substr(0, ePos);
      }
    }

    if(v.host.search(/\D/) == -1)
      return 'http://cs' + v.host + '.' + 'vk.com/u' + v.uid + '/videos/' + v.vtag + '.flv';

    return 'http://' + v.host + '/assets/video/' + v.vtag + v.vkid + '.vk.flv';
  },

  getVkMp4Link: function(v, q)
  {
    if(q == 240 && v.no_flv == 0)
      return vkontakte_ru_embed.getVkFlvLink(v);

    if(v.host.search(/^https?:\/\//i) != -1)
    {
      if(v.host.charAt(v.host.length - 1) != '/')
        v.host += '/';

      return v.host + 'u' + v.uid + '/videos/' + v.vtag + '.' + q + '.mp4';
    }

    var url = v['url'+q];
    if (url !== undefined) {
      url = decodeURIComponent(url.replace(/\\\//g, '/'));
      var ePos = url.indexOf('?');
      if (ePos === -1) {
        ePos = url.length;
      }
      if (url) {
        return url.substr(0, ePos);
      }
    }

    return 'http://cs' + v.host + '.' + 'vk.com/u' + v.uid + '/videos/' + v.vtag + '.' + q + '.mp4';
  },

  getVkLinksFromData: function(request, cb) {
    var data = request.data;
    var json = data.match(/var\s+vars\s+=\s+({.*});/i);
    if (!json) {
      return cb();
    }
    json = json[1];
    try {
      json = JSON.parse(json);
    } catch (e) {
      return cb();
    }
    var links = [];
    var vid = json.vid;
    var title = json.md_title || json.vid;
    var thumb = '';

    if(json.thumb) {
      thumb = json.thumb;
      if (thumb.search(/\\\//) !== -1) {
        thumb = thumb.replace(/\\\//g, '/');
      }
    } else
    if(json.jpg) {
      thumb = json.jpg;
    }

    for (var key in json) {
      if (key.substr(0, 3) !== 'url') {
        continue;
      }
      var quality = parseInt(key.substr(3));
      if (isNaN(quality)) {
        continue;
      }
      var url = json[key];
      var type = 'flv';
      if (json.no_flv === 1) {
        type = 'mp4';
      }
      links.push({
        url: url,
        subname: quality,
        name: type.toUpperCase(),
        type: type
      });
    }

    var duration = data.match(/(['"]?)duration\1\s*:\s*(\d+)/i);
    if(duration && duration.length > 2) {
      duration = duration[2];
    } else {
      duration = '';
    }

    return cb({
      action: 'getVKLinks',
      extVideoId: vid,
      links: links,
      title: title,
      duration: duration,
      thumb: thumb,
      data: json,
      checkLinks: null
    });
  }
};
/*@if isVkOnly=0>*/
if (typeof window === 'undefined') {
  exports.init = function(_mono, _engine) {
    mono = _mono;
    engine = _engine;
    return vkontakte_ru_embed;
  };
} else {
/*@if isVkOnly=0<*/
  engine.modules.vkontakte = vkontakte_ru_embed;
/*@if isVkOnly=0>*/
}
/*@if isVkOnly=0<*/

var youtube_com_embed = {
  lastSts: ["16777", [["swap",13],["reverse",null],["splice",3],["swap",2],["reverse",null],["splice",3],["swap",36]] ],
  /**
   * currentSts {{sts: Number, url: string, actList: Array, trust: boolean, invalid: boolean}}
   */
  currentSts: undefined,
  isTrackError: {},
  getYoutubeLinks: function (request, callback)
  {
    function callback_links(links, title, subtitles, duration)
    {
      youtube_com_embed.addUmmyLinks(links, request.extVideoId);

      var response = {
        action: request.action,
        extVideoId: request.extVideoId,
        links: links,
        title: title,
        subtitles: subtitles,
        duration: duration,
        checkLinks: null
      };

      if(request.checkLinks && links)
      {
        youtube_com_embed.checkYoutubeLinks(links, function(checkUrl, isValid, status){
          response.checkLinks = isValid;
          callback(response);
        });
        return;
      }

      callback(response);
    }

    youtube_com_embed.__getYoutubeLinks(request.url, request.extVideoId, request.checkSubtitles, callback_links, request.noDash);
  },

  prepareDechiper: function(testItem, currentSts, cb) {
    "use strict";
    var sigUrl = currentSts.url.match(/\/(?:[^\/]+)?player-([^\/]+)\//);
    sigUrl = sigUrl && sigUrl[1];
    if (!sigUrl) {
      sigUrl = 'unknownPlayerName';
    }
    this.ytHtml5SigDecipher.dechip({sts: currentSts.sts, url: currentSts.url}, function(actList, sts, trust) {
      if (!actList) {
        if (!this.isTrackError[sigUrl]) {
          this.isTrackError[sigUrl] = 1;
          sigUrl && currentSts.sts && engine.trackEvent('youtube', 'pError', currentSts.sts + ' ' + sigUrl);
        }
        currentSts.invalid = true;
        return cb();
      }

      currentSts.actList = actList;
      currentSts.trust = !!trust;

      if (!currentSts.sts && sts) {
        currentSts.sts = sts;
      }

      if (!trust) {
        var url = testItem.url;
        var signature = youtube_com_embed.ytRunActList(currentSts.actList, testItem.s);
        if (testItem.getUrl) {
          url = testItem.getUrl(signature);
        } else {
          url += '&signature=' + signature;
        }

        this.ytHtml5SigDecipher.checkActList(currentSts.sts, currentSts.actList, url, function(r) {
          if (r) {
            currentSts.trust = true;
          } else {
            currentSts.invalid = true;
          }
          cb();
        });
      } else {
        cb();
      }
    }.bind(this));
  },

  needDechiper: function(config) {
    "use strict";
    var needDechiper = false;
    ['url_encoded_fmt_stream_map', 'adaptive_fmts', 'fmt_url_map'].some(function(key) {
      var item = config[key];
      if (!item) {
        return 0;
      }

      item.some(function(item) {
        if (item.s && item.url) {
          needDechiper = item;
          return 1;
        }
      });

      if (needDechiper) {
        return 1;
      }
    });

    if (!needDechiper && config.dashmpd) {
      var s = config.dashmpd.match(youtube_com_embed.dashMpdSigR);
      if (s) {
        needDechiper = {
          s: s[2],
          url: config.dashmpd.replace(s[1], ''),
          getUrl: function(url, s, signature) {
            return url.replace(s[1], '/signature/' + signature);
          }.bind(null, config.dashmpd, s)
        };
      }
    }

    return needDechiper;
  },

  videoInfoToObj: function(data, isObj) {
    "use strict";
    var decodeParams = function(data) {
      ['url_encoded_fmt_stream_map', 'adaptive_fmts', 'fmt_url_map'].forEach(function(key) {
        if (data[key]) {
          data[key] = data[key].split(',').map(function(item) {
            return dataStrToObj(item);
          });
        }
      });
    };
    var dataStrToObj = function(data) {
      data = mono.parseUrlParams(data, {
        forceSep: '&',
        argsOnly: 1,
        useDecode: 1
      });
      decodeParams(data);
      return data;
    };

    var config = data;
    if (isObj) {
      decodeParams(config);
    } else {
      config = dataStrToObj(data);
    }
    return config;
  },

  expCurrentSts: function() {
    "use strict";
    var now = parseInt(Date.now() / 1000);

    if (this.currentSts === undefined) {
      return;
    }

    if (!this.currentSts.expire) {
      this.currentSts.expire = now + 21600;
    } else
    if (this.currentSts.expire < now) {
      this.currentSts = undefined;
    }
  },

  getYtConfig: function(videoId, eurl, cb, index, useDefaultSts) {
    "use strict";
    if (!index) {
      index = 0;
    }

    this.expCurrentSts();

    if (useDefaultSts) {
      this.currentSts = {sts: parseInt(this.lastSts[0]), actList: this.lastSts[1]};
      this.expCurrentSts();
    } else
    if (this.currentSts === undefined) {
      return this.getCurrentSts(function(obj) {
        this.currentSts = obj || {sts: parseInt(this.lastSts[0]), actList: this.lastSts[1], trust: true};
        this.expCurrentSts();
        this.getYtConfig(videoId, eurl, cb, index, useDefaultSts);
      }.bind(this));
    }

    var currentSts = JSON.parse(JSON.stringify(this.currentSts));

    var url, params;
    if (index === 0 || index === 1) {
      var domain = index === 0 ? 'www.youtube-nocookie.com' : 'www.youtube.com';
      params = {
        video_id: videoId,
        asv: 3,
        eurl: eurl,
        el: 'info',
        sts: currentSts.sts
      };
      url = 'http://' + domain + '/get_video_info?' + mono.param(params);
    } else
    if (index === 2) {
      url = 'http://www.youtube.com/watch?' + mono.param({v: videoId, spf: 'navigate'});
    } else
    if (index === 3) {
      url = 'http://www.youtube.com/watch?' + mono.param({v: videoId});
    } else {
      return cb();
    }

    var abort = function() {
      this.getYtConfig(videoId, eurl, cb, ++index, useDefaultSts);
    }.bind(this);

    mono.ajax({
      url: url,
      success: function(data) {
        var jsonList = undefined;
        if (!data || typeof data !== 'string') {
          return abort();
        }

        var config;
        if ([0,1].indexOf(index) !== -1) {
          config = this.videoInfoToObj(data);

          if (index === 0) {
            if (config.requires_purchase === '1'
              || config.url_encoded_fmt_stream_map === ''
              || config.fmt_url_map === ''
              || config.adaptive_fmts === ''
              || config.errorcode > 0) {
              return abort();
            }
          }
        } else
        if (index === 2) {
          try {
            data = JSON.parse(data);
            data.some(function(item) {
              if (item.data && (jsonList = item.data.swfcfg)) {
                return true;
              }
            });
            if (!jsonList) {
              return abort();
            }
          } catch (e) {
            return abort();
          }
        } else {
          var script = mono.getPageScript(data, /ytplayer\.config\s+=\s+/);
          if (!script.length) {
            return abort();
          }
          script = script[0];

          jsonList = mono.findJson(script, [/"video_id":/]);
          if (!jsonList.length) {
            return abort();
          }
          jsonList = jsonList[0];
        }
        if ([2,3].indexOf(index) !== -1) {
          if (!jsonList.args || typeof jsonList.args !== 'object') {
            return abort();
          }

          if (jsonList.assets && jsonList.assets.js) {
            currentSts = {sts: jsonList.sts, url: jsonList.assets.js};
          }

          config = this.videoInfoToObj(jsonList.args, 1);
        }

        var testItem;
        if (!currentSts.actList && (testItem = this.needDechiper(config))) {
          this.prepareDechiper(testItem, currentSts, function() {
            if (currentSts.invalid) {
              if (index !== 3) {
                return abort();
              }

              if (index === 3 && !useDefaultSts) {
                useDefaultSts = 1;
                index = -1;
                return abort();
              }
            }

            cb(config, currentSts);
          });
        } else {
          cb(config, currentSts);
        }
      }.bind(this),
      error: function() {
        abort();
      }.bind(this)
    });
  },

  readFmt: function(links, meta, fmt, currentSts, titleParam) {
    "use strict";
    fmt.forEach(function(item) {
      if (item.stream) {
        meta.hasStream = 1;
        return 1;
      }

      if (!item.url) {
        return 1;
      }

      var url = item.url;
      if(!/(\?|&)s(ig(nature)?)?=/i.test(url)) {
        if(item.sig) {
          url += '&signature=' + item.sig;
        } else
        if(item.signature) {
          url += '&signature=' + item.signature;
        } else
        if(item.s) {
          if (currentSts.invalid) {
            console.error('Sts is invalid!', currentSts);
            return 1;
          }
          if (!currentSts.actList) {
            console.error('Sts actList is not found!', currentSts);
            return 1;
          }
          url += '&signature=' + youtube_com_embed.ytRunActList(currentSts.actList, item.s);
        }
      }

      if(item.itag && !/(\?|&)itag=/i.test(url)) {
        url += '&itag=' + item.itag;
      }

      url = url.replace(/(\?|&)sig=/i, '$1signature=').replace(/\\u0026/ig, '&');

      var itag = url.match(/(?:\?|&)itag=(\d+)/i);
      itag = itag && itag[1];
      if (!itag) {
        return 1;
      }

      if (!meta[itag]) {
        meta[itag] = {};
      }

      if (item.fps) {
        meta[itag].fps = item.fps;
      }

      if (item.size && /^\d+x\d+$/.test(item.size)) {
        var wh = item.size.split('x');
        meta[itag].quality = youtube_com_embed.getDashQuality(wh[0], wh[1]);
      }

      if (!links[itag]) {
        links[itag] = url + titleParam;
      }
    });
  },

  onGetConfig: function(videoId, checkSubtitles, cb, noDash, config, currentSts) {
    "use strict";
    var links = null, title = '', subtitles = null, duration = '', dashUrl = null;

    if (!config) {
      return cb(links, title, subtitles, duration);
    }

    cb = function(cb) {
      var wait = 1;
      var ready = 0;

      var onReady = function() {
        ready++;
        if (ready !== wait) {
          return;
        }
        cb(links, title, subtitles, duration);
      };

      if(checkSubtitles) {
        wait++;
        this.getYoutubeSubtitles({extVideoId: videoId}, function(subs) {
          subtitles = subs || null;
          onReady();
        });
      }

      if (!noDash && dashUrl) {
        wait++;
        if (!links) {
          links = {};
        }
        this.getYouTubeDashLinks(links, dashUrl, function() {
          var len = Object.keys(links).length;
          if (links.meta && !links.meta.hasStream) {
            len--;
          }
          if (!len) {
            links = null;
          }
          onReady();
        }, !currentSts.invalid && currentSts.actList && function(actList, s) {
            return youtube_com_embed.ytRunActList(actList, s);
          }.bind(this, currentSts.actList));
      }

      onReady();
    }.bind(this, cb);

    var titleParam = '';
    title = config.title || '';
    duration = config.length_seconds || '';
    dashUrl = config.dashmpd || '';

    if (title) {
      title = title.replace(/\+/g, ' ');
      titleParam = '&title=' + encodeURIComponent(mono.fileName.modify(title));
    }

    var fmtMap = config.fmt_url_map || config.url_encoded_fmt_stream_map || [];
    var adaptiveFmts = config.adaptive_fmts || [];

    var meta = {};

    if (config.livestream || config.live_playback) {
      meta.hasStream = 1;
    }

    links = {};
    fmtMap && this.readFmt(links, meta, fmtMap, currentSts, titleParam);
    adaptiveFmts && this.readFmt(links, meta, adaptiveFmts, currentSts, titleParam);

    if (Object.keys(links).length === 0 && !meta.hasStream) {
      links = null;
    } else {
      links.meta = meta;
    }

    cb();
  },

  __getYoutubeLinks: function(eurl, videoId, checkSubtitles, cb, noDash) {
    "use strict";
    if (!eurl) {
      eurl = 'http://www.youtube.com/watch?v='+videoId;
    }

    this.getYtConfig(videoId, eurl, function(config, currentSts) {
      this.onGetConfig(videoId, checkSubtitles, cb, noDash, config, currentSts);
    }.bind(this));
  },

  addUmmyLinks: function(links, videoId) {
    if (!links || (links.meta && links.meta.hasStream)) {
      return;
    }

    if (engine.preferences.showUmmyItem) {
      links['ummy'] = 'ummy:www.youtube.com/watch?v=' + videoId;
      links['ummyAudio'] = 'ummy:www.youtube.com/watch?v=' + videoId+'&sf_type=audio';
    }
  },

  checkYoutubeLinks: function (links, callback) {
    var checkItags = ['18', '34', '35'], checkUrl = '';
    for(var i = 0; i < checkItags.length; i++)
    {
      if(links[checkItags[i]])
      {
        checkUrl = links[checkItags[i]];
        break;
      }
    }

    if(checkUrl)
    {
      mono.ajax({
        type: 'HEAD',
        url: checkUrl,
        success: function(data, xhr) {
          callback(checkUrl, true, xhr.status);
        },
        error: function(xhr) {
          callback(checkUrl, false, xhr.status);
        }
      });
      return;
    }

    callback();
  },

  getYoutubeSubtitles: function(message, cb) {
    var videoId = message.extVideoId;
    var baseUrl = 'http://video.google.com/timedtext';
    mono.ajax({
      url: baseUrl + '?hl='+engine.language.lang+'&v=' + videoId + '&type=list&tlangs=1',
      mimeType: 'text/xml',
      success: function(data, xhr) {
        if (!xhr.responseXML) {
          return cb();
        }
        var track = xhr.responseXML.querySelectorAll('track');
        var target = xhr.responseXML.querySelectorAll('target');
        var list = [];
        var trackList = {};
        var targetList = {};
        var origTrack = undefined;
        var langCode, param;
        for (var i = 0, item; item = track[i]; i++) {
          langCode = item.getAttribute('lang_code');
          param = {
            lang: langCode,
            v: videoId,
            fmt: 'srt',
            name: item.getAttribute('name') || undefined
          };
          trackList[langCode] = {
            lang: item.getAttribute('lang_translated'),
            langCode: langCode,
            url: baseUrl + '?' + mono.param(param),
            name: param.name
          };
          list.push(trackList[langCode]);
          if (!origTrack && item.getAttribute('cantran')) {
            origTrack = param;
          }
        }

        if (origTrack) {
          for (i = 0, item; item = target[i]; i++) {
            langCode = item.getAttribute('lang_code');
            param = {
              lang: origTrack.lang,
              v: videoId,
              tlang: langCode,
              fmt: 'srt',
              name: origTrack.name
            };
            targetList[langCode] = {
              lang: item.getAttribute('lang_translated'),
              langCode: langCode,
              url: baseUrl + '?' + mono.param(param),
              isAuto: true
            };
          }
        }

        engine.actionList.getNavigatorLanguage(undefined, function(langCode) {
          langCode = langCode.toLocaleLowerCase();
          if (langCode.indexOf('zh-hant') === 0) {
            langCode = 'zh-Hant';
          } else
          if (langCode.indexOf('zh-hans') === 0) {
            langCode = 'zh-Hans';
          }
          var localeList = [langCode];
          if (localeList[0] === 'uk') {
            localeList.push('ru');
          }
          for (i = 0, item; item = localeList[i]; i++) {
            if (!trackList[item] && targetList[item]) {
              list.push(targetList[item]);
            }
          }

          return cb(list);
        });
      },
      error: function() {
        cb();
      }
    });
  },

  dashMpdSigR: /(\/s\/([^\/]+))/,

  getYouTubeDashLinks: function(links, dashmpd, cb, dechiper) {
    if (!dashmpd || dashmpd.indexOf('yt_live_broadcast') !== -1) {
      return cb();
    }

    var s = dashmpd.match(youtube_com_embed.dashMpdSigR);
    if (s) {
      if (!dechiper) {
        return cb();
      }

      var signature = dechiper(s[2]);
      dashmpd = dashmpd.replace(s[1], '/signature/' + signature);
    }

    dashmpd = dashmpd.replace('/sig/', '/signature/');

    mono.ajax({
      url: dashmpd,
      mimeType: 'text/xml',
      success: function(data, xhr) {
        if (!xhr.responseXML) {
          return cb();
        }
        youtube_com_embed.parseDash( xhr.responseXML, links, cb);
      },
      error: function() {
        cb();
      }
    });
  },

  getDashQuality: function(a, b) {
    var qualityList = {
      144: 144,
      240: 240,
      360: 360,
      480: 480,
      720: 720,
      1080: 1080,
      1440: 1440,
      '4K': 2160,
      '5K': 2880,
      '8K': 4320
    };

    var quality;
    var g = Math.max(a, b);
    a = Math.min(a, b);
    for (var qualityName in qualityList) {
      var value = qualityList[qualityName];
      if (g >= Math.floor(16 * value / 9) || a >= value) {
        quality = qualityName;
      } else {
        return quality;
      }
    }
    return quality;
  },

  parseDash: function(xml, links, cb) {
    "use strict";
    var elList = xml.querySelectorAll('Representation');
    if (!links) {
      links = {};
    }

    var meta = links.meta = links.meta || {};

    for (var i = 0, el; el = elList[i]; i++) {
      var itag = el.getAttribute('id');

      if (!meta[itag]) {
        meta[itag] = {};
      }

      meta[itag].fps = el.getAttribute('frameRate') || undefined;

      var width = el.getAttribute('width');
      var height = el.getAttribute('height');

      meta[itag].quality = width && height && youtube_com_embed.getDashQuality(width, height);

      if (links[itag] !== undefined) {
        continue;
      }

      var baseurl = el.querySelector('BaseURL');
      if (baseurl === null) {
        continue;
      }
      var url = baseurl.textContent;

      var SegmentURL = baseurl.parentNode.querySelector('SegmentURL');
      var segmentUrl;
      if (SegmentURL && (segmentUrl = SegmentURL.getAttribute('media'))) {
        if (segmentUrl.indexOf('sq/') === 0) {
          continue;
        }
      }

      links[itag] = url;
    }
    cb(links);
  },

  getYoutubeIdListFromPlaylist: function(request, cb) {
    youtube_com_embed.getIdListFromList(request.baseUrl || 'http://www.youtube.com', request.listId, cb);
  },

  getIdListFromList: (function() {
    var getNextPage = function(baseUrl, url, pageList, cb) {
      if (!pageList) {
        pageList = [];
      }
      mono.ajax({
        url: baseUrl + url,
        dataType: 'json',
        success: function(data) {
          if (!data) {
            return cb(pageList);
          }
          pageList.push(data.content_html);
          var nextPageUrl = getNextPageUrl(data.load_more_widget_html);
          if (nextPageUrl === undefined) {
            return cb(pageList);
          }
          getNextPage(baseUrl, nextPageUrl, pageList, cb);
        },
        error: function() {
          cb(pageList);
        }
      });
    };
    var getTitleFromPage = function(data) {
      var title = data.match(/<h1[^>]+>([^<]+)<\/h1>/);
      if (!title) {
        return undefined;
      }
      return title[1].replace(/\r?\n/g, " ").trim();
    };
    var getNextPageUrl = function(data) {
      if (!data) {
        return undefined;
      }
      var nextUrl = data.match(/data-uix-load-more-href="([^"]+)"/);
      if (nextUrl) {
        nextUrl = nextUrl[1];
      }
      return nextUrl || undefined;
    };
    var readLinksFromPages = function(listId, pageList, cb) {
      var title = getTitleFromPage(pageList[0]);
      var idObj = {};
      var idList = [];
      var pattern = /href="\/watch\?([^"]+)"/g;
      var maxIndex = 0;
      for (var i = 0, len = pageList.length; i < len; i++) {
        var content = pageList[i];
        content.replace(pattern, function(string, args) {
          var url = mono.parseUrlParams(args, {argsOnly: 1});
          if (url.list !== listId) {
            return;
          }
          url.index = parseInt(url.index);
          idObj[url.index] = url.v;
          if (url.index > maxIndex) {
            maxIndex = url.index;
          }
        });
      }
      for (i = 0; i <= maxIndex; i++) {
        if (idObj[i] === undefined) {
          continue;
        }
        if (idList.indexOf(idObj[i]) === -1) {
          idList.push(idObj[i]);
        }
      }
      cb({idList: idList, title: title});
    };
    return function getLinksFromList(baseUrl, listId, cb) {
      mono.ajax({
        url: baseUrl + '/playlist?list=' + listId,
        success: function(data) {
          var nextPageUrl = getNextPageUrl(data);
          if (!nextPageUrl) {
            return readLinksFromPages(listId, [data], cb);
          }
          getNextPage(baseUrl, nextPageUrl, [data], function(pageList) {
            readLinksFromPages(listId, pageList, cb);
          });
        },
        error: function() {
          cb();
        }
      });
    };
  })(),

  getYoutubeLinksFromConfig: function(message, cb) {
    "use strict";
    var abort = function() {
      youtube_com_embed.getYoutubeLinks(message, cb);
    };
    cb = function(cb, obj) {
      if (obj && obj.links) {
        youtube_com_embed.addUmmyLinks(obj.links, message.extVideoId);
      }
      cb(obj);
    }.bind(this, cb);

    var jsonList = message.config;
    if (!jsonList
      || !jsonList.args
      || jsonList.args.video_id !== message.extVideoId
      || !jsonList.assets
      || !jsonList.assets.js
    ) {
      return abort();
    }

    var config = this.videoInfoToObj(jsonList.args, 1);
    var currentSts = {sts: jsonList.sts, url: jsonList.assets.js};

    this.expCurrentSts();

    if (this.currentSts === undefined) {
      if (currentSts.sts) {
        this.currentSts = JSON.parse(JSON.stringify(currentSts));
        this.expCurrentSts();
      }
    } else
    if (this.currentSts.url === currentSts.url || this.currentSts.sts === currentSts.sts) {
      currentSts = JSON.parse(JSON.stringify(this.currentSts));
    }

    var onCurrentStsReady = function() {
      var onGetLinks = function(links, title, subtitles, duration) {
        cb({
          links: links,
          title: title,
          isQuick: 1
        });
      };
      this.onGetConfig(
        message.extVideoId,
        message.checkSubtitles,
        onGetLinks,
        message.noDash,
        config,
        currentSts
      );
    }.bind(this);

    var testItem;
    if (!currentSts.actList && (testItem = this.needDechiper(config))) {
      this.prepareDechiper(testItem, currentSts, function() {
        if (currentSts.invalid) {
          return abort();
        }

        onCurrentStsReady();
      }.bind(this));
    } else {
      onCurrentStsReady();
    }
  },

  ytRunActList: function(list, a) {
    var actionList = {
      slice:function(a,b){a.slice(b)},
      splice:function(a,b){a.splice(0,b)},
      reverse:function(a){a.reverse()},
      swap:function(a,b){var c=a[0];a[0]=a[b%a.length];a[b]=c}
    };
    a = a.split("");
    for (var i = 0, item; item = list[i]; i++) {
      actionList[item[0]](a, item[1]);
    }
    return a.join("");
  },

  ytHtml5SigDecipher: {
    readObfFunc: function(func, data) {
      var vList = func.match(/\[(\w+)\]/g);
      if (!vList) {
        return;
      }
      for (var i = 0, v; v = vList[i]; i++) {
        var vv = data.match(new RegExp('[, ]{1}'+ v.slice(1, -1) +'="(\\w+)"'));
        if (vv) {
          func = func.replace(v, '.'+vv[1]);
        }
      }
      var arr = func.split(';');
      var actList = [];
      for (var i = 0, item; item = arr[i]; i++) {
        if (item.indexOf('.split(') !== -1 || item.indexOf('.join(') !== -1) {
          continue;
        }
        if (item.indexOf('reverse') !== -1) {
          actList.push(['reverse', null]);
          continue;
        }
        var m = item.match(/splice\((\d+)\)/);
        if (m) {
          m = parseInt(m[1]);
          if (isNaN(m)) return;
          actList.push(['splice', m]);
          continue;
        }
        var m = item.match(/slice\((\d+)\)/);
        if (m) {
          m = parseInt(m[1]);
          if (isNaN(m)) return;
          actList.push(['slice', m]);
          continue;
        }
        var m = item.match(/\[(\d+)%\w+\.length/);
        if (m) {
          m = parseInt(m[1]);
          if (isNaN(m)) return;
          actList.push(['swap', m]);
        }
      }
      return actList;
    },
    getChip: function(data, cb) {
      var sts = data.match(/,sts:(\d+)/);
      sts = sts && sts[1];

      var actList = [];
      var funcName = data.match(/\.sig\|\|([$_a-zA-Z0-9]+)\(/);
      if (!funcName) {
        return cb();
      }
      funcName = funcName[1];
      funcName = funcName.replace(/\$/g, '\\$');
      var func = data.match(new RegExp("((?:function "+funcName+"|var "+funcName+"=function)\\(([\\w$]+)\\){[^}]*});"));
      if (!func) {
        return cb();
      }
      var vName = func[2];
      func = func[1];
      var regexp = new RegExp("[\\w$]+\\.[\\w$]+\\("+vName+"[^)]*\\)", 'g');
      var sFuncList = func.match(regexp);
      if (!sFuncList) {
        actList = this.readObfFunc(func, data);
        if (actList && actList.length > 0) {
          return cb(actList, sts);
        }
        return cb();
      }
      var objName = '';
      var objElList = [];
      for (var i = 0, item; item = sFuncList[i]; i++) {
        var m = item.match(/([\w$]+)\.([\w$]+)\([\w$]+,?([\w$]+)?\)/);
        if (m) {
          objName = m[1];
          objElList.push({name: m[2], arg: parseInt(m[3])});
        }
      }
      var sPos = data.indexOf('var '+objName+'={');
      if (sPos === -1) {
        sPos = data.indexOf(','+objName+'={');
      }
      if (sPos === -1) {
        sPos = data.indexOf(objName+'={');
      }
      var place = data.substr(sPos, 300);
      for (i = 0, item; item = objElList[i]; i++) {
        var vName = item.name;
        regexp = new RegExp(vName+":(function\\([$\\w,]+\\){[^}]+})");
        var sF = place.match(regexp);
        if (!sF) {
          return cb();
        }
        sF = sF[1];
        if (sF.indexOf('splice') !== -1) {
          if (isNaN(item.arg)) {
            return cb();
          }
          actList.push(['splice', item.arg]);
        } else
        if (sF.indexOf('slice') !== -1) {
          if (isNaN(item.arg)) {
            return cb();
          }
          actList.push(['slice', item.arg]);
        } else
        if (sF.indexOf('reverse') !== -1) {
          item.arg = null;
          actList.push(['reverse', item.arg]);
        } else {
          if (isNaN(item.arg)) {
            return cb();
          }
          actList.push(['swap', item.arg]);
        }
      }
      cb(actList, sts);
    },
    getPlayer: function(message, cb) {
      if (message.url.substr(0, 2) === '//') {
        message.url = 'http:' + message.url;
      }
      mono.ajax({
        url: message.url,
        success: function(data) {
          if (!data) {
            return cb();
          }
          return this.getChip(data, cb);
        }.bind(this),
        error: function() {
          return cb();
        }
      })
    },
    checkActList: function(sts, actList, url, cb) {
      mono.ajax({
        type: 'HEAD',
        url: url,
        success: function() {
          this.addDechipList(sts, actList);
          cb(1);
        }.bind(this),
        error: function() {
          cb(0);
        }
      });
    },
    getDechipList: function(cb) {
      if (this.getDechipList.data !== undefined) {
        return cb(this.getDechipList.data);
      }
      mono.storage.get('ytDechipList', function(data) {
        data.ytDechipList = data.ytDechipList || {};
        this.getDechipList.data = data;
        cb(data);
      }.bind(this));
    },
    addDechipList: function(sts, actList) {
      if (!sts) return;
      var lastSts = youtube_com_embed.lastSts;
      this.getDechipList.data.ytDechipList[lastSts[0] = sts] = lastSts[1] = actList;
      mono.storage.set(this.getDechipList.data);
    },
    /**
     * @param {{sts: Number, url: String}} message
     * @param {Function} cb
     */
    dechip: function(message, cb) {
      this.getDechipList(function(data) {
        if (message.sts) {
          var actList = data.ytDechipList[message.sts];
          if (actList) {
            return cb(actList, parseInt(message.sts), 1);
          }
        }
        this.getPlayer(message, function(actList, sts) {
          if (actList && actList.length > 0) {
            return cb(actList, parseInt(sts));
          }
          cb();
        });
      }.bind(this));
    }
  },

  addOnPrepareEvent: function() {
    "use strict";
    engine.onEvent('prepare', function() {
      mono.storage.get('ytDechipList', function(data) {
        var dechipList = data.ytDechipList = data.ytDechipList || {};
        var lastSts = this.lastSts;
        dechipList[lastSts[0]] = lastSts[1];

        this.ytHtml5SigDecipher.getDechipList.data = data;
        var keys = Object.keys(dechipList);
        keys.sort(function(a, b) {
          return a < b ? 1 : -1
        });

        if (lastSts[0] < keys[0]) {
          lastSts[0] = keys[0];
          lastSts[1] = dechipList[keys[0]];
        }

      }.bind(this));
    }.bind(youtube_com_embed));
  },

  getSignatureFromHtml: function(data, cb) {
    "use strict";
    var script = mono.getPageScript(data, /ytplayer\.config\s+=\s+/);
    if (!script.length) {
      return cb();
    }
    script = script[0];

    var jsonList = mono.findJson(script, [/"assets":/, /"sts":\d+/]);
    if (!jsonList.length) {
      return cb();
    }
    jsonList = jsonList[0];

    if (!jsonList.sts || !jsonList.assets || !jsonList.assets.js) {
      return cb();
    }

    return cb({sts: parseInt(jsonList.sts), url: jsonList.assets.js});
  },

  getCurrentSts: function(cb) {
    "use strict";
    mono.ajax({
      url: 'http://www.youtube.com/',
      success: function(data) {
        if (!data) {
          return cb();
        }
        this.getSignatureFromHtml(data, cb);
      }.bind(this),
      error: function() {
        cb();
      }
    });
  }
};

if (typeof window === 'undefined') {
  exports.init = function(_mono, _engine) {
    mono = _mono;
    engine = _engine;
    youtube_com_embed.addOnPrepareEvent();
    return youtube_com_embed;
  };
} else {
  engine.modules.youtube = youtube_com_embed;
  youtube_com_embed.addOnPrepareEvent();
}

var facebook_com_embed = {
  getFacebookLinks: function(request, callback) {
    var callback_links = function (links, title, thumb, duration) {
      var response = {
        action: request.action,
        extVideoId: request.extVideoId,
        links: links || null,
        title: title || '',
        thumb: thumb || '',
        duration: duration || ''
      };

      callback(response);
    };

    facebook_com_embed._getFacebookLinks(request.extVideoId, callback_links);
  },

  _getFacebookLinks: function(videoId, cb) {
    mono.ajax({
      type: 'GET',
      url: 'https://www.facebook.com/video.php?v='+videoId,
      success: function(data) {
        if (data) {
          return facebook_com_embed.getLinksFromData(data, videoId, cb);
        }
        cb();
      },
      error: function() {
        cb();
      }
    });
  },
  getLinksFromData: function(data, videoId, cb) {
    "use strict";
    var match = data.match(/\["params","([^"]*)"\]/im);
    var mTitle = data.match(/<h2[^>]*>([^<]*)<\/h2>/im);
    if (!mTitle) {
      mTitle = ['',''];
    }
    if (!match) {
      return this.getLinksFromData2(data, videoId, cb);
    }
    var videoData = null;
    try {
      videoData = JSON.parse(decodeURIComponent(JSON.parse('"'+match[1]+'"'))).video_data;
      if (videoData.progressive) {
        videoData = videoData.progressive;
      }
      if (!videoData) {
        return cb();
      }
    } catch (e) {
      return cb();
    }

    var thumb = null;
    var duration = null;

    var links = [];
    var typeMap = {
      sd_src: 'SD',
      hd_src: 'HD'
    };
    for (var i = 0, item; item = videoData[i]; i++) {
      ['sd_src', 'hd_src'].forEach(function(type) {
        if (item.thumbnail_src) {
          thumb = item.thumbnail_src;
        }

        if (item.video_duration) {
          duration = item.video_duration;
        }

        if (!item[type]) {
          return;
        }

        var ext = facebook_com_embed.getFileExtension(item[type], 'mp4');
        links.push({
          url: item[type],
          name: typeMap[type],
          type: ext,
          ext: ext.toUpperCase()
        });
      });
    }

    cb(links, mTitle[1], thumb, duration);
  },

  getLinksFromData2: function(data, videoId, cb) {
    "use strict";
    var title = data.match(/<h2[^>]*>([^<]*)<\/h2>/im);
    title = title && title[1];

    data = data.match(/"videoData":\[([^\]]+)\]/);
    data = data && data[1];

    if (!data) {
      return cb();
    }

    var jsonList = mono.findJson(data, [/"(sd|hd)_src":/, new RegExp(videoId)]);
    if (!jsonList || !jsonList.length) {
      return cb();
    }

    var params = jsonList[0];

    if (String(params.video_id) !== String(videoId)) {
      return cb();
    }

    var links = [];

    var ext;
    if (params.sd_src) {
      ext = facebook_com_embed.getFileExtension(params.sd_src, 'mp4');
      links.push({
        url: params.sd_src,
        name: 'SD',
        type: ext,
        ext: ext.toUpperCase()
      });
    }
    if (params.hd_src) {
      ext = facebook_com_embed.getFileExtension(params.hd_src, 'mp4');
      links.push({
        url: params.hd_src,
        name: 'HD',
        type: ext,
        ext: ext.toUpperCase()
      });
    }

    return cb(links, title, params.thumbnail_src, params.video_duration);
  },

  getFileExtension: function(str, def) {
    var ext = str.match(/\.([a-z0-9]{3,4})(\?|$)/i);
    if(ext) {
      ext = ext[1];
      return ext.toLowerCase();
    }

    return (def ? def : '');
  },

  getFacebookPhotoUrl: function(message, cb) {
    if (!message.fbid) {
      return cb();
    }
    mono.ajax({
      url: 'https://www.facebook.com/photo.php?fbid='+message.fbid,
      success: function(data) {
        if (!data) {
          return cb();
        }

        var m = data.match(/<a[^>]+fbPhotosPhotoActionsItem[^>]+href="([^">]+dl=1)"[^>]+>/i);
        if (m) {
          var url = m[1];
          url = url.replace(/&amp;/g, '&');
          return cb(url);
        }
        return cb();
      },
      error: function() {
        cb();
      }
    })
  }
};

if (typeof window === 'undefined') {
  exports.init = function(_mono, _engine) {
    mono = _mono;
    engine = _engine;
    return facebook_com_embed;
  };
} else {
  engine.modules.facebook = facebook_com_embed;
}

var mail_ru_embed = {
  getMailruLinks: function(request, callback) {
    function callback_links(links, title, thumb, vid, duration)
    {
      var response = {
        action: request.action,
        extVideoId: vid || request.extVideoId,
        links: links,
        title: title,
        thumb: thumb,
        duration: duration
      };

      callback(response);
    }

    mail_ru_embed._getMailruLinks(request.extVideoId, callback_links);
  },
  _getMailruLinks: function(pathname, callback) {
    var metadataUrl, vPath = pathname;
    var videoId = pathname.match(/\/([^\/]+)\/([^\/]+)\/video\/(.+).html/);
    if (!videoId) {
      videoId = pathname.match(/embed\/([^\/]+)\/([^\/]+)\/(.+).html/);
    }
    if (videoId) {
      metadataUrl = 'http://api.video.mail.ru/videos/' + videoId[1] + '/' + videoId[2] + '/' + videoId[3] + '.json';
      vPath = videoId[1] + '/' + videoId[2] + '/video/' + videoId[3]+'.html';
    }
    if (metadataUrl) {
      return mail_ru_embed.onGetMailruMetadataUrl(metadataUrl, vPath, callback);
    }
    mono.ajax({
      url: 'http://my.mail.ru/'+pathname,
      success: function(data) {
        if (!data || typeof data !== 'string') {
          return callback();
        }
        var data = data.match(/<meta\s+content="[^"]+(videoapi\.my\.mail[^&]+)&[^"]+"[^>]+\/>/);
        if (!data) {
          return callback();
        }
        data = decodeURIComponent(data[1]);
        var vid = data.substr(data.lastIndexOf('/')+1);
        metadataUrl = 'http://videoapi.my.mail.ru/videos/'+vid+'.json';
        mail_ru_embed.onGetMailruMetadataUrl(metadataUrl, vPath, callback);
      },
      error: function() {
        callback();
      }
    })
  },
  onGetMailruMetadataUrl: function(metadataUrl, vPath, callback) {
    mail_ru_embed.getMailruMetadata(metadataUrl, function(data) {
      if (!data || typeof data === 'string') {
        return callback();
      }
      mail_ru_embed.readMailruMetadata(data, function(_links, title, thumb, duration) {
        callback(mail_ru_embed.prepMailruLinks(_links), title, thumb, vPath, duration);
      });
    });
  },
  prepMailruLinks: function(_links) {
    if (!_links) {
       return;
    }
    var links = [];
    for (var i = 0, link; link = _links[i]; i++) {
      var url = link.url;
      var format = 'FLV';
      if (url.indexOf('.mp4') !== -1) {
        format = 'MP4';
      }
      if (url.indexOf('.mov') !== -1) {
        format = 'MOV';
      }
      if (url.indexOf('.mpg') !== -1) {
        format = 'MPG';
      }
      if (!link.quality) {
        link.quality = '-?-';
      }
      var quality = link.quality.toUpperCase();

      var qList = ['1080P', '720P', '480P', '360P', '272P'];
      var tList = ['1080', '720', '480', '360', '272'];

      var qPos = qList.indexOf(quality);
      if (qPos !== -1) {
        quality = tList[qPos];
      }

      var ext = format.toLowerCase();
      links.push({
        url: url,
        subname: quality,
        name: format,
        ext: ext
      });
    }
    links.sort(function(a, b) {
      if (a.subname === 'HD') {
        return 1;
      }
      return a.subname > b.subname;
    });
    return links;
  },
  getMailruMetadata: function(url, cb) {
    if (!url) {
      return cb();
    }
    mono.ajax({
      url: url,
      success: function(data) {
        var obj;
        try {
          obj = JSON.parse(data);
        } catch (e) {}
        cb(obj);
      },
      error: function(xhr) {
        cb();
      }
    });
  },
  readMailruMetadata: function(metadata, cb) {
    var links = [], title;
    /**
     * @namespace metadata.provider Object
     * @namespace metadata.movie Object
     * @namespace metadata.videos Object
     * @namespace metadata.meta Object
     * @namespace metadata.meta.poster Object
     */
    var duration = undefined;
    var thumb = undefined;
    if (metadata.meta) {
      thumb = metadata.meta.poster;
      duration = metadata.meta.duration;
    }
    if (metadata.provider === 'UPLOADED') {
      title = metadata.movie?metadata.movie.title:undefined;
      if (!metadata.videos) {
        return cb();
      }
      metadata.videos.forEach(function(item) {
        links.push({
          quality: item.name,
          url: item.url,
          title: title
        });
      });
    } else
    if (metadata.provider === 'ugc') {
      title = metadata.meta?metadata.meta.title:undefined;
      if (!metadata.videos) {
        return cb();
      }
      metadata.videos.forEach(function(item) {
        links.push({
          quality: item.key,
          url: item.url,
          title: title
        });
      });
    } else
    if (metadata.provider === 'pladform') {
      title = metadata.meta?metadata.meta.title:undefined;
      var okEmbed = engine.modules.odnoklassniki;
      okEmbed.getPladformVideo({
        extVideoId: {
          playerId: metadata.meta.playerId,
          videoId: metadata.meta.videoId
        }
      }, function(response) {
        if (!response) {
          return cb();
        }

        if (response.action === 'getRutubeLinks') {
          response.links = null;
        }

        var links = response.links;
        if (!links) {
          return cb();
        }
        links.forEach(function(item) {
          if (item.title === undefined) {
            item.title = title
          }
        });
        cb(links, title, thumb, duration);
      });
      return;
    }
    if (links.length === 0) {
      return cb();
    }
    return cb(links, title, thumb, duration);
  }
};

if (typeof window === 'undefined') {
  exports.init = function(_mono, _engine) {
    mono = _mono;
    engine = _engine;
    return mail_ru_embed;
  };
} else {
  engine.modules.mail_ru = mail_ru_embed;
}

var SaveFrom_Utils = {
  downloadParam: 'sfh--download',

  setStyle: function(node, style)
  {
    if(!node || !style)
      return;

    for(var i in style)
      node.style[i] = style[i];
  },


  getStyle: function(node, property)
  {
    var s = undefined;
    if(!node)
      return undefined;

    if(node.currentStyle)
    {
      property = property.replace(/-(w)/g, function(s, m){return m.toUpperCase()});
      return node.currentStyle[property];
    }

    if(window.getComputedStyle)
      return window.getComputedStyle(node, null).getPropertyValue(property);

    return undefined;
  },

  addStyleRules: function(selector, rules, className)
  {
    var style = className ? document.querySelector('#savefrom-styles.'+className) : document.getElementById('savefrom-styles');
    if(!style)
    {
      style = document.createElement('style');
      style.id = 'savefrom-styles';
      if (className) {
        style.classList.add(className);
      }
      // maybe need for safari
      //style.appendChild(document.createTextNode(""));
      var s = document.querySelector('head style');
      if(s)
      // allow to override our styles
        s.parentNode.insertBefore(style, s);
      else
        document.querySelector('head').appendChild(style);
    }

    if(typeof(rules) == 'object') {
      var r = [];
      for(var i in rules)
        r.push(i + ':' + rules[i]);

      rules = r.join(';');
    }

    style.textContent += selector + '{' + rules + '}';
  },

  getPosition: function(node, parent)
  {
    var box = node.getBoundingClientRect();

    if (parent) {
      var parent_pos = parent.getBoundingClientRect();
      return {
        top: Math.round(box.top - parent_pos.top),
        left: Math.round(box.left - parent_pos.left),
        width: box.width,
        height: box.height
      }
    }
    return {
      top: Math.round(box.top + window.pageYOffset),
      left: Math.round(box.left + window.pageXOffset),
      width: box.width,
      height: box.height
    }
  },

  getSize: function(node)
  {
    return {width: node.offsetWidth, height: node.offsetHeight};
  },

  getMatchFirst: function(str, re)
  {
    var m = str.match(re);
    if(m && m.length > 1)
      return m[1];

    return '';
  },

  /*@if isVkOnly=0>*/
  getElementByIds: function(ids)
  {
    for(var i = 0; i < ids.length; i++)
    {
      var node = document.getElementById(ids[i]);
      if(node)
        return node;
    }

    return null;
  },
  /*@if isVkOnly=0<*/

  getParentByClass: function(node, name) {
    if(!node || name == '') {
      return false;
    }

    var parent;
    if(typeof name === 'object' && name.length > 0) {
      for(parent = node; parent; parent = parent.parentNode) {
        if (parent.nodeType !== 1) {
          return null;
        }
        for(var i = 0; i < name.length; i++) {
          if(parent.classList.contains(name[i])) {
            return parent;
          }
        }
      }
    } else {
      for(parent = node; parent; parent = parent.parentNode) {
        if (parent.nodeType !== 1) {
          return null;
        }
        if(parent.classList.contains(name)) {
          return parent;
        }
      }
    }

    return null;
  },

  getParentByTagName: function(node, tagName) {
    if(!node || tagName == '') {
      return false;
    }

    for(var parent = node; parent; parent = parent.parentNode) {
      if (parent.nodeType !== 1) {
        return null;
      }
      if(parent.tagName === tagName) {
        return parent;
      }
    }

    return null;
  },

  getParentById: function(node, id) {
    for(var parent = node; parent; parent = parent.parentNode) {
      if (parent.nodeType !== 1) {
        return null;
      }

      if(parent.id === id) {
        return parent;
      }
    }

    return null;
  },

  /*@if isVkOnly=0>*/
  hasChildrenTagName: function(node, tagName) {
    for (var i = 0, item; item = node.childNodes[i]; i++) {
      if (item.nodeType !== 1) {
        continue;
      }
      if (item.tagName === tagName) {
        return true;
      }
    }
    return false;
  },
  /*@if isVkOnly=0<*/

  isParent: function(node, testParent)
  {
    if (!testParent || [1, 9, 11].indexOf(testParent.nodeType) === -1) {
      return false;
    }

    return testParent.contains(node);
  },


  emptyNode: function(node)
  {
    while(node.firstChild)
      node.removeChild(node.firstChild);
  },

  /*@if isVkOnly=0>*/
  initFrameDownloadListener: function() {
    if (SaveFrom_Utils.initFrameDownloadListener.enable === 1) {
      return;
    }
    SaveFrom_Utils.initFrameDownloadListener.enable = 1;
    window.addEventListener("message", function listener(e) {
      if (e.data.substr(0, 6) !== 'killMe') {
        return;
      }
      var src = e.data.substr(7);
      var frameList = document.querySelectorAll('iframe.sf-dl-frame');
      var frameListLen = frameList.length;
      for (var f = 0, el; el = frameList[f]; f++) {
        if (el.src === src) {
          el.parentNode.removeChild(el);
          frameListLen--;
          break;
        }
      }
      if (frameListLen === 0) {
        SaveFrom_Utils.initFrameDownloadListener.enable = 0;
        window.removeEventListener("message", listener);
      }
    });
  },
  /*@if isVkOnly=0<*/

  download: function(filename, url, requestOptions, callback, options)
  {
    if(!url)
      return false;

    filename = filename || this.getFileName(url);
    if(!filename)
      return false;

    options = options || {};

    /*@if isVkOnly=0>*/
    if (!mono.global.preference.downloads) {
      if (options.useFrame && this.downloadCheckProtocol(url)) {
        SaveFrom_Utils.initFrameDownloadListener();
        var src = this.getMatchFirst(url, /(^https?:\/\/[^\/]+)/);

        if(src == location.protocol + '//' + location.host) {
          var a = document.createElement('a');
          a.style.display = 'none';
          a.href = url;
          a.download = filename;
          document.body.appendChild(a);
          setTimeout(function() {
            mono.trigger(a, 'click', {
              cancelable: true
            });
            setTimeout(function(){
              a.parentNode.removeChild(a);
            }, 100);
          });
        }
        else {
          var params = {url: url, filename: filename};
          params = encodeURIComponent(JSON.stringify(params));

          src += '/404?#' + this.downloadParam + '=' + params;

          var f = document.createElement('iframe');
          f.src = src;
          f.classList.add('sf-dl-frame');
          f.style.display = 'none';

          document.body.appendChild(f);
        }

        return true;
      }

      return false;
    }
    /*@if isVkOnly=0<*/

    var params = requestOptions || {};
    params.url = url;
    params.filename = filename;

    var request = {
      action: 'downloadFile',
      options: params
    };

    callback = callback || undefined;

    mono.sendMessage(request, callback);
    return true;
  },

  downloadList: {
    showDownloadWarningPopup: function(onContinue, type) {
      var template = SaveFrom_Utils.playlist.getInfoPopupTemplate();

      mono.sendMessage({action: 'getWarningIcon', type: type}, function(icon) {
        template.icon.style.backgroundImage = 'url(' + icon + ')';
      });

      mono.create(template.textContainer, {
        append: [
          mono.create('p', {
            text: mono.global.language.warningPopupTitle,
            style: {
              color: '#0D0D0D',
              fontSize: '20px',
              marginBottom: '11px',
              marginTop: '13px'
            }
          }),
          mono.create('p', {
            text: mono.global.language.warningPopupDesc+' ',
            style: {
              color: '#868686',
              fontSize: '14px',
              marginBottom: '13px',
              lineHeight: '24px',
              marginTop: '0px'
            },
            append: mono.create('a', {
              href: (mono.global.language.lang === 'ru' || mono.global.language.lang === 'uk')?'http://vk.com/page-55689929_49003549':'http://vk.com/page-55689929_49004259',
              text: mono.global.language.readMore,
              target: '_blank',
              style: {
                color: '#4A90E2'
              }
            })
          }),
          mono.create('p', {
            style: {
              marginBottom: '13px'
            },
            append: [
              mono.create('label', {
                style: {
                  color: '#868686',
                  cursor: 'pointer',
                  fontSize: '14px',
                  lineHeight: '19px'
                },
                append: [
                  mono.create('input', {
                    type: 'checkbox',
                    style: {
                      cssFloat: 'left',
                      marginLeft: '0px'
                    },
                    on: ['click', function() {
                      mono.sendMessage({action: 'hideDownloadWarning', set: this.checked?1:0});
                    }]
                  }),
                  mono.global.language.noWarning
                ]
              })
            ]
          })
        ]
      });

      var cancelBtn = undefined;
      var continueBtn = undefined;
      mono.create(template.buttonContainer, {
        append: [
          cancelBtn = mono.create('button', {
            text: mono.global.language.cancel,
            style: {
              height: '27px',
              width: '118px',
              backgroundColor: '#ffffff',
              border: '1px solid #9e9e9e',
              margin: '12px',
              marginBottom: '11px',
              marginRight: '4px',
              borderRadius: '5px',
              fontSize: '14px',
              cursor: 'pointer'
            }
          }),
          continueBtn = mono.create('button', {
            text: mono.global.language.continue,
            style: {
              height: '27px',
              width: '118px',
              backgroundColor: '#ffffff',
              border: '1px solid #9e9e9e',
              margin: '12px',
              marginBottom: '11px',
              marginRight: '8px',
              borderRadius: '5px',
              fontSize: '14px',
              cursor: 'pointer'
            }
          })
        ]
      });

      cancelBtn.addEventListener('click', function(e) {
        var popup = template.body.parentNode;
        mono.trigger(popup.lastChild, 'click');
      });

      continueBtn.addEventListener('click', function(e) {
        e.preventDefault();
        e.stopPropagation();

        onContinue();
        mono.trigger(cancelBtn, 'click');
      });

      SaveFrom_Utils.popupDiv(template.body, 'dl_warning_box_popup');
    },
    startChromeDownloadList: function(options, hideDialog) {
      var folderName = options.folderName;
      var linkList = options.list;
      var dataType = options.type;

      if (folderName) {
        folderName += '/';
      }

      var itemIndex = 0;
      var pause = false;
      var timeout = 500;

      var focusEl = document.body;

      focusEl.focus();

      if (!hideDialog) {
        focusEl.onblur = function () {
          pause = true;
        };
      }

      var nextOneFile = function() {
        var item = linkList[itemIndex];
        itemIndex++;

        if (item === undefined) {
          return;
        }

        if (mono.global.preference.downloads) {
          SaveFrom_Utils.download(folderName+item.filename, item.url);
        } else {
          mono.trigger(mono.create('a', {
            download: item.filename,
            href: item.url,
            on: ['click', function(e) {
              SaveFrom_Utils.downloadOnClick(e, null, {
                useFrame: true
              });
            }]
          }), 'click', {
            cancelable: true
          });
        }

        if (pause) {
          SaveFrom_Utils.downloadList.showDownloadWarningPopup(function() {
            pause = false;
            focusEl.focus();
            nextOneFile();
          }, dataType);
        } else {
          if (itemIndex > 5 && timeout) {
            timeout = undefined;
            focusEl.onblur = undefined;
            pause = false;
            if (mono.global.preference.downloads) {
              mono.sendMessage({action: 'downloadList', fileList: linkList.slice(itemIndex), path: folderName});
              return;
            }
          }

          setTimeout(function() {
            nextOneFile();
          }, timeout);
        }
      };

      nextOneFile();
    },
    startFfDownloadList: function(linkList, folderName) {
      mono.sendMessage({action: 'getPath', folder: folderName}, function (path) {
        mono.sendMessage({action: 'downloadList', fileList: linkList, path: path}, undefined, "service");
      }, "service");
    },
    startDownload: function(options) {
      options.list.forEach(function(item) {
        item.filename = mono.fileName.modify(item.filename);
      });

      options.folderName =  mono.fileName.modify(options.folderName);

      if (mono.isFF) {
        return SaveFrom_Utils.downloadList.startFfDownloadList(options.list, options.folderName);
      }

      if (mono.isChrome || mono.isGM) {
        return mono.sendMessage({action: 'hideDownloadWarning'}, function(state) {
          SaveFrom_Utils.downloadList.startChromeDownloadList(options, state);
        });
      }
    },
    showBeforeDownloadPopup: function(list, options) {
      options.list = list;
      var type = options.type;
      var folderName = options.folderName;
      var onContinue = options.onContinue || SaveFrom_Utils.downloadList.startDownload;
      var onShowList = options.onShowList || SaveFrom_Utils.playlist.popupFilelist;
      var count = options.count || list.length;
      var template = SaveFrom_Utils.playlist.getInfoPopupTemplate();

      mono.sendMessage({action: 'getWarningIcon', color: '#00CCFF', type: type}, function(icon) {
        template.icon.style.backgroundImage = 'url('+icon+')';
      });

      var showListLink = [];
      if (onShowList) {
        showListLink = [' (',mono.create('a', {href: '#', text: mono.global.language.vkListOfLinks.toLowerCase()}),')'];
        showListLink[1].addEventListener('click', function(e) {
          e.preventDefault();
          e.stopPropagation();
          onShowList(options.list);
          mono.trigger(cancelBtn, 'click');
        });
      }

      mono.create(template.textContainer, {
        append: [
          mono.create('p', {
            text: folderName || mono.global.language.playlistTitle,
            style: {
              color: '#0D0D0D',
              fontSize: '20px',
              marginBottom: '11px',
              marginTop: '13px'
            }
          }),
          mono.create('p', {
            text: mono.global.language.vkFoundFiles.replace('%d', count),
            style: {
              color: '#868686',
              fontSize: '14px',
              marginBottom: '13px',
              lineHeight: '24px',
              marginTop: '0px'
            },
            append: showListLink
          }),
          mono.create('p', {
            text: mono.global.language.beforeDownloadPopupWarn,
            style: {
              color: '#868686',
              fontSize: '14px',
              marginBottom: '13px',
              lineHeight: '24px',
              marginTop: '0px'
            }
          })
        ]
      });

      var cancelBtn = undefined;
      var dlBtn = undefined;
      mono.create(template.buttonContainer, {
        append: [
          cancelBtn = mono.create('button', {
            text: mono.global.language.cancel,
            style: {
              height: '27px',
              width: '118px',
              backgroundColor: '#ffffff',
              border: '1px solid #9e9e9e',
              margin: '12px',
              marginBottom: '11px',
              marginRight: '4px',
              borderRadius: '5px',
              fontSize: '14px',
              cursor: 'pointer'
            }
          }),
          dlBtn = mono.create('button', {
            text: mono.global.language.continue,
            style: {
              height: '27px',
              width: '118px',
              backgroundColor: '#ffffff',
              border: '1px solid #9e9e9e',
              margin: '12px',
              marginBottom: '11px',
              marginRight: '8px',
              borderRadius: '5px',
              fontSize: '14px',
              cursor: 'pointer'
            }
          })
        ]
      });

      cancelBtn.addEventListener('click', function(e) {
        var popup = template.body.parentNode;
        mono.trigger(popup.lastChild, 'click');
      });

      dlBtn.addEventListener('click', function(e) {
        e.preventDefault();
        e.stopPropagation();

        onContinue(options);
        mono.trigger(cancelBtn, 'click');
      });

      SaveFrom_Utils.popupDiv(template.body, 'dl_confirm_box_popup');
    }
  },

  /*@if isVkOnly=0>*/
  downloadCheckProtocol: function(url) {
    if(location.protocol == 'http:') {
      return true;
    }

    if(!url) {
      return false;
    }

    url = url.toLowerCase();

    if(location.protocol == url.substr(0, location.protocol.length)) {
      return true;
    }

    return false;
  },
  /*@if isVkOnly=0<*/

  downloadLink: function(a, callback, options)
  {
    if(!a.href)
      return false;

    var filename = a.getAttribute('download');

    return this.download(filename, a.href, null, callback, options);
  },


  downloadOnClick: function(event, callback, options)
  {
    options = options || {};
    var _this = SaveFrom_Utils;

    var node = options.el || event.target;
    if(node.tagName !== 'A') {
      node = node.parentNode;
    }

    /*@if isVkOnly=0>*/
    if ( !mono.global.preference.downloads &&
      !(mono.global.preference.iframeDownload && options.useFrame && node.href && _this.downloadCheckProtocol(node.href)) ) {
      return;
    }
    /*@if isVkOnly=0<*/

    if(event.button === 2) {
      return;
    }

    event.preventDefault();
    event.stopPropagation();

    _this.downloadLink(node, callback, options);
  },

  getQueryString: function(query, key_prefix, key_suffix)
  {
    if(!query || typeof(query) != 'object')
      return '';

    if(key_prefix === undefined)
      key_prefix = '';

    if(key_suffix === undefined)
      key_suffix = '';

    var str = '';
    for(var key in query)
    {
      if(str.length)
        str += '&';

      if(query[key] instanceof Object)
      {
        if(!key_prefix)
          key_prefix = '';

        if(!key_suffix)
          key_suffix = '';

        str += SaveFrom_Utils.getQueryString(query[key], key_prefix + key + "[", "]" + key_suffix);
      }
      else
        str += key_prefix + escape(key) + key_suffix + '=' + escape(query[key]);
    }

    return str;
  },

  /*@if isVkOnly=0>*/
  md5: function(str)
  {
    // http://kevin.vanzonneveld.net
    // +   original by: Webtoolkit.info (http://www.webtoolkit.info/)
    // + namespaced by: Michael White (http://getsprink.com)
    // +    tweaked by: Jack
    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +      input by: Brett Zamir (http://brett-zamir.me)
    // +   bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // -    depends on: utf8_encode
    // *     example 1: md5('Kevin van Zonneveld');
    // *     returns 1: '6e658d4bfcb59cc13f96c14450ac40b9'
    var xl;

    var rotateLeft = function (lValue, iShiftBits) {
      return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
    };

    var addUnsigned = function (lX, lY) {
      var lX4, lY4, lX8, lY8, lResult;
      lX8 = (lX & 0x80000000);
      lY8 = (lY & 0x80000000);
      lX4 = (lX & 0x40000000);
      lY4 = (lY & 0x40000000);
      lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
      if (lX4 & lY4) {
        return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
      }
      if (lX4 | lY4) {
        if (lResult & 0x40000000) {
          return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
        } else {
          return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
        }
      } else {
        return (lResult ^ lX8 ^ lY8);
      }
    };

    var _F = function (x, y, z) {
      return (x & y) | ((~x) & z);
    };
    var _G = function (x, y, z) {
      return (x & z) | (y & (~z));
    };
    var _H = function (x, y, z) {
      return (x ^ y ^ z);
    };
    var _I = function (x, y, z) {
      return (y ^ (x | (~z)));
    };

    var _FF = function (a, b, c, d, x, s, ac) {
      a = addUnsigned(a, addUnsigned(addUnsigned(_F(b, c, d), x), ac));
      return addUnsigned(rotateLeft(a, s), b);
    };

    var _GG = function (a, b, c, d, x, s, ac) {
      a = addUnsigned(a, addUnsigned(addUnsigned(_G(b, c, d), x), ac));
      return addUnsigned(rotateLeft(a, s), b);
    };

    var _HH = function (a, b, c, d, x, s, ac) {
      a = addUnsigned(a, addUnsigned(addUnsigned(_H(b, c, d), x), ac));
      return addUnsigned(rotateLeft(a, s), b);
    };

    var _II = function (a, b, c, d, x, s, ac) {
      a = addUnsigned(a, addUnsigned(addUnsigned(_I(b, c, d), x), ac));
      return addUnsigned(rotateLeft(a, s), b);
    };

    var convertToWordArray = function (str) {
      var lWordCount;
      var lMessageLength = str.length;
      var lNumberOfWords_temp1 = lMessageLength + 8;
      var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64;
      var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16;
      var lWordArray = new Array(lNumberOfWords - 1);
      var lBytePosition = 0;
      var lByteCount = 0;
      while (lByteCount < lMessageLength) {
        lWordCount = (lByteCount - (lByteCount % 4)) / 4;
        lBytePosition = (lByteCount % 4) * 8;
        lWordArray[lWordCount] = (lWordArray[lWordCount] | (str.charCodeAt(lByteCount) << lBytePosition));
        lByteCount++;
      }
      lWordCount = (lByteCount - (lByteCount % 4)) / 4;
      lBytePosition = (lByteCount % 4) * 8;
      lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
      lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
      lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
      return lWordArray;
    };

    var wordToHex = function (lValue) {
      var wordToHexValue = "",
        wordToHexValue_temp = "",
        lByte, lCount;
      for (lCount = 0; lCount <= 3; lCount++) {
        lByte = (lValue >>> (lCount * 8)) & 255;
        wordToHexValue_temp = "0" + lByte.toString(16);
        wordToHexValue = wordToHexValue + wordToHexValue_temp.substr(wordToHexValue_temp.length - 2, 2);
      }
      return wordToHexValue;
    };

    var x = [],
      k, AA, BB, CC, DD, a, b, c, d, S11 = 7,
      S12 = 12,
      S13 = 17,
      S14 = 22,
      S21 = 5,
      S22 = 9,
      S23 = 14,
      S24 = 20,
      S31 = 4,
      S32 = 11,
      S33 = 16,
      S34 = 23,
      S41 = 6,
      S42 = 10,
      S43 = 15,
      S44 = 21;

    //str = this.utf8_encode(str);
    x = convertToWordArray(str);
    a = 0x67452301;
    b = 0xEFCDAB89;
    c = 0x98BADCFE;
    d = 0x10325476;

    xl = x.length;
    for (k = 0; k < xl; k += 16) {
      AA = a;
      BB = b;
      CC = c;
      DD = d;
      a = _FF(a, b, c, d, x[k + 0], S11, 0xD76AA478);
      d = _FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756);
      c = _FF(c, d, a, b, x[k + 2], S13, 0x242070DB);
      b = _FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE);
      a = _FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF);
      d = _FF(d, a, b, c, x[k + 5], S12, 0x4787C62A);
      c = _FF(c, d, a, b, x[k + 6], S13, 0xA8304613);
      b = _FF(b, c, d, a, x[k + 7], S14, 0xFD469501);
      a = _FF(a, b, c, d, x[k + 8], S11, 0x698098D8);
      d = _FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF);
      c = _FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1);
      b = _FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE);
      a = _FF(a, b, c, d, x[k + 12], S11, 0x6B901122);
      d = _FF(d, a, b, c, x[k + 13], S12, 0xFD987193);
      c = _FF(c, d, a, b, x[k + 14], S13, 0xA679438E);
      b = _FF(b, c, d, a, x[k + 15], S14, 0x49B40821);
      a = _GG(a, b, c, d, x[k + 1], S21, 0xF61E2562);
      d = _GG(d, a, b, c, x[k + 6], S22, 0xC040B340);
      c = _GG(c, d, a, b, x[k + 11], S23, 0x265E5A51);
      b = _GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA);
      a = _GG(a, b, c, d, x[k + 5], S21, 0xD62F105D);
      d = _GG(d, a, b, c, x[k + 10], S22, 0x2441453);
      c = _GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681);
      b = _GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8);
      a = _GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6);
      d = _GG(d, a, b, c, x[k + 14], S22, 0xC33707D6);
      c = _GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87);
      b = _GG(b, c, d, a, x[k + 8], S24, 0x455A14ED);
      a = _GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905);
      d = _GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8);
      c = _GG(c, d, a, b, x[k + 7], S23, 0x676F02D9);
      b = _GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A);
      a = _HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942);
      d = _HH(d, a, b, c, x[k + 8], S32, 0x8771F681);
      c = _HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122);
      b = _HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C);
      a = _HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44);
      d = _HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9);
      c = _HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60);
      b = _HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70);
      a = _HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6);
      d = _HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA);
      c = _HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085);
      b = _HH(b, c, d, a, x[k + 6], S34, 0x4881D05);
      a = _HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039);
      d = _HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5);
      c = _HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8);
      b = _HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665);
      a = _II(a, b, c, d, x[k + 0], S41, 0xF4292244);
      d = _II(d, a, b, c, x[k + 7], S42, 0x432AFF97);
      c = _II(c, d, a, b, x[k + 14], S43, 0xAB9423A7);
      b = _II(b, c, d, a, x[k + 5], S44, 0xFC93A039);
      a = _II(a, b, c, d, x[k + 12], S41, 0x655B59C3);
      d = _II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92);
      c = _II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D);
      b = _II(b, c, d, a, x[k + 1], S44, 0x85845DD1);
      a = _II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F);
      d = _II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0);
      c = _II(c, d, a, b, x[k + 6], S43, 0xA3014314);
      b = _II(b, c, d, a, x[k + 13], S44, 0x4E0811A1);
      a = _II(a, b, c, d, x[k + 4], S41, 0xF7537E82);
      d = _II(d, a, b, c, x[k + 11], S42, 0xBD3AF235);
      c = _II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB);
      b = _II(b, c, d, a, x[k + 9], S44, 0xEB86D391);
      a = addUnsigned(a, AA);
      b = addUnsigned(b, BB);
      c = addUnsigned(c, CC);
      d = addUnsigned(d, DD);
    }

    var temp = wordToHex(a) + wordToHex(b) + wordToHex(c) + wordToHex(d);

    return temp.toLowerCase();
  },
  /*@if isVkOnly=0<*/


  decodeUnicodeEscapeSequence: function(text)
  {
    return text.replace(/\\u([0-9a-f]{4})/g, function(s, m){
      m = parseInt(m, 16);
      if(!isNaN(m))
      {
        return String.fromCharCode(m);
      }
    });
  },


  getFileExtension: function(str, def)
  {
    var ext = this.getMatchFirst(str, /\.([a-z0-9]{3,4})(\?|$)/i);
    if(ext)
      return ext.toLowerCase();

    return (def ? def : '');
  },


  getFileName: function(url)
  {
    var filename = this.getMatchFirst(url, /\/([^\?#\/]+\.[a-z\d]{2,6})(?:\?|#|$)/i);
    if(!filename)
      return filename;

    return mono.fileName.modify(filename);
  },


  getTopLevelDomain: function(domain)
  {
    if(!domain)
      return '';

    if(!domain.match(/^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}/))
      return domain;

    var a = domain.split('.');
    var l = a.length;

    if(l == 2)
      return domain;

    return (a[l - 2] + '.' + a[l - 1]);
  },


  dateToObj: function(ts, leadingZero)
  {
    var d = (ts === null || ts === undefined) ? new Date() : new Date(ts);

    if(leadingZero === undefined)
      leadingZero = true;

    var res = {
      year: d.getFullYear(),
      month: (d.getMonth() + 1),
      day: d.getDate(),
      hour: d.getHours(),
      min: d.getMinutes(),
      sec: d.getSeconds()
    };

    if(leadingZero)
    {
      for(var i in res)
      {
        if(res[i].toString().length == 1)
          res[i] = '0' + res[i];
      }
    }

    return res;
  },


  utf8Encode: function(str)
  {
    str = str.replace(/\r\n/g,"\n");
    var res = "";

    for (var n = 0; n < str.length; n++)
    {
      var c = str.charCodeAt(n);

      if (c < 128)
        res += String.fromCharCode(c);
      else if((c > 127) && (c < 2048))
      {
        res += String.fromCharCode((c >> 6) | 192);
        res += String.fromCharCode((c & 63) | 128);
      }
      else
      {
        res += String.fromCharCode((c >> 12) | 224);
        res += String.fromCharCode(((c >> 6) & 63) | 128);
        res += String.fromCharCode((c & 63) | 128);
      }

    }

    return res;
  },

  sizeHuman: function(size, round)
  {
    if(round == undefined || round == null)
      round = 2;

    var s = size, count = 0, sign = '', unite_spec = [
      mono.global.language.vkFileSizeByte,
      mono.global.language.vkFileSizeKByte,
      mono.global.language.vkFileSizeMByte,
      mono.global.language.vkFileSizeGByte,
      mono.global.language.vkFileSizeTByte
    ];

    if(s < 0)
    {
      sign = '-';
      s = Math.abs(s);
    }

    while(s >= 1000)
    {
      count++;
      s /= 1024;
    }

    if(round >= 0)
    {
      var m = round * 10;
      s = Math.round(s * m) / m;
    }

    if(count < unite_spec.length)
      return sign + s + ' ' + unite_spec[count];

    return size;
  },

  /*@if isVkOnly=0>*/
  secondsToDuration: function(seconds)
  {
    if(!seconds || isNaN(seconds))
      return '';

    function zfill(time)
    {
      if(time < 10)
        return '0' + time;

      return time.toString();
    }

    var hours = Math.floor(seconds / 3600);
    seconds %= 3600;

    var minutes = Math.floor(seconds / 60);
    seconds %= 60;

    if(hours > 0)
      return hours + ":" + zfill(minutes) + ":" + zfill(seconds);

    return minutes + ":" + zfill(seconds);
  },
  /*@if isVkOnly=0<*/

  svg: {
    icon: {
      download: 'M 4,0 4,8 0,8 8,16 16,8 12,8 12,0 4,0 z',
      info: 'M 8,1.55 C 11.6,1.55 14.4,4.44 14.4,8 14.4,11.6 11.6,14.4 8,14.4 4.44,14.4 1.55,11.6 1.55,8 1.55,4.44 4.44,1.55 8,1.55 M 8,0 C 3.58,0 0,3.58 0,8 0,12.4 3.58,16 8,16 12.4,16 16,12.4 16,8 16,3.58 12.4,0 8,0 L 8,0 z M 9.16,12.3 H 6.92 V 7.01 H 9.16 V 12.3 z M 8.04,5.91 C 7.36,5.91 6.81,5.36 6.81,4.68 6.81,4 7.36,3.45 8.04,3.45 8.72,3.45 9.27,4 9.27,4.68 9.27,5.36 8.72,5.91 8.04,5.91 z',
      noSound: 'M 11.4,5.05 13,6.65 14.6,5.05 16,6.35 14.4,7.95 16,9.55 14.6,11 13,9.35 11.4,11 10,9.55 11.6,7.95 10,6.35 z M 8,1.75 8,14.3 4,10.5 l -4,0 0,-4.75 4,0 z'
    },

    cache: {},

    getSrc: function(icon, color)
    {
      if(!this.icon[icon])
        return '';

      if(!this.cache[icon])
        this.cache[icon] = {};

      if(!this.cache[icon][color])
      {
        //todo: chrome 47 fix
        var _btoa = mono.isTM ? window.btoa : btoa;
        this.cache[icon][color] = _btoa(
            '<?xml version="1.0" encoding="UTF-8"?>' +
            '<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="16" height="16" viewBox="0 0 16 16" id="svg2" xml:space="preserve">' +
            '<path d="' + this.icon[icon] + '" fill="' + color + '" /></svg>'
        );
      }

      if(this.cache[icon][color])
        return 'data:image/svg+xml;base64,' + this.cache[icon][color];

      return '';
    }
  },

  /*@if isVkOnly=0>*/
  appendDownloadInfo: function(parent, color, boxStyle, btnStyle)
  {
    if(!color)
      color = '#a0a0a0';

    var info = document.createElement('span');
    info.appendChild(document.createTextNode(mono.global.language.downloadTitle));
    this.setStyle(info, {
      display: 'inline-block',
      position: 'relative',
      border: '1px solid ' + color,
      borderRadius: '5px',
      fontSize: '13px',
      lineHeight: '17px',
      padding: '2px 19px 2px 5px',
      marginTop: '5px',
      opacity: 0.9
    });

    if(boxStyle)
      this.setStyle(info, boxStyle);

    var close = document.createElement('span');
    close.textContent = String.fromCharCode(215);
    this.setStyle(close, {
      color: color,
      width: '14px',
      height: '14px',
      fontSize: '14px',
      fontWeight: 'bold',
      lineHeight: '14px',
      position: 'absolute',
      top: 0,
      right: 0,
      overflow: 'hidden',
      cursor: 'pointer'
    });

    if(btnStyle)
      this.setStyle(close, btnStyle);

    close.addEventListener('click', function(){
      info.parentNode.removeChild(info);
      mono.sendMessage({action: 'updateOption', key: 'moduleShowDownloadInfo', value: 0});
    }, false);

    info.appendChild(close);
    parent.appendChild(info);
  },
  /*@if isVkOnly=0<*/

  appendFileSizeIcon: function(link, iconStyle, textStyle, error, noBrackets, container)
  {
    var iconColor = '#333333';
    if(error)
      iconColor = '#ff0000';
    else if(iconStyle && iconStyle.color)
      iconColor = iconStyle.color;

    var s = document.createElement('img');
    s.src = SaveFrom_Utils.svg.getSrc('info', iconColor);
    s.title = mono.global.language[error ? 'getFileSizeFailTitle' : 'getFileSizeTitle'];

    var defIconStyle = {
      width: '14px',
      height: '14px',
      marginLeft: '3px',
      verticalAlign: 'middle',
      position: 'relative',
      top: '-1px',
      cursor: 'pointer'
    };

    var defTextStyle = {
      fontSize: '75%',
      fontWeight: 'normal',
      marginLeft: '3px',
      whiteSpace: 'nowrap'
    };

    var _this = this;

    this.setStyle(s, defIconStyle);
    if(iconStyle && typeof(iconStyle) == 'object')
      this.setStyle(s, iconStyle);

    if (container) {
      container.appendChild(s);
    } else
    if(link.nextSibling == null) {
      link.parentNode.appendChild(s);
    } else
    {
      link.parentNode.insertBefore(s, link.nextSibling);
    }

    s.addEventListener("click", function(event){
      event.preventDefault();
      event.stopPropagation();

      var node = document.createElement('span');
      node.textContent = '...';
      _this.setStyle(node, defTextStyle);
      if(textStyle && typeof(textStyle) == 'object')
        _this.setStyle(node, textStyle);

      s.parentNode.replaceChild(node, s);

      var request = {
        action: 'getFileSize',
        url: link.href
      };

      mono.sendMessage(request, function(response){
        if(response.fileSize == 0)
        {
          node.parentNode.removeChild(node);
          _this.appendFileSizeIcon(link, iconStyle, textStyle, true, noBrackets, container);
        }
        else
        {
          if(response.fileType.search(/^audio\//i) > -1)
          {
            var seconds = link.getAttribute('data-savefrom-helper-duration');
            if(seconds)
            {
              seconds = parseInt(seconds);
              if(!isNaN(seconds))
              {
                var size = _this.sizeHuman(response.fileSize, 2);
                var bitrate = Math.floor((response.fileSize / seconds) / 125) + ' ' +
                  mono.global.language.kbps;

                if (noBrackets) {
                  node.textContent = size + ' ~ ' + bitrate;
                } else {
                  node.textContent = '(' + size + ' ~ ' + bitrate + ')';
                }
                return;
              }
            }
          }

          if (noBrackets) {
            node.textContent = _this.sizeHuman(response.fileSize, 2);
          } else {
            node.textContent = '(' + _this.sizeHuman(response.fileSize, 2) + ')';
          }
          node.title = response.fileType ? response.fileType : '';
        }
      });
    }, false);

    return s;
  },

  appendNoSoundIcon: function(link, iconStyle)
  {
    var noSoundIconColor = '#ff0000';
    if(iconStyle && iconStyle.color)
      noSoundIconColor = iconStyle.color;
    var s = document.createElement('img');
    s.src = SaveFrom_Utils.svg.getSrc('noSound', noSoundIconColor);
    s.title = mono.global.language.withoutAudio;

    var defIconStyle = {
      width: '14px',
      height: '14px',
      marginLeft: '3px',
      verticalAlign: 'middle',
      position: 'relative',
      top: '-1px',
      cursor: 'pointer'
    };
    SaveFrom_Utils.setStyle(s, defIconStyle);
    if(iconStyle && typeof(iconStyle) == 'object')
      SaveFrom_Utils.setStyle(s, iconStyle);

    if(link.nextSibling == null) {
      if (link.parentNode === null) {
        link.appendChild(s);
      } else {
        link.parentNode.appendChild(s);
      }
    } else
    {
      link.parentNode.insertBefore(s, link.nextSibling);
    }
  },

  video: {
    dataAttr: 'data-savefrom-video-visible',
    /*@if isVkOnly=0>*/
    yt: {
      inited: false,

      show3D: false,
      showMP4NoAudio: false,

      showFormat: {
        'FLV': true,
        'MP4': true,
        'WebM': false,
        '3GP': false,
        'Audio AAC': false,
        'Audio Vorbis': false,
        'Audio Opus': false
      },

      format: {
        'FLV': {
          '5': {quality: '240'},
          '6': {quality: '270'},
          '34': {quality: '360'},
          '35': {quality: '480'}
        },

        'MP4': {
          '18': {quality: '360'},
          '22': {quality: '720'},
          '37': {quality: '1080'},
          '38': {quality: '8K'},
          '59': {quality: '480'},
          '78': {quality: '480'},
          '82': {quality: '360', '3d': true},
          '83': {quality: '240', '3d': true},
          '84': {quality: '720', '3d': true},
          '85': {quality: '1080', '3d': true},
          '160': {quality: '144', noAudio: true},
          '133': {quality: '240', noAudio: true},
          '134': {quality: '360', noAudio: true},
          '135': {quality: '480', noAudio: true},
          '136': {quality: '720', noAudio: true},
          '137': {quality: '1080', noAudio: true},
          '264': {quality: '1440', noAudio: true},
          '138': {quality: '8K', noAudio: true},
          '298': {quality: '720', noAudio: true, sFps: true},
          '299': {quality: '1080', noAudio: true, sFps: true},
          '266': {quality: '4K', noAudio: true}
        },

        'WebM': {
          '43': {quality: '360'},
          '44': {quality: '480'},
          '45': {quality: '720'},
          '46': {quality: '1080'},
          '167': {quality: '360', noAudio: true},
          '168': {quality: '480', noAudio: true},
          '169': {quality: '720', noAudio: true},
          '170': {quality: '1080', noAudio: true},
          '218': {quality: '480', noAudio: true},
          '219': {quality: '480', noAudio: true},
          '242': {quality: '240', noAudio: true},
          '243': {quality: '360', noAudio: true},
          '244': {quality: '480 low', noAudio: true},
          '245': {quality: '480 med', noAudio: true},
          '246': {quality: '480 high', noAudio: true},
          '247': {quality: '720', noAudio: true},
          '248': {quality: '1080', noAudio: true},
          '271': {quality: '1440', noAudio: true},
          '272': {quality: '8K', noAudio: true},
          '278': {quality: '144', noAudio: true},
          '100': {quality: '360', '3d': true},
          '101': {quality: '480', '3d': true},
          '102': {quality: '720', '3d': true},
          '302': {quality: '720', noAudio: true, sFps: true},
          '303': {quality: '1080', noAudio: true, sFps: true},
          '308': {quality: '1440', noAudio: true, sFps: true},
          '313': {quality: '4K', noAudio: true},
          '315': {quality: '4K', noAudio: true, sFps: true}
        },

        '3GP': {
          '17': {quality: '144'},
          '36': {quality: '240'}
        },

        'Audio AAC': {
          '139': {quality: '48', ext: 'aac', noVideo: true},
          '140': {quality: '128', ext: 'aac', noVideo: true},
          '141': {quality: '256', ext: 'aac', noVideo: true},
          '256': {quality: '192', ext: 'aac', noVideo: true},
          '258': {quality: '384', ext: 'aac', noVideo: true}
        },

        'Audio Vorbis': {
          '171': {quality: '128', ext: 'webm', noVideo: true},
          '172': {quality: '192', ext: 'webm', noVideo: true}
        },

        'Audio Opus': {
          '249': {quality: '48', ext: 'opus', noVideo: true},
          '250': {quality: '128', ext: 'opus', noVideo: true},
          '251': {quality: '256', ext: 'opus', noVideo: true}
        }
      },

      excludeItag: {
        // hide left itag if exist right!
        // MP4
        '134': ['18'], // 360
        '136': ['22'],       // 720
        '137': ['37'],       // 1080
        '138': ['38'],       // 8K
        // WebM
        '243': ['167', '43'],// 360
        '167': ['43'], // 360

        '244': ['44'],        // 480 low
        '245': ['44'],        // 480 med
        '246': ['44'],        // 480 high

        '168': ['218', '219', '44'], // 480
        '218': ['219', '44'], // 480
        '219': ['44'],        // 480

        '247': ['45', '169'], // 720
        '169': ['45'],        // 720

        '248': ['170', '46'], // 1080,
        '170': ['46'],        // 1080,
        // Opus
        '249': ['139'],
        '250': ['140'],
        '251': ['141']
      },


      init: function()
      {
        if ( SaveFrom_Utils.video.yt.inited ) {
          return;
        }

        ['Audio AAC', 'Audio Vorbis', 'Audio Opus'].forEach(function(item) {
          var formatType = SaveFrom_Utils.video.yt.format[item];
          for (var qualityValue in formatType) {
            formatType[qualityValue].quality += ' ' + mono.global.language.kbps;
          }
        });

        SaveFrom_Utils.video.yt.show3D = mono.global.preference.ytHide3D == '0';
        SaveFrom_Utils.video.yt.showMP4NoAudio = mono.global.preference.ytHideMP4NoAudio == '0';

        var show = false;
        var showAudio = false;
        for(var i in SaveFrom_Utils.video.yt.showFormat)
        {
          var prefName = 'ytHide' + i.replace(' ', '_');
          if (prefName === 'ytHideAudio_AAC') {
            prefName = 'ytHideAudio_MP4';
          }
          var value = mono.global.preference[prefName] == '0';
          if (i === 'Audio AAC') {
            showAudio = value;
          }
          SaveFrom_Utils.video.yt.showFormat[i] = value;
          if(value) {
            show = true;
          }
        }

        SaveFrom_Utils.video.yt.showFormat['Audio Vorbis'] = showAudio;
        SaveFrom_Utils.video.yt.showFormat['Audio Opus'] = showAudio;

        if(!show) {
          SaveFrom_Utils.video.yt.showFormat.FLV = true;
        }

        SaveFrom_Utils.video.yt.inited = true;
      },


      filterLinks: function(links)
      {
        for(var i in this.excludeItag)
        {
          if(links[i] && this.excludeItag[i].length > 0)
          {
            for(var j = 0; j < this.excludeItag[i].length; j++)
            {
              var itag = this.excludeItag[i][j];
              if(links[itag])
              {
                delete links[i];
                break;
              }
            }
          }
        }
      },


      show: function(links, parent, showDownloadInfo, style, videoTitle)
      {
        SaveFrom_Utils.video.yt.filterLinks(links);
        style = style || {};

        var content = document.createElement('div');
        SaveFrom_Utils.setStyle(content, {
          display: 'inline-block',
          margin: '0 auto'
        });
        parent.appendChild(content);

        var box = document.createElement('div');
        SaveFrom_Utils.setStyle(box, {
          display: 'inline-block',
          padding: '0 90px 0 0',
          position: 'relative'
        });
        content.appendChild(box);

        var tbl = document.createElement('table');
        SaveFrom_Utils.setStyle(tbl, {
          emptyCells: 'show',
          borderCollapse: 'collapse',
          margin: '0 auto',
          padding: '0',
          width: 'auto'
        });
        box.appendChild(tbl);

        var hidden = false;

        for(var i in SaveFrom_Utils.video.yt.format)
        {
          if(SaveFrom_Utils.video.yt.append(links, i,
            SaveFrom_Utils.video.yt.format[i], tbl, style, videoTitle))
          {
            hidden = true;
          }
        }

        for(var i in links)
        {
          if (i === 'ummy' || i === 'ummyAudio' || i === 'meta') {
            continue;
          }
          if(SaveFrom_Utils.video.yt.append(links, '', null, tbl, style, videoTitle))
          {
            hidden = true;
          }

          break;
        }

        if (!tbl.firstChild) {
          parent.textContent = mono.global.language.noLinksFound;
          return;
        }

        if(!hidden)
          return;

        var more = document.createElement('span');
        more.textContent = mono.global.language.more + ' ' + String.fromCharCode(187);
        SaveFrom_Utils.setStyle(more, {
          color: '#555',
          border: '1px solid #a0a0a0',
          borderRadius: '3px',
          display: 'block',
          fontFamily: 'Arial',
          fontSize: '15px',
          lineHeight: '17px',
          padding: '1px 5px',
          position: 'absolute',
          bottom: '3px',
          right: '0',
          cursor: 'pointer'
        });

        if(style.btn && typeof(style.btn) == 'object')
          SaveFrom_Utils.setStyle(more, style.btn);

        box.appendChild(more);

        more.addEventListener('click', function(event){
          event.preventDefault();
          event.stopPropagation();

          var e = parent.querySelectorAll('*[' + SaveFrom_Utils.video.dataAttr + ']');
          for(var i = 0; i < e.length; i++)
          {
            var visible = e[i].getAttribute(SaveFrom_Utils.video.dataAttr);
            var display = 'none', symbol = String.fromCharCode(187);
            if(visible == '0')
            {
              visible = '1';
              display = '';
              symbol = String.fromCharCode(171);
            }
            else
              visible = '0';

            e[i].style.display = display;
            e[i].setAttribute(SaveFrom_Utils.video.dataAttr, visible);
            this.textContent = mono.global.language.more + ' ' + symbol;
          }

          return false;
        }, false);


        if(showDownloadInfo === 1)
        {
          var color = '#a0a0a0', a = tbl.querySelector('td a');

          content.appendChild(document.createElement('br'));
          SaveFrom_Utils.appendDownloadInfo(content, color, null, {
            width: '16px',
            height: '16px',
            fontSize: '16px',
            lineHeight: '16px'
          });
        }
      },


      append: function(links, title, format, parent, style, videoTitle)
      {
        var hidden = false;

        var aStyle = {
          whiteSpace: 'nowrap'
        };

        var sStyle = {
          fontSize: '75%',
          fontWeight: 'normal',
          marginLeft: '3px',
          whiteSpace: 'nowrap'
        };

        var tr = document.createElement('tr');

        var td = document.createElement('td');
        td.appendChild(document.createTextNode(title ? title : '???'));

        if(!title || !SaveFrom_Utils.video.yt.showFormat[title])
        {
          tr.setAttribute(SaveFrom_Utils.video.dataAttr, '0');
          tr.style.display = 'none';
          hidden = true;
        }

        SaveFrom_Utils.setStyle(td, {
          border: 'none',
          padding: '3px 15px 3px 0',
          textAlign: 'left',
          verticalAlign: 'middle'
        });

        tr.appendChild(td);

        td = document.createElement('td');
        SaveFrom_Utils.setStyle(td, {
          border: 'none',
          padding: '3px 0',
          textAlign: 'left',
          verticalAlign: 'middle',
          lineHeight: '17px'
        });
        tr.appendChild(td);

        var meta = links.meta || {};

        var sep = false;
        if(format)
        {
          for(var i in format)
          {
            if(links[i])
            {
              var quality = format[i].quality;
              if(sep)
              {
                td.lastChild.style.marginRight = '15px';
                td.appendChild(document.createTextNode(' '));
              }

              var span = document.createElement('span');
              span.style.whiteSpace = 'nowrap';

              var a = document.createElement('a');
              a.href = links[i];
              a.title = mono.global.language.downloadTitle;

              if (meta[i]) {
                if (meta[i].quality) {
                  quality = meta[i].quality;
                }

                if (format[i].sFps) {
                  quality += ' ' + (meta[i].fps || 60);
                }
              }

              if (format[i]['3d']) {
                a.textContent = '3D';
              } else {
                a.textContent = quality;
              }
              if(videoTitle)
              {
                var ext = format[i]['ext'];
                if(!ext)
                  ext = title.toLowerCase();

                a.setAttribute('download', mono.fileName.modify(videoTitle + '.' + ext) );

                if(format[i].noVideo || format[i].noAudio)
                {
                  a.addEventListener('click', function(event){
                    SaveFrom_Utils.downloadOnClick(event, null, {
                      useFrame: true
                    });
                  }, false);
                }
              }
              SaveFrom_Utils.setStyle(a, aStyle);
              if(style.link && typeof(style.link) == 'object')
                SaveFrom_Utils.setStyle(a, style.link);

              span.appendChild(a);
              SaveFrom_Utils.appendFileSizeIcon(a, style.fsIcon, style.fsText);

              if(format[i]['3d'])
              {
                if(!SaveFrom_Utils.video.yt.show3D)
                {
                  hidden = true;
                  span.setAttribute(SaveFrom_Utils.video.dataAttr, '0');
                  span.style.display = 'none';
                }

                var s = document.createElement('span');
                s.textContent = quality;
                SaveFrom_Utils.setStyle(s, sStyle);
                if(style.text && typeof(style.text) == 'object')
                  SaveFrom_Utils.setStyle(s, style.text);

                a.appendChild(s);
              }

              if(format[i]['noAudio'])
              {
                if(!SaveFrom_Utils.video.yt.showMP4NoAudio)
                {
                  hidden = true;
                  span.setAttribute(SaveFrom_Utils.video.dataAttr, '0');
                  span.style.display = 'none';
                }

                SaveFrom_Utils.appendNoSoundIcon(a, style ? style.noSoundIcon : false);
              }

              td.appendChild(span);

              sep = true;

              delete links[i];
            }
          }
        }
        else
        {
          for(var i in links)
          {
            if(sep)
            {
              td.lastChild.style.marginRight = '15px';
              td.appendChild(document.createTextNode(' '));
            }

            var span = document.createElement('span');
            span.style.whiteSpace = 'nowrap';

            var a = document.createElement('a');
            a.href = links[i];
            a.title = mono.global.language.downloadTitle;
            a.textContent = i;
            SaveFrom_Utils.setStyle(a, aStyle);
            if(style.link && typeof(style.link) == 'object')
              SaveFrom_Utils.setStyle(a, style.link);

            span.appendChild(a);
            SaveFrom_Utils.appendFileSizeIcon(a, style.fsIcon, style.fsText);
            td.appendChild(span);

            sep = true;

            delete links[i];
          }
        }

        if (sep === false) {
          return;
        }
        parent.appendChild(tr);

        return hidden;
      }
    }
    /*@if isVkOnly=0<*/
  }, // video


  playlist: {
    btnStyle: {
      display: 'block',
      fontWeight: 'bold',
      border: 'none',
      textDecoration: 'underline'
    },


    getFilelistHtml: function(links)
    {
      if(!links || links.length == 0)
        return;

      var rows = 0;
      var list = '';

      for(var i = 0; i < links.length; i++)
      {
        if(links[i].url)
        {
          list += links[i].url + '\r\n';
          rows++;
        }
      }

      if(list)
      {
        if(rows < 5) {
          rows = 5;
        } else
        if(rows > 14) {
          rows = 14;
        }

        return mono.create(document.createDocumentFragment(), {
          append: [
            mono.create('p', {
              text: mono.global.language.filelistTitle,
              style: {
                color: '#0D0D0D',
                fontSize: '20px',
                marginBottom: '11px',
                marginTop: '5px'
              }
            }),
            mono.create('p', {
              style: {
                marginBottom: '11px'
              },
              append: mono.parseTemplate(mono.global.language.filelistInstruction)
            }),
            mono.create('p', {
              text: mono.global.language.vkFoundFiles.replace('%d', links.length),
              style: {
                color: '#000',
                marginBottom: '11px'
              },
              append: mono.create('a', {
                text: mono.global.language.playlist,
                href: '#',
                class: 'sf__playlist',
                style: {
                  display: 'none',
                  cssFloat: 'right'
                }
              })
            }),
            mono.create('textarea', {
              text: list,
              rows: rows,
              cols: 60,
              style: {
                width: '100%',
                whiteSpace: (mono.isFF || (mono.isGM && !mono.isTM && !mono.isVM)) ? 'normal' : 'nowrap'
              }
            }),
            (!mono.isChrome && !mono.isFF)? undefined : mono.create('button', {
              text: mono.global.language.copy,
              style: {
                height: '27px',
                backgroundColor: '#ffffff',
                border: '1px solid #9e9e9e',
                marginTop: '6px',
                paddingLeft: '10px',
                paddingRight: '10px',
                borderRadius: '5px',
                fontSize: '14px',
                cursor: 'pointer',
                cssFloat: 'right'
              },
              on: ['click', function(e) {
                var _this = this;
                _this.disabled = true;
                mono.sendMessage({action: 'addToClipboard', text: list});
                setTimeout(function() {
                  _this.disabled = false;
                }, 1000);
              }],
              append: mono.create('style', {
                text: '#savefrom_popup_box button:hover:not(:disabled){' +
                  'background-color: #597A9E !important;' +
                  'border-color: #597A9E !important;' +
                  'color: #fff;' +
                  '}' +
                  '#savefrom_popup_box button:active{' +
                  'opacity: 0.9;' +
                  '}'
              })
            })
          ]
        });
      }
    },


    popupFilelist: function(links, title, playlist, id)
    {
      var content = SaveFrom_Utils.playlist.getFilelistHtml(links);
      if(!content)
        return;

      var popup = SaveFrom_Utils.popupDiv(content, id);
      if(playlist)
      {
        var a = popup.querySelector('a.sf__playlist');
        if(a)
        {
          a.addEventListener('click', function(event){
            setTimeout(function(){
              SaveFrom_Utils.playlist.popupPlaylist(links, title, true, id);
            }, 100);
            event.preventDefault();
            return false;
          }, false);

          SaveFrom_Utils.setStyle(a, SaveFrom_Utils.playlist.btnStyle);
        }
      }
    },

    getInfoPopupTemplate: function() {
      var popupContainer = mono.create('div', {
        class: 'sf-infoPopupTemplate',
        style: {
          width: '400px',
          minHeight: '40px'
        }
      });

      var mediaIcon = mono.create('div', {
        style: {
          backgroundSize: '48px',
          backgroundRepeat: 'no-repeat',
          backgroundPosition: 'center top',
          display: 'inline-block',
          width: '60px',
          height: '60px',
          cssFloat: 'left',
          marginTop: '16px',
          marginRight: '10px'
        }
      });

      var textContent = mono.create('div', {
        style: {
          display: 'inline-block',
          width: '330px'
        }
      });

      var buttonWrap = mono.create('div', {
        style: {
          textAlign: 'right'
        },
        append: mono.create('style', {
          text: '.sf-infoPopupTemplate a.sf-button {' +
            'padding: 1px 6px;' +
            'display: inline-block;' +
            'text-align: center;' +
            'height: 23px;' +
            'line-height: 23px;' +
            'text-decoration: none;' +
            '}' +
            '.sf-infoPopupTemplate button:hover,' +
            '.sf-infoPopupTemplate a.sf-button:hover{' +
            'background-color: #597A9E !important;' +
            'border-color: #597A9E !important;' +
            'color: #fff;' +
            '}'
        })
      });

      popupContainer.appendChild(mediaIcon);
      popupContainer.appendChild(textContent);
      popupContainer.appendChild(buttonWrap);
      return {
        icon: mediaIcon,
        buttonContainer: buttonWrap,
        textContainer: textContent,
        body: popupContainer
      }
    },

    getM3U: function(links)
    {
      var text = '#EXTM3U\r\n';

      for(var i = 0; i < links.length; i++)
      {
        if(!links[i].duration)
          links[i].duration = '-1';

        if(links[i].title || links[i].duration)
        {
          text += '#EXTINF:' + links[i].duration + ',' +
            links[i].title + '\r\n';
        }

        text += links[i].url + '\r\n';
      }

      return text;
    },


    getPlaylistHtml: function(links, fileTitle)
    {
      if(!links || links.length == 0)
        return;

      var links_len = links.length;

      var d = SaveFrom_Utils.dateToObj();
      var dateStr = d.year + '-' + d.month + '-' + d.day + ' ' +
        d.hour + '-' + d.min;

      // M3U
      var m3uList = SaveFrom_Utils.playlist.getM3U(links);
      m3uList = m3uList.replace(/\r\n/g, '\n');

      var m3uUrl;
      if (typeof URL !== 'undefined' && typeof Blob !== "undefined" && !mono.isSafari) {
        var m3uBlob = new Blob([m3uList], {encoding: "UTF-8", type: 'audio/x-mpegurl'});
        m3uUrl = URL.createObjectURL(m3uBlob);
      } else {
        var m3uUTF8 = SaveFrom_Utils.utf8Encode(m3uList);
        //todo: chrome 47 fix
        var _btoa = mono.isTM ? window.btoa : btoa;
        m3uUrl = 'data:audio/x-mpegurl;charset=utf-8;base64,' + encodeURIComponent(_btoa(m3uUTF8))
      }

      var template = SaveFrom_Utils.playlist.getInfoPopupTemplate();

      mono.sendMessage({action: 'getWarningIcon', color: '#00CCFF', type: 'playlist'}, function(icon) {
        template.icon.style.backgroundImage = 'url('+icon+')';
      });

      mono.create(template.textContainer, {
        append: [
          mono.create('p', {
            text: fileTitle || mono.global.language.playlistTitle,
            style: {
              color: '#0D0D0D',
              fontSize: '20px',
              marginBottom: '11px',
              marginTop: '13px'
            }
          }),
          mono.create('p', {
            text: mono.global.language.playlistInstruction,
            style: {
              color: '#868686',
              fontSize: '14px',
              marginBottom: '13px',
              lineHeight: '24px',
              marginTop: '0px'
            }
          }),
          mono.create('a', {
            text: mono.global.language.filelist + ' ('+links_len+')',
            href: '#',
            class: 'sf__playlist',
            style: {
              display: 'none',
              fontSize: '14px',
              marginBottom: '13px',
              lineHeight: '24px',
              marginTop: '0px'
            }
          })
        ]
      });

      if(!fileTitle) {
        fileTitle = 'playlist';
      }
      fileTitle += ' ' + dateStr;

      mono.create(template.buttonContainer, {
        append: [
          mono.create('a', {
            text:  mono.global.language.download,
            href: m3uUrl,
            download: mono.fileName.modify(fileTitle + '.m3u'),
            class: 'sf-button',
            style: {
              width: '118px',
              backgroundColor: '#ffffff',
              border: '1px solid #9e9e9e',
              margin: '12px',
              marginBottom: '11px',
              marginRight: '8px',
              borderRadius: '5px',
              fontSize: '14px',
              cursor: 'pointer'
            }
          })
        ]
      });

      return template.body;
    },


    popupPlaylist: function(links, title, filelist, id)
    {
      var content = SaveFrom_Utils.playlist.getPlaylistHtml(links, title);
      if(!content)
        return;

      var popup = SaveFrom_Utils.popupDiv(content, id);
      if(filelist)
      {
        var a = popup.querySelector('a.sf__playlist');
        if(a)
        {
          a.addEventListener('click', function(event){
            setTimeout(function(){
              SaveFrom_Utils.playlist.popupFilelist(links, title, true, id);
            }, 100);
            event.preventDefault();
            return false;
          }, false);

          a.style.display = 'inline';
          a = null;
        }
      }
      var dl_links = popup.querySelectorAll('a[download]');
      for (var i = 0, el; el = dl_links[i]; i++) {
        el.addEventListener('click', SaveFrom_Utils.downloadOnClick, false);
      }
    }
  },

  popupCloseBtn: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAWUlEQVQ4y2NgGHHAH4j1sYjrQ+WIAvFA/B+I36MZpg8V+w9VQ9Al/5EwzDBkQ2AYr8uwaXiPQ0yfkKuwGUayIYQMI8kQqhlEFa9RLbCpFv1US5BUzSLDBAAARN9OlWGGF8kAAAAASUVORK5CYII=',

  popupDiv: function(content, id, maxWidth, maxHeight, onClose)
  {
    if(!id) {
      id = 'savefrom_popup_box';
    }

    if(!maxWidth)
      maxWidth = 580;

    if(!maxHeight)
      maxHeight = 520;

    var popupBody = document.getElementById(id);
    if(popupBody) {
      popupBody.parentNode.removeChild(popupBody);
    }

    popupBody = mono.create('div', {
      id: id,
      style: {
        zIndex: '9999',
        display: 'block',
        cssFloat: 'none',
        position: 'fixed',
        margin: '0',
        padding: '0',
        visibility: 'hidden',
        color: '#000',
        background: '#fff',
        border: '3px solid #c0cad5',
        borderRadius: '7px',
        overflow: 'auto'
      }
    });


    var cnt = mono.create('div', {
      style: {
        display: 'block',
        cssFloat: 'none',
        position: 'relative',
        overflow: 'auto',
        margin: '0',
        padding: '10px 15px'
      }
    });

    if (typeof content === 'function') {
      content(cnt);
    } else {
      cnt.appendChild(content);
    }

    var btn = mono.create('img', {
      src: SaveFrom_Utils.popupCloseBtn,
      alt: 'x',
      width: 18,
      height: 18,
      style: {
        position: 'absolute',
        top: '10px',
        right: '15px',
        opacity: '0.5',
        cursor: 'pointer'
      },
      on: [
        ['mouseenter', function() {
          "use strict";
          this.style.opacity = '0.9';
        }],
        ['mouseleave', function() {
          "use strict";
          this.style.opacity = '0.5';
        }],
        ['click', function() {
          "use strict";
          if (popupBody.parentNode) {
            popupBody.parentNode.removeChild(popupBody);
          }
          if (onClose) {
            onClose();
          }
          return false;
        }]
      ]
    });

    cnt.appendChild(btn);
    popupBody.appendChild(cnt);
    document.body.appendChild(popupBody);

    if(popupBody.offsetWidth > maxWidth) {
      popupBody.style.width = maxWidth + 'px';
    }

    if(popupBody.offsetHeight > maxHeight) {
      popupBody.style.height = maxHeight + 'px';
      popupBody.style.width = (maxWidth + 20) + 'px';
    }

    setTimeout(function() {
      var l = Math.floor((window.innerWidth - popupBody.offsetWidth) / 2.0);
      var t = Math.floor((window.innerHeight - popupBody.offsetHeight) / 2.0);
      if (t < 0) {
        t = 0;
      }
      if (location.host.indexOf('youtu') !== -1 && t < 50) {
        t = 50;
        popupBody.style.height = (popupBody.offsetHeight - t - 10) + 'px';
      }
      if (l < 0) {
        l = 0;
      }
      SaveFrom_Utils.setStyle(popupBody, {
        top: t + 'px',
        left: l + 'px',
        visibility: 'visible'
      });
    });

    var onDocClose = function(event){
      var node = event.target;
      if(node !== popupBody && !SaveFrom_Utils.isParent(node, popupBody))
      {
        if(popupBody.parentNode){
          popupBody.parentNode.removeChild(popupBody);
        }
        document.removeEventListener('click', onDocClose, false);
        if (onClose) {
          onClose();
        }
      }
    };

    setTimeout(function() {
      document.addEventListener('click', onDocClose, false);
    }, 100);

    popupBody.addEventListener('close', function() {
      if(popupBody.parentNode){
        popupBody.parentNode.removeChild(popupBody);
      }
      document.removeEventListener('click', onDocClose, false);
      if (onClose) {
        onClose();
      }
    });

    popupBody.addEventListener('kill', function() {
      if(popupBody.parentNode){
        popupBody.parentNode.removeChild(popupBody);
      }
      document.removeEventListener('click', onDocClose, false);
    });

    return popupBody;
  },

  popupDiv2: function(_details) {
    "use strict";
    var details = {
      id: 'savefrom_popup_box',
      containerStyle: null,
      bodyStyle: null,
      content: null,
      container: null,
      body: null
    };

    details._onClose = function() {
      document.removeEventListener('click', details._onClose);

      if (container.parentNode) {
        container.parentNode.removeChild(container);
      }

      details.onClose && details.onClose();
    };

    mono.extend(details, _details);

    var container = details.container = mono.create('div', {
      id: details.id,
      style: {
        zIndex: 9999,
        display: 'block',
        position: 'fixed',
        background: '#fff',
        border: '3px solid #c0cad5',
        borderRadius: '7px'
      },
      append: [
        mono.create('style', {
          text: mono.style2Text({
            selector: '#' + details.id,
            style: mono.styleReset
          })
        })
      ],
      on: [
        ['click', function(e) {
          e.stopPropagation();
        }]
      ]
    });

    var closeBtn = mono.create('img', {
      src: SaveFrom_Utils.popupCloseBtn,
      alt: 'x',
      width: 18,
      height: 18,
      style: {
        position: 'absolute',
        top: '10px',
        right: '15px',
        opacity: '0.5',
        cursor: 'pointer'
      },
      on: [
        ['mouseenter', function() {
          "use strict";
          this.style.opacity = '0.9';
        }],
        ['mouseleave', function() {
          "use strict";
          this.style.opacity = '0.5';
        }],
        ['click', details._onClose]
      ]
    });

    container.appendChild(closeBtn);

    var body = details.body = mono.create('div', {
      style: mono.extendPos({
        display: 'block',
        position: 'relative',
        padding: '10px 15px',
        overflow: 'auto'
      }, details.bodyStyle)
    });

    if (typeof details.content === 'function') {
      details.content(body);
    } else {
      body.appendChild(details.content);
    }

    container.appendChild(body);

    document.body.appendChild(container);
    document.addEventListener('click', details._onClose);

    return details;
  },

  /*@if isVkOnly=0>*/
  // row - used for hide tooltip on mouseout
  // because node can dissaper from DOM before mouseout raised
  showTooltip: function(node, text, row, style)
  {
    if(!node)
      return;

    var tooltip = document.querySelector('.savefrom-tooltip');
    if(!tooltip)
    {
      tooltip = document.createElement('div');
      tooltip.className = 'savefrom-tooltip';
      SaveFrom_Utils.setStyle(tooltip, {
        'position': 'absolute',
        'opacity': 0,
        'zIndex': -1
      });
      if (style) {
        SaveFrom_Utils.setStyle(tooltip, style);
      }
    }

    tooltip.textContent = text;

    if(tooltip.lastNode && tooltip.lastNode === node)
    {
      fixPosition();
      return;
    }

    if(tooltip.lastNode)
    {
      mono.off(tooltip.lastNode, 'mouseleave', hide);
      mono.off(tooltip.lastNode, 'mousemove', fixPosition);
      tooltip.lastRow && mono.off(tooltip.lastRow, 'mouseleave', hide);
    }

    tooltip.lastNode = node;
    row && (tooltip.lastRow = row);

    mono.on(node, 'mouseleave', hide);
    mono.on(node, 'mousemove', fixPosition, false);
    row && mono.on(row, 'mouseleave', hide);

    document.body.appendChild(tooltip);
    fixPosition();

    function fixPosition(e) {
      if (e !== undefined) {
        e.stopPropagation();
      }
      var p = SaveFrom_Utils.getPosition(node),
        s = SaveFrom_Utils.getSize(tooltip);

      if(p.top == 0 && p.left == 0)
        return;

      p.top = p.top - s.height - 10;
      p.left = p.left - s.width / 2 + SaveFrom_Utils.getSize(node).width / 2;

      p.left = Math.min(p.left, document.body.clientWidth + document.body.scrollLeft - s.width);
      if(p.top < document.body.scrollTop)
        p.top = p.top + s.height + SaveFrom_Utils.getSize(node).height + 20;

      p.top += 'px';
      p.left += 'px';

      // show
      p.zIndex = 9999;
      p.opacity = 1;

      SaveFrom_Utils.setStyle(tooltip, p);
    }

    function hide() {
      if(tooltip.parentNode)
        document.body.removeChild(tooltip);

      tooltip.lastNode = null;
      tooltip.lastRow = null;
      SaveFrom_Utils.setStyle(tooltip, {
        zIndex: -1,
        opacity: 0
      });
      mono.off(node, 'mouseleave', hide);
      mono.off(node, 'mousemove', fixPosition);
      row && mono.off(row, 'mouseleave', hide);
    }
  },
  /*@if isVkOnly=0<*/

  embedDownloader: {
    dataAttr: 'data-savefrom-get-links',
    dataIdAttr: 'data-savefrom-container-id',
    containerClass: 'savefrom-links-container',
    linkClass: 'savefrom-link',
    panel: null,
    lastLink: null,
    style: null,

    hostings: {
      /*@if isVkOnly=0>*/
      'youtube': {
        re: [
          /^https?:\/\/(?:[a-z]+\.)?youtube\.com\/(?:#!?\/)?watch\?.*v=([\w\-]+)/i,
          /^https?:\/\/(?:[a-z0-9]+\.)?youtube\.com\/(?:embed|v)\/([\w\-]+)/i,
          /^https?:\/\/(?:[a-z]+\.)?youtu\.be\/([\w\-]+)/i
        ],
        action: 'getYoutubeLinks',
        prepareLinks: function(links) {
          var ret = [];
          var sfUtilsYt = SaveFrom_Utils.video.yt;
          var format = sfUtilsYt.format;

          var meta = links.meta || {};

          for(var formatName in format)
          {
            for(var iTag in format[formatName])
            {
              var metaTag = meta[iTag] || {};
              if(links[iTag]) {
                var type = formatName;
                if(format[formatName][iTag].ext) {
                  type = format[formatName][iTag].ext;
                }

                var quality = format[formatName][iTag].quality;
                if (metaTag.quality) {
                  quality = metaTag.quality;
                }

                if (format[formatName][iTag].sFps) {
                  quality += ' ' + (metaTag.fps || 60);
                }

                if (format[formatName][iTag]['3d']) {
                  quality += ' (3d)';
                }

                ret.push({
                  name: formatName + ' ' + quality,
                  type: type,
                  url: links[iTag],
                  noSound: format[formatName][iTag].noAudio
                });
              }
            }
          }

          return ret;
        }
      },
      'vimeo': {
        re: [
          /^https?:\/\/(?:[\w\-]+\.)?vimeo\.com\/(?:\w+\#)?(\d+)/i,
          /^https?:\/\/player\.vimeo\.com\/video\/(\d+)/i,
          /^https?:\/\/(?:[\w\-]+\.)?vimeo\.com\/channels\/(?:[^\/]+)\/(\d+)$/i,
          /^https?:\/\/vimeo\.com\/(?:.+)clip_id=(\d+)/i
        ],
        action: 'getVimeoLinks',
        prepareLinks: function(links) {
          return links.map(function(link) {
            var ext = link.ext;
            if(!ext)
            {
              ext = 'MP4';
              if(link.url.search(/\.flv($|\?)/i) != -1)
                ext = 'FLV';
            }

            link.name = link.name ? link.name : ext;
            link.type = link.type ? link.type : ext;
            link.ext = ext;

            return link;
          });
        }
      },
      /*@if isVkOnly=0<*/

      'vk': {
        re: [
          /^https?:\/\/(?:[\w\-]+\.)?(?:vk\.com|vkontakte\.ru)\/(?:[^\/]+\/)*(?:[\w\-]+\?.*z=)?(video-?\d+_-?\d+\?list=[0-9a-z]+|video-?\d+_-?\d+)/i,
          /^https?:\/\/(?:[\w\-]+\.)?(?:vk\.com|vkontakte\.ru)\/video_ext\.php\?(.+)/i
        ],
        action: 'getVKLinks'
      },

      /*@if isVkOnly=0>*/
      'dailymotion': {
        re: [
          /^http:\/\/dai\.ly\/([a-z0-9]+)_?/i,
          /^https?:\/\/(?:[\w]+\.)?dailymotion\.com(?:\/embed|\/swf)?\/video\/([a-z0-9]+)_?/i
        ],
        action: 'getDailymotionLinks'
      },

      'facebook': {
        re: [
          /^https?:\/\/(?:[\w]+\.)?facebook\.com(?:\/video)?\/video.php.*[?&]{1}v=([0-9]+).*/i,
          /^https?:\/\/(?:[\w]+\.)?facebook\.com\/.+\/videos(?:\/\w[^\/]+)?\/(\d+)/i
        ],
        action: 'getFacebookLinks'
      }
      /*@if isVkOnly=0<*/
    },


    init: function(style)
    {
      this.style = style;

      if(this.panel) {
        SaveFrom_Utils.popupMenu.removePanel();
      }

      this.panel = null;
      this.lastLink = null;

      var links = document.querySelectorAll('a[' + this.dataAttr + ']'),
        i, l = links.length;

      for(i = 0; i < l; i++)
      {
        if(['savefrom.net', 'sf-addon.com'].indexOf(
          SaveFrom_Utils.getTopLevelDomain(links[i].hostname)) > -1)
        {
          links[i].removeEventListener('click', this.onClick, false);
          links[i].addEventListener('click', this.onClick, false);
        }
      }

      // hide menu on click outside them
      // process dinamically added links
      if (document.body) {
        document.body.removeEventListener('click', this.onBodyClick, true);
        document.body.addEventListener('click', this.onBodyClick, true);
      }
    },


    checkUrl: function(url) {
      for(var hosting in this.hostings) {
        var params = this.hostings[hosting];

        for(var i = 0, len = params.re.length; i < len; i++) {
          var match = url.match(params.re[i]);
          if(match) {
            return {
              hosting: hosting,
              action: params.action,
              extVideoId: match[1]
            };
          }
        }
      }

      return null;
    },

    reMapHosting: function(action) {
      var map = {
        /*@if isVkOnly=0>*/
        'getYoutubeLinks': 'youtube',
        'getVimeoLinks': 'vimeo',
        'getDailymotionLinks': 'dailymotion',
        'getFacebookLinks': 'facebook'
        /*@if isVkOnly=0<*/
      };

      return map[action];
    },


    onClick: function(event, a)
    {
      var _this = SaveFrom_Utils.embedDownloader;

      if(!a)
      {
        a = event.target;
        while(a.parentNode) {
          if(a.nodeName === 'A')
            break;
          a = a.parentNode;
        }

        if(!a)
          return;
      }

      var href = a.getAttribute('data-savefrom-get-links');
      if(!href)
        return;

      if(event.button !== 0 || event.ctrlKey || event.shiftKey)
        return;

      if(_this.lastLink === a && _this.panel && _this.panel.style.display != 'none')
      {
        _this.lastLink = null;
        _this.panel.style.display = 'none';

        event.preventDefault();
        event.stopPropagation();
        return;
      }

      _this.lastLink = a;
      var data = _this.checkUrl(href);
      if(!data)
        return;

      event.preventDefault();
      event.stopPropagation();

      var request = {
        action: data.action,
        extVideoId: data.extVideoId
      };

      _this.showLinks(mono.global.language.download + ' ...', null, a);

      mono.sendMessage(request, function(response) {
        var hosting = data.hosting;

        if(response.action != request.action)
        {
          hosting = _this.reMapHosting(response.action);
        }

        if(response.links)
          _this.showLinks(response.links, response.title, a, hosting, true);
        else
          _this.showLinks(mono.global.language.noLinksFound, null, a, undefined, true);
      });

      return false;
    },


    onBodyClick: function(event)
    {
      var _this = SaveFrom_Utils.embedDownloader;

      var node = event.target;

      if(!_this.panel || _this.panel.style.display == 'none')
      {
        if (node.tagName !== 'A' && mono.matches(node, 'A ' + node.tagName)) {
          while(node.parentNode) {
            if(node.tagName === 'A') {
              break;
            }
            node = node.parentNode;
          }
        }

        if (node.nodeName !== 'A') {
          return;
        }

        // dinamic links
        if(node.hasAttribute(_this.dataAttr) &&
          ['savefrom.net', 'sf-addon.com'].indexOf(SaveFrom_Utils.getTopLevelDomain(node.hostname)) > -1)
        {
          return _this.onClick(event, node);
        }

        return;
      }

      if (_this.panel === node || _this.panel.contains(node)) {
        return;
      }

      _this.lastLink = null;
      _this.panel.style.display = 'none';

      event.preventDefault();
      event.stopPropagation();
    },

    hidePanel: function()
    {
      if (this.panel) {
        this.panel.style.display = 'none';
      }
    },

    createMenu: function(links, title, a, hname, update) {
      var menuLinks = mono.global.language.noLinksFound;
      if (typeof links === 'string') {
        menuLinks = links;
      } else
      if (SaveFrom_Utils.popupMenu.prepareLinks[hname] !== undefined && links) {
        menuLinks = SaveFrom_Utils.popupMenu.prepareLinks[hname](links, title, SaveFrom_Utils);
      }
      var options = {
        links: menuLinks,
        button: a,
        popupId: undefined,
        showFileSize: true,
        containerClass: this.containerClass,
        linkClass: this.linkClass,
        style: {
          popup: (this.style)?this.style.container:undefined,
          item: (this.style)?this.style.link:undefined
        },
        isUpdate: update
      };
      if (update && this.panel) {
        SaveFrom_Utils.popupMenu.update(this.panel, options)
      } else {
        this.panel = SaveFrom_Utils.popupMenu.create(options);
      }
    },

    showLinks: function(links, title, a, hname, update)
    {
      var panel, id = a.getAttribute(this.dataIdAttr);
      if(id)
        panel = document.getElementById(id);

      if(!panel)
      {
        this.createMenu(links, title, a, hname, update);

        return;
      }
      else if(this.panel)
      {
        this.panel.style.display = 'none';
      }

      if(typeof(links) == 'string')
      {
        panel.textContent = links;
      }
      else if(!links || links.length == 0)
      {
        panel.textContent = mono.global.language.noLinksFound;
      }
      else
      {
        // append links
        if(hname && this.hostings[hname] && this.hostings[hname].prepareLinks)
          links = this.hostings[hname].prepareLinks(links);

        panel.textContent = '';

        for(var i = 0; i < links.length; i++)
        {
          if(links[i].url && links[i].name)
          {
            var a = document.createElement('a');
            a.href = links[i].url;
            a.title = mono.global.language.downloadTitle;
            a.appendChild(document.createTextNode(links[i].name));
            var span = document.createElement('span');
            span.className = this.linkClass;

            span.appendChild(a);
            panel.appendChild(span);

            SaveFrom_Utils.appendFileSizeIcon(a);
            if(links[i].noSound)
              SaveFrom_Utils.appendNoSoundIcon(a);

            if(title && !links[i].noTitle && links[i].type)
            {
              a.setAttribute('download', mono.fileName.modify(
                  title + '.' + links[i].type.toLowerCase()));

              a.addEventListener('click', SaveFrom_Utils.downloadOnClick, false);
            }
          }
        }
      }
    }
  },
  /*@if isVkOnly=0>*/
  createFrameUmmyInfo: function(params) {
    "use strict";
    params = params || {};
    if (!params.vid) {
      params.vid = 111;
    }

    var info;
    var infoContainer = mono.create('div', {
      class: 'sf-ummy-info-popup-container',
      style: {
        position: 'absolute',
        zIndex: 9999
      },
      append: [
        mono.create('span', {
          style: {
            display: 'inline-block',
            border: '10px solid transparent',
            borderTop: 0,
            borderBottomColor: 'rgba(0, 0, 0, 0.7)',
            width: 0,
            top: '0px',
            left: '110px',
            position: 'absolute'
          }
        }),
        info = mono.create('div', {
          class: 'sf-ummy-info-popup',
          style: {
            backgroundColor: 'rgba(0, 0, 0, 0.7)',
            padding: '6px 5px',
            textAlign: 'center',
            maxWidth: '240px',
            lineHeight: '16px',
            fontFamily: 'arial, sans-serif',
            fontSize: '12px',
            color: '#fff',
            cursor: 'default',
            marginTop: '10px'
          },
          append: [
            mono.parseTemplate(mono.global.language.ummyMenuInfo.replace('{url}', 'http://videodownloader.ummy.net/?'+mono.param(params))
            ),
            mono.create('style', {
              text: '' +
              '.sf-ummy-info-popup > p > .green-btn-2.arrow {' +
              'color: #fff;' +
              'background: #84bd07;' +
              'border-radius: 5px;' +
              'display: inline-block;' +
              'position: relative;' +
              'line-height: 1;' +
              'padding: 8px 34px 8px 10px;' +
              'text-decoration: none;' +
              'font-size: 12px;' +
              '}' +
              '.sf-ummy-info-popup > p > .green-btn-2.arrow:hover {' +
              'color: #fff;' +
              'opacity: .8;' +
              '}' +
              '.sf-ummy-info-popup > p {' +
              'margin: 0 0 .8em 0;' +
              '}' +
              '.sf-ummy-info-popup > p.center {' +
              'text-align: center;' +
              '}' +
              '.sf-ummy-info-popup > p > .green-btn-2.arrow:after {' +
              'background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAYAAAAmL5yKAAAAjklEQVQoke3RsRGCQBCF4YuJsQDoQMpjKMImtAjth9xMEj4DF4c5QDH3n7lk773b3XsJNzTpR9DglrwYcUG9w1iHdoTpgYkBJ5QrxkPcDXNDQm/JHR2KOF3UcvoUgnZL8KFBi2I+Yrk2YsZjsaIsBVQ4i08KxqhVu1OYBLji+E/hzTKFlV13pfAVGynkPAFtrlNTMRczMgAAAABJRU5ErkJggg==) 0 0 no-repeat;' +
              'content: "";' +
              'display: block;' +
              'position: absolute;' +
              'width: 16px;' +
              'height: 14px;' +
              'top: 50%;' +
              'right: 10px;' +
              'margin-top: -7px;' +
              '}'
            })
          ]
        })
      ],
      on: [
        ['mouseclick', function(e) {
          e.stopPropagation();
        }],
        ['mousedown', function(e) {
          e.stopPropagation();
        }]]
    });

    mono.sendMessage({action: 'getUmmyIcon'}, function(dataImg) {
      var icon = info.querySelector('img');
      icon.src = dataImg;
      icon.style.verticalAlign = 'text-bottom';
    });

    return infoContainer;
  },
  /*@if isVkOnly=0<*/
  createUmmyInfo: function(params, details) {
    "use strict";
    details = details || {};
    params = params || {};
    if (!params.vid) {
      params.vid = 111;
    }


    var themeShadowArrowDirStyle, themeArrowDirStyle, themeInfoPopup;

    var shadowArrowDirStyle, arrowDirStyle, containerDirArrow;
    if (details.posLeft) {
      shadowArrowDirStyle = {
        border: '8px solid transparent',
        borderLeft: '10px solid rgb(192, 187, 187)',
        borderRight: 0,
        top: '8px',
        right: '11px'
      };

      arrowDirStyle = mono.extend({}, shadowArrowDirStyle, {
        right: '12px',
        borderLeft: '10px solid #fff'
      });

      containerDirArrow = {
        right: '21px'
      };

      if (details.darkTheme) {
        themeShadowArrowDirStyle = {
          borderLeftColor: 'rgba(255, 255, 255, 0.4)'
        };

        themeArrowDirStyle = {
          borderLeftColor: 'rgba(28,28,28, 0.6)'
        };
      }
    } else {
      shadowArrowDirStyle = {
        border: '8px solid transparent',
        borderRight: '10px solid rgb(192, 187, 187)',
        borderLeft: 0,
        top: '8px',
        left: '11px'
      };

      arrowDirStyle = mono.extend({}, shadowArrowDirStyle, {
        left: '12px',
        borderRight: '10px solid #fff'
      });

      containerDirArrow = {
        left: '21px'
      };

      if (details.darkTheme) {
        themeShadowArrowDirStyle = {
          borderRightColor: '#fff'
        };

        themeArrowDirStyle = {
          borderRightColor: '#000'
        };
      }
    }

    if (details.darkTheme) {
      themeInfoPopup = {
        backgroundColor: 'rgba(28,28,28,0.8)',
        border: '1px solid rgba(255, 255, 255, 0.4)'
      };
    } else {
      themeInfoPopup = {
        backgroundColor: '#fff',
        border: '1px solid #ccc'
      };
    }


    var arrow = mono.create(document.createDocumentFragment(), {
      append: [
        mono.create('span', {
          style: mono.extend({
            display: 'inline-block',
            width: 0,
            position: 'absolute'
          }, shadowArrowDirStyle, themeShadowArrowDirStyle)
        }),
        mono.create('span', {
          style: mono.extend({
            display: 'inline-block',
            width: 0,
            position: 'absolute',
            zIndex: 1
          }, arrowDirStyle, themeArrowDirStyle)
        })
      ]
    });

    var info = null;
    var infoContainer = mono.create('div', {
      class: 'sf-ummy-info-popup-container',
      style: {
        position: 'absolute',
        zIndex: 9999
      },
      append: [
        arrow,
        info = mono.create('div', {
          class: 'sf-ummy-info-popup',
          style: mono.extend({
            position: 'relative',
            backgroundColor: '#fff',
            border: '1px solid #ccc',
            padding: '6px 5px',
            textAlign: 'center',
            maxWidth: '240px',
            lineHeight: '16px',
            fontSize: '12px',
            fontFamily: 'arial, sans-serif',
            cursor: 'default'
          }, containerDirArrow, themeInfoPopup),
          append: [
            mono.parseTemplate(mono.global.language.ummyMenuInfo.replace(
              '{url}', 'http://videodownloader.ummy.net/?'+mono.param(params)
            )),
            mono.create('style', {
              text: mono.styleObjToText({
                '> p > .green-btn-2.arrow': {
                  color: '#fff',
                  background: '#84bd07',
                  borderRadius: '5px',
                  display: 'inline-block',
                  position: 'relative',
                  lineHeight: 1,
                  padding: '8px 34px 8px 10px',
                  textDecoration: 'none',
                  fontSize: '12px'
                },
                '> p > .green-btn-2.arrow:hover': {
                  color: '#fff',
                  opacity: 0.8
                },
                '> p': {
                  margin: '0 0 .8em 0'
                },
                '> p.center': {
                  textAlign: 'center'
                },
                '> p > .green-btn-2.arrow:after': {
                  background: 'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAYAAAAmL5yKAAAAjklEQVQoke3RsRGCQBCF4YuJsQDoQMpjKMImtAjth9xMEj4DF4c5QDH3n7lk773b3XsJNzTpR9DglrwYcUG9w1iHdoTpgYkBJ5QrxkPcDXNDQm/JHR2KOF3UcvoUgnZL8KFBi2I+Yrk2YsZjsaIsBVQ4i08KxqhVu1OYBLji+E/hzTKFlV13pfAVGynkPAFtrlNTMRczMgAAAABJRU5ErkJggg==) 0 0 no-repeat',
                  content: '""',
                  display: 'block',
                  position: 'absolute',
                  width: '16px',
                  height: '14px',
                  top: '50%',
                  right: '10px',
                  marginTop: '-7px'
                }
              }, '.sf-ummy-info-popup')
            })
          ]
        })
      ],
      on: [
        ['mouseclick', function(e) {
          e.stopPropagation();
        }],
        ['mousedown', function(e) {
          e.stopPropagation();
        }]]
    });

    mono.sendMessage({action: 'getUmmyIcon'}, function(dataImg) {
      var icon = info.querySelector('img');
      icon.src = dataImg;
      icon.style.verticalAlign = 'text-bottom';
    });

    return infoContainer;
  },
  /*@if isVkOnly=0>*/
  bindFrameUmmyInfo: function(container, params) {
    "use strict";
    if (!mono.global.preference.showUmmyInfo) {
      return;
    }

    var infoPopup;
    var infoPopupShowTimer;
    var popupArrow;
    var size;

    var onMouseLeave = function() {
      clearTimeout(infoPopupShowTimer);
      infoPopupShowTimer = setTimeout(function() {
        if (infoPopup && infoPopup.parentNode) {
          infoPopup.parentNode.removeChild(infoPopup);
        }
      }, 100);
    };

    mono.on(container, 'mouseenter', function() {
      clearTimeout(infoPopupShowTimer);
      var position = SaveFrom_Utils.getPosition(this);

      if (!infoPopup) {
        infoPopup = SaveFrom_Utils.createFrameUmmyInfo(params);
        popupArrow = infoPopup.firstChild;

        size = SaveFrom_Utils.getSize(this);
        infoPopup.style.top = (position.top + size.height) + 'px';

        mono.on(infoPopup, 'mouseenter', function() {
          clearTimeout(infoPopupShowTimer);
        });

        mono.on(infoPopup, 'mouseleave', onMouseLeave);
      }

      infoPopup.style.left = (position.left - (240 - size.width) / 2) + 'px';

      document.body.appendChild(infoPopup);
    });
    mono.on(container, 'mouseleave', onMouseLeave);
  },
  /*@if isVkOnly=0<*/
  bindUmmyInfo: function(container, params, details) {
    "use strict";
    if (!mono.global.preference.showUmmyInfo) {
      return;
    }
    details = details || {};
    if (details.widthLimit && document.documentElement.offsetWidth < details.widthLimit) {
      return;
    }
    var infoPopup = null;
    var infoPopupShowTimer = null;
    var positionTop = null;

    var popupArrowTop = 8;
    var popupArrow = null;
    var popupArrowShadow = null;

    var killTimer = null;
    var killTimerUpdate = function() {
      clearTimeout(killTimer);
      killTimer = setTimeout(function() {
        if (infoPopup && infoPopup.parentNode) {
          if (infoPopup.style.display !== 'none') {
            return killTimerUpdate();
          }
          infoPopup.parentNode.removeChild(infoPopup);
        }
      }, 30 * 1000);
    };

    var fixPosition = function() {
      setTimeout(function() {
        var windowHeight = window.innerHeight;
        var infoHeight = infoPopup.clientHeight;
        var scrollY = window.scrollY;
        if (infoHeight + positionTop > windowHeight + scrollY) {
          var newPositionTop = windowHeight - infoHeight + scrollY;
          if (newPositionTop < 0) {
            return;
          }

          if (positionTop === newPositionTop) {
            return;
          }

          infoPopup.style.top = newPositionTop + 'px';

          var raz = 8 - (windowHeight - (infoHeight + positionTop) + scrollY);
          if (popupArrowTop !== raz) {
            popupArrowTop = raz;
            popupArrow.style.top = popupArrowTop + 'px';
            popupArrowShadow.style.top = popupArrowTop + 'px';
          }
        } else {
          if (popupArrowTop !== 8) {
            popupArrowTop = 8;
            popupArrow.style.top = popupArrowTop + 'px';
            popupArrowShadow.style.top = popupArrowTop + 'px';
          }
        }
      });
    };

    var onMouseLeave = function() {
      clearTimeout(infoPopupShowTimer);
      infoPopupShowTimer = setTimeout(function() {
        infoPopup.style.display = 'none';
      }, 50);
    };

    var updateLeftPos = function(el) {
      var position = SaveFrom_Utils.getPosition(el);
      if (details.posLeft) {
        infoPopup.style.right = (document.documentElement.clientWidth - position.left - 21) + 'px';
      } else {
        var size = SaveFrom_Utils.getSize(el);
        infoPopup.style.left = (size.width + position.left - 21) + 'px';
      }
    };

    mono.on(container, 'mouseenter', function() {
      clearTimeout(infoPopupShowTimer);

      var position = SaveFrom_Utils.getPosition(container);

      if (!infoPopup) {
        if (details.expUmmyInfo) {
          infoPopup = details.expUmmyInfo(params);
        } else {
          infoPopup = SaveFrom_Utils.createUmmyInfo(params, details);
        }

        popupArrow = infoPopup.firstChild;
        popupArrowShadow = popupArrow.nextElementSibling;

        positionTop = position.top - 4;

        mono.on(infoPopup, 'mouseenter', function() {
          clearTimeout(infoPopupShowTimer);
        });

        mono.on(infoPopup, 'mouseleave', onMouseLeave);
      } else {
        positionTop = position.top - 4;
      }

      infoPopup.style.top = positionTop + 'px';

      if (infoPopup.dataset.hide === '1') {
        return;
      }

      updateLeftPos(container);

      if (!infoPopup.parentNode) {
        infoPopup.style.display = 'none';
        document.body.appendChild(infoPopup);
      }

      if (infoPopup.style.display !== 'block') {
        infoPopup.style.display = 'block';
      }

      fixPosition();

      killTimerUpdate();
    });
    mono.on(container, 'mouseleave', onMouseLeave);
  },

  popupMenu: {
    popupId: 'sf_popupMenu',
    popup: undefined,
    popupStyle: undefined,
    dataArrtVisible: 'data-isVisible',
    extStyleCache: undefined,
    ummyIcon: null,

    badgeQualityList: ['8K', '4K', '2160', '1440', '1080', '720', 'ummy'],
    createBadge: function(qulity, options) {
      options = options || {};
      var style = {
        display: 'inline-block',
        lineHeight: '18px',
        width: '19px',
        height: '17px',
        color: '#fff',
        fontSize: '12px',
        borderRadius: '2px',
        verticalAlign: 'middle',
        textAlign: 'center',
        paddingRight: '2px',
        fontWeight: 'bold',
        marginLeft: '3px'
      };
      for (var key in options.containerStyle) {
        style[key] = options.containerStyle[key];
      }

      var container = mono.create('div', {
        style: style
      });

      if (qulity === '1080' || qulity === '2160' || qulity === '1440' || qulity === '720') {
        container.textContent = 'HD';
        container.style.backgroundColor = '#505050';
        container.style.paddingRight = '1px';
      } else
      if (qulity === '8K' || qulity === '4K') {
        container.textContent = 'HD';
        container.style.paddingRight = '1px';
        container.style.backgroundColor = 'rgb(247, 180, 6)';
      } else
      if (qulity === 'mp3') {
        container.textContent = 'MP3';
        container.style.width = '26px';
        container.style.paddingRight = '1px';
        container.style.backgroundColor = '#505050';
      } else
      if (qulity === 'ummy') {
        if (this.ummyIcon) {
          container.style.background = 'url('+this.ummyIcon+') center center no-repeat';
        } else {
          mono.sendMessage({action: 'getUmmyIcon'}, function(dataImg) {
            container.style.background = 'url(' + (this.ummyIcon = dataImg) + ') center center no-repeat';
          }.bind(this));
        }
      }
      return container;
    },

    getTitleNode: function(link) {
      "use strict";
      var _this = SaveFrom_Utils.popupMenu;

      var titleContainer = mono.create('span', {
        style: {
          cssFloat: 'left'
        }
      });

      if ( link.quality === 'ummy' ) {
        // ummy hook
        var badge = document.createDocumentFragment();
        if (link.uQuality !== null) {
          if (['8K', '4K', '1440', '1080', '720'].indexOf(link.uQuality) !== -1) {
            badge.appendChild(document.createTextNode(link.uQuality));
          } else {
            badge.appendChild(_this.createBadge(link.uQuality, {
              containerStyle: {
                marginLeft: 0
              }
            }));
          }
        }
        mono.create(titleContainer, {
          append: [badge, ' ', 'Ummy']
        });
        badge = null;
      } else
      if (link.itemText) {
        titleContainer.textContent = link.itemText;
      } else {
        var titleQuality = link.quality?' '+link.quality:'';
        var titleFormat = link.format ? link.format : '???';
        var title3D = link['3d'] ? '3D ' : '';
        var titleFps = '';
        if (link.sFps) {
          titleFps += ' ' + (link.fps || 60);
        }
        titleContainer.textContent = title3D + titleFormat + titleQuality + titleFps;
      }

      if (_this.badgeQualityList.indexOf( String(link.quality) ) !== -1) {
        titleContainer.appendChild(_this.createBadge(String(link.quality)));
      }

      return titleContainer;
    },

    createPopupItem: function(listItem, options) {
      var _this = SaveFrom_Utils.popupMenu;

      var href;
      if (typeof listItem === 'string') {
        href = listItem;
      } else {
        href = listItem.href;
      }

      if (href === '-') {
        var line = mono.create('div', {
          style: {
            display: 'block',
            margin: '1px 0',
            borderTop: '1px solid rgb(214, 214, 214)'
          }
        });
        return {el: line};
      }

      var itemContainer = document.createElement( (href === '-text-') ? 'div' : 'a' );
      if (options.linkClass) {
        itemContainer.classList.add(options.linkClass);
      }
      var itemContainerStyle = {
        display: 'block',
        padding: '0 5px',
        textDecoration: 'none',
        whiteSpace: 'nowrap',
        overflow: 'hidden'
      };
      if (listItem.isHidden) {
        itemContainer.setAttribute(_this.dataArrtVisible, '0');
        itemContainerStyle.display = 'none';
      }
      SaveFrom_Utils.setStyle(itemContainer, itemContainerStyle);

      if (href === '-text-') {
        itemContainer.style.lineHeight = '22px';
        return {el: itemContainer};
      }

      itemContainer.href = href;

      if (href === '#') {
        return {el: itemContainer};
      }

      if (mono.isGM || mono.isOpera || mono.isSafari) {
        if (listItem.quality !== 'ummy') {
          itemContainer.title = mono.global.language.downloadTitle;
        }
      }

      if (listItem.title && listItem.format) {
        var ext = listItem.ext;
        if(!ext) {
          ext = listItem.format.toLowerCase();
        }
        itemContainer.setAttribute('download', mono.fileName.modify(listItem.title + '.' + ext) );
        if (listItem.forceDownload) {
          itemContainer.addEventListener('click', function(event) {
            SaveFrom_Utils.downloadOnClick(event, null, {
              useFrame: listItem.useIframe || false,
              el: this
            });
          }, false);
        }
      }

      if (options.onItemClick) {
        if (!listItem.func) {
          listItem.func = [];
        }
        if (!Array.isArray(listItem.func)) {
          listItem.func = [listItem.func];
        }
        if (listItem.func.indexOf(options.onItemClick) === -1) {
          listItem.func.push(options.onItemClick);
        }
      }

      if (listItem.func) {
        if (!Array.isArray(listItem.func)) {
          listItem.func = [listItem.func];
        }

        listItem.func.forEach(function(func) {
          "use strict";
          itemContainer.addEventListener('click', func.bind({link: listItem}), false);
        });
      }

      if (listItem.isBank !== undefined) {
        itemContainer.setAttribute('target', 'blank');
      }

      itemContainer.appendChild(_this.getTitleNode(listItem));

      var infoConteiner = document.createElement('span');
      SaveFrom_Utils.setStyle(infoConteiner, {
        cssFloat: 'right',
        lineHeight: '22px',
        height: '22px'
      });
      var sizeIconStyle = {
        top: '5px',
        verticalAlign: 'top'
      };
      for (var key in options.sizeIconStyle) {
        sizeIconStyle[key] = options.sizeIconStyle[key];
      }
      var sizeIconTextStyle = {
        marginLeft: 0
      };

      if (listItem.noAudio) {
        SaveFrom_Utils.appendNoSoundIcon(infoConteiner, sizeIconStyle);
      }

      var sizeIconNode = null;
      if (!listItem.noSize) {
        infoConteiner.addEventListener('click', function onClick(e) {
          if (infoConteiner.firstChild.tagName === 'IMG') {
            e.preventDefault();
            e.stopPropagation();
            mono.trigger(infoConteiner.firstChild, 'click', {cancelable: true});
          }
          this.removeEventListener('click', onClick);
        });
        sizeIconNode = SaveFrom_Utils.appendFileSizeIcon(itemContainer, sizeIconStyle, sizeIconTextStyle, undefined, true, infoConteiner, listItem);
      }

      itemContainer.appendChild(infoConteiner);

      if (listItem.quality === 'ummy') {
        var ummyInfoParams = {
          video: listItem.videoId,
          vid: listItem.vid
        };
        SaveFrom_Utils.bindUmmyInfo(itemContainer, ummyInfoParams, options.ummyInfoDetails);
      }

      return {el: itemContainer, sizeIcon: sizeIconNode, prop: listItem};
    },

    sortMenuItems: function(list, options) {
      if (options === undefined) {
        options = {};
      }
      var formatPriority = ['ummy','Audio Opus','Audio Vorbis','Audio AAC','3GP','WebM','FLV','MP4'];
      var strQuality = {
        Mobile: 280,
        LD: 280,
        SD: 360,
        HD: 720,
        '480 low': 478,
        '480 med': 479,
        '480 high': 480,
        'ummy': 1
      };
      var sizePriority = {};
      var bitratePriority = [];
      var defList = [];
      var audioList = [];
      var subtitleList = [];
      var mute60List = [];
      var muteList = [];
      var _3dList = [];
      var unkList = [];

      list.forEach(function(item) {
        var prop = item.prop;
        if (options.noProp) {
          prop = item;
        }
        if (!prop.format) {
          unkList.push(item);
          return 1;
        }
        if (prop.isSubtitle) {
          subtitleList.push(item);
        } else
        if (!prop.noVideo) {
          var size = strQuality[prop.quality] || -1;
          if (size === -1) {
            if (String(prop.quality).substr(-1) === 'K') {
              size = parseInt(prop.quality) * 1000;
            } else {
              size = parseInt(prop.quality);
            }
          }
          if (options.maxSize && size > options.maxSize) {
            return 1;
          }
          if (options.minSize && size < options.minSize) {
            return 1;
          }
          sizePriority[prop.quality] = size;
          if (prop.noAudio) {
            if (prop.sFps) {
              mute60List.push(item);
            } else {
              muteList.push(item);
            }
          } else
          if (prop['3d']) {
            _3dList.push(item);
          } else {
            defList.push(item);
          }
        } else {
          bitratePriority[prop.quality] = parseInt(prop.quality);
          audioList.push(item);
        }
      });
      var sizeCompare = function(a, b) {
        return sizePriority[a.quality] > sizePriority[b.quality]? -1 : sizePriority[a.quality] === sizePriority[b.quality]? 0 : 1;
      };
      var bitrateCompare = function(a, b) {
        return bitratePriority[a.quality] > bitratePriority[b.quality]? -1 : (bitratePriority[a.quality] === bitratePriority[b.quality])? 0 : 1;
      };
      var formatCompare = function(a, b) {
        if (a.noVideo && b.noVideo) {
          return bitrateCompare(a, b);
        }
        if (a.noVideo) {
          return 1;
        }
        if (b.noVideo) {
          return -1;
        }
        return formatPriority.indexOf(a.format) > formatPriority.indexOf(b.format)? -1 : formatPriority.indexOf(a.format) === formatPriority.indexOf(b.format)? 0 : 1;
      };

      var compare = function(aa, bb) {
        var a = aa.prop;
        var b = bb.prop;
        if (options.noProp) {
          a = aa;
          b = bb;
        }

        var size = sizeCompare(a, b);
        if (size !== 0) {
          return size;
        }
        return formatCompare(a, b);
      };
      defList.sort(compare);
      _3dList.sort(compare);
      audioList.sort(compare);
      mute60List.sort(compare);
      muteList.sort(compare);

      var resList = null;
      if (options.typeList) {
        resList = [];
        if (options.typeList.indexOf('video') !== -1) {
          resList = resList.concat(defList);
        }
        if (options.typeList.indexOf('3d') !== -1) {
          resList = resList.concat(_3dList);
        }
        if (options.typeList.indexOf('audio') !== -1) {
          resList = resList.concat(audioList);
        }
        if (options.typeList.indexOf('mute') !== -1) {
          resList = resList.concat(muteList);
        }
        if (options.typeList.indexOf('mute60') !== -1) {
          resList = resList.concat(mute60List);
        }
        if (options.typeList.indexOf('subtitles') !== -1) {
          resList = resList.concat(subtitleList);
        }
        if (options.typeList.indexOf('other') !== -1) {
          resList = resList.concat(unkList);
        }
      } else {
        resList = defList.concat(_3dList, audioList, subtitleList, mute60List, muteList, unkList);
      }
      if (options.groupCompare) {
        resList.sort(compare);
      }
      return resList;
    },

    removePanel: function() {
      if (this.popup.parentNode !== null) {
        this.popup.parentNode.removeChild(this.popup);
      }
      if (this.popupStyle !== undefined && this.popupStyle.parentNode !== null) {
        this.popupStyle.parentNode.removeChild(this.popupStyle);
      }
      this.popup = undefined;
      this.popupStyle = undefined;
    },

    getHiddenList: function(hiddenList, options) {
      "use strict";
      var _this = this;
      var content = document.createDocumentFragment();
      var scrollListItemCount = 8;
      if (hiddenList.length < scrollListItemCount) {
        mono.create(content, {
          append: hiddenList
        });
      } else {
        var scrollContainer = mono.create('div', {
          style: {
            maxHeight: (scrollListItemCount * 24) + 'px',
            overflowY: 'scroll',
            display: 'none'
          },
          on: [
            ['wheel', function(e) {
              if (e.wheelDeltaY > 0 && this.scrollTop === 0) {
                e.preventDefault();
              } else
              if (e.wheelDeltaY < 0 && this.scrollHeight - (this.offsetHeight + this.scrollTop) <= 0) {
                e.preventDefault();
              }
            }],
            (function() {
              var hasTopShadow = false;
              return ['scroll', function() {
                if (this.scrollTop !== 0) {
                  if (hasTopShadow) {
                    return;
                  }
                  hasTopShadow = true;
                  this.style.boxShadow = 'rgba(0, 0, 0, 0.40) -2px 1px 2px 0px inset';
                } else {
                  if (!hasTopShadow) {
                    return;
                  }
                  hasTopShadow = false;
                  this.style.boxShadow = '';
                }
              }];
            })()
          ],
          append: hiddenList
        });
        scrollContainer.setAttribute(_this.dataArrtVisible, '0');

        content.appendChild(scrollContainer);
      }

      var separator = _this.createPopupItem('-', options).el;
      content.appendChild(separator);

      var moreItem = _this.createPopupItem('#', options).el;
      mono.create(moreItem, {
        text: mono.global.language.more + ' ' + String.fromCharCode(187), //171 //160 - space
        data: {
          visible: '0'
        },
        on: ['click', function(e) {
          e.preventDefault();
          var state = this.dataset.visible;
          var symbol;
          if (state > 0) {
            state--;
            symbol = 187;
          } else {
            state++;
            symbol = 171;
          }
          this.textContent = mono.global.language.more + ' ' + String.fromCharCode(symbol);
          this.dataset.visible = state;
          var itemList = this.parentNode.querySelectorAll('*[' + _this.dataArrtVisible + ']');
          for (var i = 0, item; item = itemList[i]; i++) {
            if (state === 1) {
              item.style.display = 'block';
            } else {
              item.style.display = 'none';
            }
            item.setAttribute( _this.dataArrtVisible, state);
          }
        }]
      });
      content.appendChild(moreItem);

      if (options.visibleCount === 0) {
        mono.trigger(moreItem, 'click', {cancelable: true});
      }

      return content;
    },

    getContent: function(options) {
      "use strict";
      var _this = this;
      var links = options.links;

      var content = document.createDocumentFragment();

      var sizeIconList = [];

      if(typeof(links) === 'string') {
        var loadingItem = _this.createPopupItem('-text-', options).el;
        loadingItem.textContent = links;
        content.appendChild( loadingItem );
      } else
      if (links.length === 0) {
        var emptyItem = _this.createPopupItem('-text-', options).el;
        emptyItem.textContent = mono.global.language.noLinksFound;
        content.appendChild( emptyItem );
      } else {
        var items = [];
        links.forEach(function(link) {
          items.push(_this.createPopupItem(link, options));
        });

        items = _this.sortMenuItems(items);

        var hiddenList = [];

        items.forEach(function(item) {
          if (item.prop.isHidden) {
            hiddenList.push(item.el);
            return 1;
          }

          content.appendChild(item.el);

          if (options.showFileSize && item.sizeIcon) {
            sizeIconList.push(item.sizeIcon);
          }
        });

        options.visibleCount = items.length - hiddenList.length;

        if (hiddenList.length > 0) {
          if (options.getHiddenListFunc) {
            content.appendChild(options.getHiddenListFunc(hiddenList, options));
          } else {
            content.appendChild(_this.getHiddenList(hiddenList, options));
          }
        }
      }

      return {sizeIconList: sizeIconList, content: content};
    },

    create: function(options) {
      var button = options.button;
      var _this = SaveFrom_Utils.popupMenu;

      options.linkClass = options.linkClass || 'sf-menu-item';

      options.offsetRight = options.offsetRight || 0;

      options.parent = options.parent || document.body;

      if (options.isUpdate && (_this.popup === undefined || _this.popup.style.display === 'none')) {
        return;
      }

      if(_this.popup) {
        _this.removePanel();
      }

      var popupContainer = _this.popup = document.createElement('div');
      var containerSelector = '#'+_this.popupId;
      if (options.popupId) {
        containerSelector = '#'+options.popupId;
        popupContainer.id = options.popupId;
      } else
      if (options.containerClass) {
        containerSelector = '.'+options.containerClass;
        popupContainer.classList.add(options.containerClass);
      } else {
        popupContainer.id = _this.popupId;
      }

      var popupContainerStyle = {
        display: 'block',
        position: 'absolute',
        minHeight: '24px',
        cursor: 'default',
        textAlign: 'left',
        whiteSpace: 'nowrap',
        fontFamily: 'arial, sans-serif'
      };
      if (options.extStyle) {
        delete popupContainerStyle.display;
      }

      var pos = SaveFrom_Utils.getPosition(button, options.parent),
        size = SaveFrom_Utils.getSize(button);

      popupContainerStyle.top = (pos.top + size.height) + 'px';
      popupContainerStyle.left = (pos.left + options.offsetRight) + 'px';
      SaveFrom_Utils.setStyle(popupContainer, popupContainerStyle);

      var popupCustomContainerStyle = {
        'background-color': '#fff',
        'z-index': '9999',
        'box-shadow': '0 2px 10px 0 rgba(0,0,0,0.2)',
        border: '1px solid #ccc',
        'border-radius': '3px',
        'font-size': '12px',
        'font-weight': 'bold',
        'min-width': '190px'
      };

      if (options.style && options.style.popup) {
        for (var key in options.style.popup) {
          var value = options.style.popup[key];
          popupCustomContainerStyle[key] = value;
        }
      }

      SaveFrom_Utils.addStyleRules(containerSelector, popupCustomContainerStyle);

      var itemCustomStyle = {
        'line-height': '24px',
        color: '#3D3D3D'
      };

      if (options.style && options.style.item) {
        for (var key in options.style.item) {
          var value = options.style.item[key];
          itemCustomStyle[key] = value;
        }
      }

      SaveFrom_Utils.addStyleRules(containerSelector+' .'+ options.linkClass, itemCustomStyle);

      var stopPropagationFunc = function(e){e.stopPropagation()};
      mono.create(popupContainer, {
        on: [
          ['click', stopPropagationFunc],
          ['mouseover', stopPropagationFunc],
          ['mouseup', stopPropagationFunc],
          ['mousedown', stopPropagationFunc],
          ['mouseout', stopPropagationFunc]
        ]
      });

      while (popupContainer.firstChild !== null) {
        popupContainer.removeChild(popupContainer.firstChild);
      }

      var menuContent = _this.getContent.call(_this, options);
      var sizeIconList = menuContent.sizeIconList;
      menuContent = menuContent.content;
      popupContainer.appendChild(menuContent);


      var hoverBgColor = '#2F8AFF';
      var hoverTextColor = '#fff';
      if (options.style && options.style.hover) {
        hoverBgColor = options.style.hover.backgroundColor || hoverBgColor;
        hoverTextColor = options.style.hover.color || hoverTextColor;
      }
      var styleEl = _this.popupStyle = document.createElement('style');
      styleEl.textContent = containerSelector + ' a:hover'+
        '{'+
        'background-color: '+hoverBgColor+';'+
        'color: '+hoverTextColor+';'+
        '}'+
        containerSelector + ' > a:first-child'+
        '{'+
        'border-top-left-radius: 3px;'+
        'border-top-right-radius: 3px;'+
        '}'+
        containerSelector + ' > a:last-child'+
        '{'+
        'border-bottom-left-radius: 3px;'+
        'border-bottom-right-radius: 3px;'+
        '}';

      options.parent.appendChild(styleEl);
      options.parent.appendChild(popupContainer);
      if (options.extStyle) {
        if (SaveFrom_Utils.popupMenu.extStyleCache !== undefined && SaveFrom_Utils.popupMenu.extStyleCache.parentNode !== null) {
          SaveFrom_Utils.popupMenu.extStyleCache.parentNode.removeChild(SaveFrom_Utils.popupMenu.extStyleCache);
        }

        var extElClassName = 'sf-extElStyle_'+containerSelector.substr(1);
        var extBodyClassName = 'sf-extBodyStyle_'+containerSelector.substr(1);
        var extBodyStyle = document.querySelector('style.'+extBodyClassName);
        if (extBodyStyle === null) {
          document.body.appendChild( mono.create('style', {
            class: extBodyClassName,
            text: containerSelector+' {' +
              'display: none;' +
              '}'
          }) );
        }
        SaveFrom_Utils.popupMenu.extStyleCache = options.extStyle.appendChild(mono.create('style', {
          class: extElClassName,
          text: 'body ' + containerSelector + ' {' +
            'display: block;' +
            '}'
        }));
      }

      setTimeout(function() {
        sizeIconList.forEach(function(icon) {
          mono.trigger(icon, 'click', {bubbles: false, cancelable: true});
        });
      });

      return popupContainer;
    },

    update: function(popupContainer, options) {
      var _this = SaveFrom_Utils.popupMenu;

      while (popupContainer.firstChild !== null) {
        popupContainer.removeChild(popupContainer.firstChild);
      }

      var menuContent = _this.getContent.call(_this, options);
      var sizeIconList = menuContent.sizeIconList;
      menuContent = menuContent.content;
      popupContainer.appendChild(menuContent);

      setTimeout(function() {
        sizeIconList.forEach(function(icon) {
          mono.trigger(icon, 'click', {bubbles: false, cancelable: true});
        });
      });
    },

    prepareLinks: {
      /*@if isVkOnly=0>*/
      youtube: function(links, title, subtitles, details) {
        details = details || {};
        subtitles = subtitles || [];
        links = mono.extend({}, links);
        var sfUtilsYt = SaveFrom_Utils.video.yt;
        sfUtilsYt.init();
        sfUtilsYt.filterLinks(links);

        var badgeQualityList = SaveFrom_Utils.popupMenu.badgeQualityList;
        var menuLinks = [];
        var popupLink;
        var qualityIndex = -1;
        var qualityBadge = null;
        var ummyHasAudio = false;
        var meta = links.meta || {};

        for (var format in sfUtilsYt.format) {
          var formatList = sfUtilsYt.format[format];
          for (var itag in formatList) {
            if (links[itag] === undefined) {
              continue;
            }
            var url = links[itag];
            delete links[itag];

            var prop = formatList[itag];

            var isHidden = false;

            if (!sfUtilsYt.showFormat[format]) {
              isHidden = true;
            }

            if (prop['3d'] && !sfUtilsYt.show3D) {
              isHidden = true;
            }

            if (prop.noAudio && !sfUtilsYt.showMP4NoAudio) {
              isHidden = true;
            }

            popupLink = {
              href: url,
              isHidden: isHidden,
              title: title,
              format: format,
              itag: itag
            };

            for (var pItem in prop) {
              popupLink[pItem] = prop[pItem];
            }

            var metaTag = meta[itag] || {};

            if (metaTag.quality) {
              popupLink.quality = metaTag.quality;
            }

            if (metaTag.fps) {
              popupLink.fps = metaTag.fps;
            }

            if(prop.noVideo || prop.noAudio) {
              if (!prop.noAudio) {
                ummyHasAudio = true;
              }
              popupLink.forceDownload = true;
              popupLink.useIframe = true;
            }

            var qIndex = badgeQualityList.indexOf(popupLink.quality);
            if (qIndex !== -1 && (qualityIndex === -1 || qIndex < qualityIndex) ) {
              qualityIndex = qIndex;
            }

            menuLinks.push(popupLink);
          }
        }

        if (qualityIndex !== -1) {
          qualityBadge = badgeQualityList[qualityIndex];
        }

        var videoId;
        if (links.ummy || links.ummyAudio) {
          videoId = mono.parseUrlParams(links.ummy || links.ummyAudio);
          videoId = videoId.v;
        }
        if (videoId) {
          videoId = 'yt-' + videoId;
        }

        for (var itag in links) {
          if (itag === 'meta') {
            continue;
          }
          if (['ummy', 'ummyAudio'].indexOf(itag) !== -1) {
            popupLink = {
              href: links[itag],
              quality: 'ummy',
              noSize: true,
              format: 'ummy',
              videoId: videoId
            };
            if (itag === 'ummy') {
              popupLink.itag = 'ummy';
              popupLink.uQuality = qualityBadge;
            } else {
              popupLink.itag = 'ummyAudio';
              popupLink.uQuality = 'mp3';
              popupLink.uIsAudio = true;
            }
            if (details.ummyVid) {
              popupLink.vid = details.ummyVid;
            }
          } else {
            popupLink = {
              href: links[itag],
              isHidden: true,
              title: title,
              quality: itag,
              itag: itag
            };
          }
          menuLinks.push(popupLink);
          delete links[itag];
        }

        for (var i = 0, item; item = subtitles[i]; i++) {
          popupLink = {
            href: item.url,
            isHidden: true,
            quality: 'SRT' + (item.isAuto ? 'A' : ''),
            itemText: mono.global.language.subtitles + ' (' + item.lang + ')',
            title: title + '-' + item.langCode,
            ext: 'srt',
            format: 'SRT',
            isSubtitle: true,
            forceDownload: true,
            langCode: item.langCode
          };
          menuLinks.push(popupLink);
        }

        return menuLinks;
      },
      vimeo: function(links, title) {
        var menuLinks = [];
        var popupLink;
        links.forEach(function(link) {
          var ext = link.ext;
          if(!ext) {
            ext = 'mp4';
            if(link.url.search(/\.flv($|\?)/i) != -1) {
              ext = 'flv';
            }
          }
          var quality = link.name || ext;
          var format = link.format || link.type || ext;
          format = format.toUpperCase();
          popupLink = { href: link.url, title: title, ext: ext, format: format, quality: quality, forceDownload: true, useIframe: true };
          menuLinks.push(popupLink);
        });
        return menuLinks;
      },
      /*@if isVkOnly=0<*/
      vk: function(links, title) {
        var menuLinks = [];
        var popupLink;
        links.forEach(function(link) {
          var ext = link.name|| link.ext;
          var format = (ext)?ext.toUpperCase():'';
          var quality = (link.subname)?link.subname:'';
          popupLink = { href: link.url, title: title, ext: ext, format: format, quality: quality, forceDownload: true, useIframe: true };
          menuLinks.push(popupLink);
        });
        return menuLinks;
      },
      /*@if isVkOnly=0>*/
      dailymotion: function(links, title) {
        var menuLinks = [];
        var popupLink;
        links.forEach(function(link) {
          var format = link.ext;
          var quality = (link.height)?link.height:'';
          popupLink = { href: link.url, title: title, ext: format, format: format, quality: quality, forceDownload: true };
          menuLinks.push(popupLink);
        });
        return menuLinks;
      },
      facebook: function(links, title) {
        var menuLinks = [];
        var popupLink;
        links.forEach(function(link) {
          var ext = link.ext;
          var format = (ext)?ext.toUpperCase():'';
          var quality = link.name;
          popupLink = { href: link.url, title: title, ext: ext, format: format, quality: quality, forceDownload: true };
          menuLinks.push(popupLink);
        });
        return menuLinks;
      },
      rutube: function(href) {
        "use strict";
        if (Array.isArray(href)) {
          href = href[0];
        }
        if (typeof href !== 'string') {
          return;
        }
        var links = [];

        var videoId = href.match(/\/embed\/(\d+)/);
        videoId = videoId && videoId[1] || undefined;

        if (!videoId) {
          videoId = href.match(/\/video\/([0-9a-z]+)/);
          videoId = videoId && videoId[1] || undefined;
        }

        if (/\/\/video\./.test(href)) {
          href = href.replace(/\/\/video\./, '//');
          if(!videoId) {
            videoId = href.match(/\/(\d+)$/);
            videoId = videoId && videoId[1] || undefined;
          }
        }

        if (videoId) {
          videoId = 'rt-' + videoId;
        }

        var ummyUrl = href.replace(/^.*(\/\/.*)$/, 'ummy:$1');

        var videoLink = {
          href: ummyUrl,
          quality: 'ummy',
          noSize: true,
          format: 'ummy',
          itag: 'ummy',
          uQuality: '720',
          vid: 114,
          videoId: videoId
        };

        var sep = '?';
        if (ummyUrl.indexOf(sep) !== -1) {
          sep = '&';
        }
        ummyUrl += sep + 'sf_type=audio';

        var audioLink = {
          href: ummyUrl,
          quality: 'ummy',
          noSize: true,
          format: 'ummy',
          itag: 'ummyAudio',
          uQuality: 'mp3',
          uIsAudio: true,
          vid: 114,
          videoId: videoId
        };

        links.push(videoLink);
        links.push(audioLink);

        return links;
      }
      /*@if isVkOnly=0<*/
    },

    /**
     * @param {Node|Element} target
     * @param {String|Array} links
     * @param {String} id
     * @param {Object} [_details]
     * @returns {{isShow: boolean, el: Node|Element, hide: Function, update: Function}}
     */
    quickInsert: function(target, links, id, _details) {
      _details = _details || {};
      var result = {};

      var hideMenu = function(e) {
        if (e && (e.target === target || target.contains(e.target))) {
          return;
        }

        if (!result.isShow) {
          return;
        }

        menu.style.display = 'none';
        mono.off(document, 'mousedown', hideMenu);
        result.isShow = false;
        _details.onHide && _details.onHide(menu);
      };

      var options = {
        links: links,
        button: target,
        popupId: id,
        showFileSize: true
        /*
         parent: args.parent,
         extStyle: args.extStyle,
         offsetRight: args.offsetRight,
         onItemClick: args.onItemClick
         */
      };

      mono.extend(options, _details);

      var menu = SaveFrom_Utils.popupMenu.create(options);

      _details.onShow && _details.onShow(menu);

      mono.off(document, 'mousedown', hideMenu);
      mono.on(document, 'mousedown', hideMenu);

      return mono.extend(result, {
        button: target,
        isShow: true,
        el: menu,
        hide: hideMenu,
        update: function(links) {
          options.links = links;
          SaveFrom_Utils.popupMenu.update(menu, options)
        }
      });
    }
  },

  /*@if isVkOnly=0>*/
  frameMenu: {
    getBtn: function(details) {
      "use strict";
      var selectBtn = undefined;

      var containerStyle = {
        verticalAlign: 'middle',
        position: 'absolute',
        zIndex: 999,
        fontFamily: 'arial, sans-serif'
      };

      for (var key in details.containerStyle) {
        containerStyle[key] = details.containerStyle[key];
      }

      var quickBtnStyle = {
        display: 'inline-block',
        fontSize: 'inherit',
        height: '22px',
        border: '1px solid rgba(255, 255, 255, 0.4)',
        borderRadius: '3px',
        borderTopRightRadius: 0,
        borderBottomRightRadius: 0,
        paddingRight: '12px',
        paddingLeft: '28px',
        cursor: 'pointer',
        verticalAlign: 'middle',
        position: 'relative',
        lineHeight: '22px',
        textDecoration: 'none',
        zIndex: 1,
        color: '#fff'
      };

      for (var key in details.quickBtnStyle) {
        quickBtnStyle[key] = details.quickBtnStyle[key];
      }

      var quickBtnLabel = details.quickBtnLabel || mono.global.language.download;

      var insertStyle = {
        '': {
          opacity: 0.8,
          display: 'none'
        },
        '\\.sf-show': {
          display: 'block'
        },
        'button::-moz-focus-inner': {
          padding: 0,
          margin: 0
        },
        '.sf-quick-btn': {
          backgroundColor: 'rgba(28,28,28,0.1)'
        },
        '.sf-select-btn': {
          backgroundColor: 'rgba(28,28,28,0.1)'
        },
        ':hover,\\.hover': {
          opacity: 1
        },
        ':hover .sf-quick-btn,\\.hover .sf-quick-btn': {
          backgroundColor: 'rgba(0, 163, 80, 0.5)'
        },
        ':hover .sf-select-btn,\\.hover .sf-select-btn': {
          backgroundColor: 'rgba(60, 60, 60, 0.5)'//'rgba(28,28,28,0.8)'
        },
        '\\.hover .sf-select-btn': {
          backgroundColor: 'rgba(28,28,28,0.8)'
        }
      };

      for (var key in details.insertStyle) {
        insertStyle[key] = details.insertStyle[key];
      }

      var selectBtnStyle = {
        position: 'relative',
        display: 'inline-block',
        fontSize: 'inherit',
        height: '24px',
        padding: 0,
        paddingRight: '21px',
        border: '1px solid rgba(255, 255, 255, 0.4)',
        borderLeft: 0,
        borderRadius: '3px',
        borderTopLeftRadius: '0',
        borderBottomLeftRadius: '0',
        cursor: 'pointer',
        color: '#fff',
        zIndex: 0,
        verticalAlign: 'middle',
        marginLeft: 0
      };

      for (var key in details.selectBtnStyle) {
        selectBtnStyle[key] = details.selectBtnStyle[key];
      }

      var quickBtnIcon = details.quickBtnIcon || mono.create('i', {
        style: {
          position: 'absolute',
          display: 'inline-block',
          left: '6px',
          top: '3px',
          backgroundImage: 'url('+SaveFrom_Utils.svg.getSrc('download', '#ffffff')+')',
          backgroundSize: '12px',
          backgroundRepeat: 'no-repeat',
          backgroundPosition: 'center',
          width: '16px',
          height: '16px'
        }
      });

      var selectBtnIcon = details.selectBtnIcon || mono.create('i', {
        style: {
          position: 'absolute',
          display: 'inline-block',
          top: '9px',
          right: '6px',
          border: '5px solid #FFF',
          borderBottomColor: 'transparent',
          borderLeftColor: 'transparent',
          borderRightColor: 'transparent'
        }
      });

      var quickBtn;

      var btnContainer = mono.create('div', {
        id: details.btnId,
        style: containerStyle,
        on: details.on,
        append: [
          quickBtn = mono.create('a', {
            class: 'sf-quick-btn',
            style: quickBtnStyle,
            href: '#',
            append: [
              quickBtnIcon,
              quickBtnLabel
            ]
          }),
          mono.create('style', {text: mono.styleObjToText(insertStyle, '#'+details.btnId)}),
          selectBtn = mono.create('button', {
            class: 'sf-select-btn',
            style: selectBtnStyle,
            on: details.onSelectBtn,
            append: [
              selectBtnIcon
            ]
          })
        ]
      });

      var setQuality = function(text) {
        var node = typeof text === 'object' ? text : document.createTextNode(text);
        var first = selectBtn.firstChild;
        if (first === selectBtnIcon) {
          selectBtn.insertBefore(node, first);
        } else {
          selectBtn.replaceChild(node, first);
        }
      };

      return {
        node: btnContainer,
        setQuality: setQuality,
        setLoadingState: function() {
          setQuality(mono.create('img', {
            src: SaveFrom_Utils.svg.getSrc('info', '#ffffff'),
            style: {
              width: '14px',
              height: '14px',
              marginLeft: '6px',
              verticalAlign: 'middle',
              top: '-1px',
              position: 'relative'
            }
          }));
        },
        selectBtn: selectBtn,
        quickBtn: quickBtn
      };
    },

    getHiddenList: function(hiddenList, options) {
      "use strict";
      var popupMenu = SaveFrom_Utils.popupMenu;
      var moreBtn = popupMenu.createPopupItem('-text-', options).el;
      mono.create(moreBtn, {
        text: mono.global.language.more + ' ' + String.fromCharCode(187),
        style: {
          cursor: 'pointer'
        },
        on: ['click', function() {
          var content = this.parentNode;
          var itemList = content.querySelectorAll('*[' + popupMenu.dataArrtVisible + ']');
          for (var i = 0, item; item = itemList[i]; i++) {
            item.style.display = 'block';
            item.setAttribute( popupMenu.dataArrtVisible, 1);
          }
          this.parentNode.removeChild(this);
          /*content.replaceChild(mono.create('i', {
            class: 'sf-separator'
          }), this);*/
        }]
      });

      var content = document.createDocumentFragment();
      content.appendChild(moreBtn);

      mono.create(content, {
        append: hiddenList
      });

      if (options.visibleCount === 0) {
        mono.trigger(moreBtn, 'click', {cancelable: true});
      }

      return content;
    },

    getMenuContainer: function(options) {
      "use strict";
      var popupMenu = SaveFrom_Utils.popupMenu;
      var button = options.button;
      var popupId = options.popupId;

      var container = mono.create('div',  {
          style: {
            position: 'absolute',
            minHeight: '24px',
            cursor: 'default',
            textAlign: 'left',
            whiteSpace: 'nowrap',
            overflow: 'auto'
          }
      });

      if (popupId[0] === '#') {
        container.id = popupId.substr(1);
      } else {
        container.classList.add(popupId);
      }

      var menuContent = popupMenu.getContent(options);
      container.appendChild(menuContent.content);

      setTimeout(function() {
        menuContent.sizeIconList.forEach(function(icon) {
          mono.trigger(icon, 'click', {bubbles: false, cancelable: true});
        });
      });

      var insertStyle = {
        '': {
          display: 'none',
          fontFamily: 'arial, sans-serif',

          backgroundColor: 'rgba(28,28,28,0.8)',
          zIndex: 9999,
          borderRadius: '4px',
          fontSize: '12px',
          fontWeight: 'bold',
          minWidth: '190px',
          color: '#fff'
        },
        '\\.sf-show': {
          display: 'block'
        },
        '::-webkit-scrollbar-track': {
          backgroundColor: '#424242'
        },
        '::-webkit-scrollbar': {
          width: '10px',
          backgroundColor: '#424242'
        },
        '::-webkit-scrollbar-thumb': {
          backgroundColor: '#8e8e8e'
        },
        '.sf-menu-item': {
          lineHeight: '24px',
          color: '#fff'
        },
        '.sf-menu-item:hover': {
          backgroundColor: '#1c1c1c'
        }
      };
      for (var key in options.insertStyle) {
        insertStyle[key] = options.insertStyle[key];
      }

      var pos = SaveFrom_Utils.getPosition(button, options.parent);
      var size = SaveFrom_Utils.getSize(button);

      var stopPropagationFunc = function(e){e.stopPropagation()};

      var topOffset = pos.top + size.height;
      mono.create(container, {
        style: {
          top: topOffset + 'px',
          right: (document.body.offsetWidth - pos.left - size.width) + 'px',
          maxHeight: (document.body.offsetHeight - topOffset - 40) + 'px'
        },
        on: [
          ['click', stopPropagationFunc],
          ['mouseover', stopPropagationFunc],
          ['mouseup', stopPropagationFunc],
          ['mousedown', stopPropagationFunc],
          ['mouseout', stopPropagationFunc],
          ['wheel', function(e) {
            if (e.wheelDeltaY > 0 && this.scrollTop === 0) {
              e.preventDefault();
            } else
            if (e.wheelDeltaY < 0 && this.scrollHeight - (this.offsetHeight + this.scrollTop) <= 0) {
              e.preventDefault();
            }
          }]
        ],
        append: [
          mono.create('style', {text: mono.styleObjToText(insertStyle, (popupId[0] === '#' ? '' : '.') + popupId)})
        ]
      });

      return container;
    },
    getMenu: function(target, links, id, _options) {
      "use strict";
      var options = {
        links: links,
        button: target,
        popupId: id || '#sf-frame-menu',
        showFileSize: true,
        sizeIconStyle: {
          color: '#fff'
        },
        linkClass: 'sf-menu-item',
        ummyInfoDetails: {
          posLeft: true,
          darkTheme: true,
          widthLimit: 480
        },
        getHiddenListFunc: this.getHiddenList.bind(this)
      };

      for (var key in _options) {
        options[key] = _options[key];
      }

      var menu = this.getMenuContainer(options);

      document.body.appendChild(menu);

      var hideMenu = function() {
        if (menu.parentNode) {
          menu.parentNode.removeChild(menu);
        }
        out.hide = true;
        options.onHide && options.onHide();
      };

      options.onShow && options.onShow(menu);

      mono.off(document, 'mousedown', hideMenu);
      mono.on(document, 'mousedown', hideMenu);

      var out = {
        isShow: true,
        el: menu,
        hide: hideMenu,
        update: function(links) {
          var popupMenu = SaveFrom_Utils.popupMenu;
          var style = menu.lastChild;
          menu.textContent = '';

          options.links = links;
          var menuContent = popupMenu.getContent(options);

          setTimeout(function() {
            menuContent.sizeIconList.forEach(function(icon) {
              mono.trigger(icon, 'click', {bubbles: false, cancelable: true});
            });
          });

          menu.appendChild(menuContent.content);
          menu.appendChild(style);
        }.bind(this)
      };

      return out;
    }
  },
  /*@if isVkOnly=0<*/

  mobileLightBox: {
    id: 'sf-lightbox',
    clear: function() {
      var el = document.getElementById(SaveFrom_Utils.mobileLightBox.id);
      if (el === null) {
        return;
      }
      el.parentNode.removeChild(el);
    },
    getTitle: function(item) {
      var title = [];

      title.push(item.format || '???');
      if (item.quality) {
        var quality = item.quality;

        if (item.sFps) {
          quality += ' ' + (item.fps || 60);
        }

        title.push(quality);
      }
      if (item['3d']) {
        title.push('3D');
      }
      if (item.noAudio) {
        title.push(mono.global.language.withoutAudio);
      }

      return title.join(' ');
    },
    createItem: function(listItem) {
      var mobileLightBox = SaveFrom_Utils.mobileLightBox;

      var button = mono.create('a', {
        style: {
          display: 'block',
          marginBottom: '6px',
          border: 'solid 1px #d3d3d3',
          lineHeight: '36px',
          minHeight: '36px',
          background: '#f8f8f8',
          verticalAlign: 'middle',
          fontSize: '15px',
          textAlign: 'center',
          color: '#333',
          borderRadius: '2px',
          overflow: 'hidden'
        }
      });

      if (typeof listItem === 'string') {
        button.textContent = listItem;
        return button;
      } else {
        button.href = listItem.href;
        button.download = listItem.title;
        button.textContent = mobileLightBox.getTitle(listItem);
      }

      if (listItem.isHidden) {
        button.classList.add('isOptional');
        button.style.display = 'none';
      }

      var sizeIconStyle = {
        verticalAlign: 'middle',
        cssFloat: 'right',
        lineHeight: '36px',
        minHeight: '36px',
        paddingRight: '15px',
        width: '18px'
      };
      var sizeIconTextStyle = {
        cssFloat: 'right',
        paddingRight: '5px'
      };
      SaveFrom_Utils.appendFileSizeIcon(button, sizeIconStyle, sizeIconTextStyle, undefined, true, button);

      return button;
    },
    getItems: function(itemList) {
      var mobileLightBox = SaveFrom_Utils.mobileLightBox;

      if (typeof itemList === 'string') {
        return {list: [mobileLightBox.createItem(itemList)], hiddenCount: 0};
      }

      var list = [];
      for (var i = 0, item; item = itemList[i]; i++) {
        if (item.quality === 'ummy') {
          continue;
        }
        list.push({el: mobileLightBox.createItem(item), prop: item});
      }
      list = SaveFrom_Utils.popupMenu.sortMenuItems(list);
      var elList = [];
      var hiddenElList = [];
      for (i = 0, item; item = list[i]; i++) {
        if (item.prop.isHidden) {
          hiddenElList.push(item.el);
        } else {
          elList.push(item.el);
        }
      }
      return {list: elList.concat(hiddenElList), hiddenCount: hiddenElList.length};
    },
    show: function(itemList) {
      var mobileLightBox = SaveFrom_Utils.mobileLightBox;

      var topOffset = window.pageYOffset;
      var winHeight = window.innerHeight;
      var mTop = parseInt(winHeight / 100 * 15);
      var btnBox = undefined;
      var moreBtn;

      var getBtnBoxSize = function(hasMore) {
        "use strict";
        var i = hasMore ? 2 : 1;
        return winHeight - 46*i - mTop*2;
      };

      var setMoreBtnState = function(itemObj) {
        "use strict";
        if (itemObj.hiddenCount > 0) {
          btnBox.style.height = getBtnBoxSize(1) + 'px';
          moreBtn.style.display = 'block';
        } else {
          moreBtn.style.display = 'none';
          btnBox.style.height = getBtnBoxSize(0) + 'px';
        }
      };

      var exLb = document.getElementById(mobileLightBox.id);
      if (exLb !== null) {
        exLb.parentNode.removeChild(exLb);
      }


      var lbWidth = window.innerWidth;
      if (lbWidth <= 250) {
        lbWidth = '90%';
      } else {
        lbWidth = '70%';
      }

      if (!itemList || itemList.length === 0) {
        itemList = mono.global.language.noLinksFound;
      }

      var itemObj = mobileLightBox.getItems(itemList);

      var lightbox = mono.create('div', {
        id: mobileLightBox.id,
        style: {
          position: 'absolute',
          top: 0,
          left: 0,
          width: '100%',
          zIndex: 9000,
          height: document.body.scrollHeight + 'px',
          background: 'rgba(0,0,0,0.85)',
          textAlign: 'center'
        },
        on: [
          ['click', function(e) {
            e.preventDefault();
            close();
          }]
        ],
        append: mono.create('div', {
          style: {
            display: 'inline-block',
            width: lbWidth,
            backgroundColor: '#eee',
            height: (winHeight - mTop*2)+'px',
            marginTop: (mTop + topOffset)+'px',
            borderRadius: '4px',
            padding: '8px',
            position: 'relative'
          },
          append: [
            btnBox = mono.create('div', {
              style: {
                overflowY: 'auto',
                marginBottom: '6px'
              },
              append: itemObj.list,
              on: ['touchmove', function(e) {
                e.stopPropagation();
              }]
            }),
            moreBtn = mono.create(mobileLightBox.createItem(mono.global.language.more + ' ' + String.fromCharCode(187)), {
              href: '#',
              on: ['click', function(e) {
                e.preventDefault();
                var state = 'none';
                var elList = this.parentNode.querySelectorAll('.isOptional');
                if (this.dataset.state !== 'open') {
                  this.dataset.state = 'open';
                  this.textContent = mono.global.language.more + ' ' + String.fromCharCode(171);
                  state = 'block';
                } else {
                  this.dataset.state = 'close';
                  this.textContent = mono.global.language.more + ' ' + String.fromCharCode(187);
                }
                for (var i = 0, el; el = elList[i]; i++) {
                  el.style.display = state;
                }
              }]
            }),
            mono.create(mobileLightBox.createItem(mono.global.language.close), {
              on: ['click', function(e) {
                e.preventDefault();
                close();
              }]
            })
          ],
          on: ['click', function(e) {
            e.stopPropagation();
          }]
        })
      });

      setMoreBtnState(itemObj);

      document.body.appendChild(lightbox);

      var topPos = document.body.scrollTop;

      var result = {};

      var close = function() {
        if (!result.isShow) {
          return;
        }

        document.body.scrollTop = topPos;
        result.hide();
      };

      return mono.extend(result, {
        isShow: true,
        el: lightbox,
        hide: function() {
          lightbox.parentNode && lightbox.parentNode.removeChild(lightbox);
          result.isShow = false;
        },
        close: close,
        update: function(itemList) {
          if (lightbox.parentNode === null) {
            return;
          }

          if (!itemList || itemList.length === 0) {
            itemList = mono.global.language.noLinksFound;
          }

          btnBox.textContent = '';
          var itemObj = mobileLightBox.getItems(itemList);

          mono.create(btnBox, {
            append: itemObj.list
          });

          setMoreBtnState(itemObj);
        }
      });
    }
  },

  /*@if isVkOnly=0>*/
  showNotification: function(message, id, onClose) {
    if (!id) {
      id = 'savefrom_popup_panel';
    }
    var panel = document.getElementById(id);
    if(panel)
      panel.parentNode.removeChild(panel);

    panel = document.createElement('div');
    panel.id = id;
    SaveFrom_Utils.setStyle(panel, {
      color: '#000',
      backgroundColor: '#feefae',
      backgroundImage: '-webkit-linear-gradient(top, #feefae, #fbe792)',
      cssFloat: 'none',
      borderBottom: '1px solid #aaaaab',
      display: 'block',
      position: 'fixed',
      zIndex: 2147483647,
      top: 0,
      left: 0,
      right: 0,
      margin: 0,
      padding: 0
    });
    panel.setAttribute('style', panel.style.cssText + ';background-image: linear-gradient(to bottom, #feefae, #fbe792)');

    panel.addEventListener('click', function(e) {
      if (e.target.tagName !== 'A') {
        return;
      }
      panel.parentNode.removeChild(panel);
      if (onClose) {
        onClose(id);
      }
    }, false);

    var content = document.createElement('div');
    SaveFrom_Utils.setStyle(content, {
      color: '#000',
      display: 'block',
      position: 'relative',
      margin: '0 auto',
      paddingLeft: '10px',
      paddingRight: '10px',
      height: '35px',
      fontSize: '16px',
      lineHeight: '35px',
      maxWidth: '960px',
      overflow: 'hidden',
      textAlign: 'center'
    });
    content.textContent = message;

    var btn = document.createElement('div');
    SaveFrom_Utils.setStyle(btn, {
      background: 'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAOCAYAAABU4P48AAADEUlEQVR42q2WX0hTYRjGdyXIoYuupAsvuuvKi+gm4hCjkrwKwXI1tbH8QyhqOTbPmafhH5zhXKNsmVRg1E1BEEhWBJ3CuslNR6FmlmLqjqWeKLr16zxfO6fvnB1X0D544f2e93nYT/fubA5Hns6T6lLu5ckK8U29V061NKko9NAwy5ktcnCPineIr/bukZOHDqgo9NAwc+T7yK4KfrK5UVmK9pOVyzFTQcMMHrvs4+Kd/IRzv7LpF8h3qctU0DCDJ2+w41UuflYStlavxEiuggdeE+zuXfwHV+WWFdRa8MBrC1BXV3fwX7Tfa1DNpdpaFR1q/cH9LFBWgxcZmi0p4qbKjig61M+bI1mgrAYvMiYAt9td2tDQQGpra9t0DT00zKzAr+u94nIsQlYHY+TznRGCs/78Gb2j0ONghju8yNA12lcibgaCFObr0A3q+zE6ZgCix8GMrofmRcbKUFBeXj6gQ+uw0DCzmifbWuS0BoJaiIRJ4nqcvsiGBrqRgYWGme5DBtlk2VFZh/siXCDJkdsGtA4LDTPdh4zdO21A54LFeSe1q+mrGkimFgb+QBuwmsZ6kEF2tvKUyr79LLQdLAoZ2z32eDwBHRj9dh+46VDQBIxaezpmvCh66xwZZOfcp9Wsp8LDUSOL3jpHJguCXQN2PeyAUx1+OR3XQDK1IWfWYDhOi66HprEeZJB9e7xKZmHYNWDXg/UgYwKoqak5bFkDYz0wswJPBM6Lq4MDRNFAlHt3DdjFaJiWDo0ZPPAig2zi2AlRFUIURB2+ZVoDdj0wox7Ni4yVodDpdHotO1uQ0Qqz/sM+HzfdE1KUazEyf7GLvJDayeKlMMEdhR4aZrjDiwzNao+3+TNN9LG24g+S8Z5e086ih4YZ7vCmMo/E/zoJQeA/9vdu6ZDbFTzwmv5g11l+uTnw1y8OeODN27ddQpL4933dSjoeJWtDMVNBwwwe28+B5xy/0BhQvgU7s0ChYQZP3n9PpPp93FR3pzjT1yPPRcIqCj00zHJmq33cTL0gfmrqkJdaJRWFHhpmrPcXrCMIfexnEK4AAAAASUVORK5CYII=) 0 0 no-repeat',
      position: 'absolute',
      right: '8px',
      top: '50%',
      marginTop: '-7px',
      width: '14px',
      height: '14px',
      overflow: 'hidden',
      cursor: 'pointer'
    });

    btn.addEventListener('click', function(e) {
      e.preventDefault();
      panel.parentNode.removeChild(panel);
      if (onClose) {
        onClose(id);
      }
    }, false);

    mono.on(btn, 'mouseenter', function(){
      this.style.backgroundPosition = '-15px 0';
    });

    mono.on(btn, 'mouseleave', function(){
      this.style.backgroundPosition = '0 0';
    });

    panel.appendChild(content);
    panel.appendChild(btn);
    document.body.appendChild(panel);
  },

  updatePopup: function() {
    var id = 'savefrom_updatePanel';
    mono.sendMessage({action: 'popupShow', id: id}, function() {
      SaveFrom_Utils.showNotification('Please update me!', id, function(id) {
        mono.sendMessage({action: 'popupClose', id: id});
      });
    });
  },
  /*@if isVkOnly=0<*/

  bridge: function(details) {
    "use strict";
    details.args = details.args || [];
    if (details.timeout === undefined) {
      details.timeout = 300;
    }
    var scriptId = 'sf-bridge-' + parseInt(Math.random() * 1000) + '-' + Date.now();

    var listener = function (e) {
      window.removeEventListener('sf-bridge-' + scriptId, listener);
      var data;
      if (!e.detail) {
        data = undefined;
      } else {
        data = JSON.parse(e.detail);
      }
      details.cb(data);
    };

    window.addEventListener('sf-bridge-' + scriptId, listener);

    var wrapFunc = '(' + (function(func) {
        /* fix */
        var scriptId = "{scriptId}";
        var timeout = parseInt("{timeout}");

        var node = document.getElementById(scriptId);
        if (node) {
          node.parentNode.removeChild(node);
        }

        var fired = false;
        var done = function(data) {
          if (fired) {
            return;
          }
          fired = true;

          var event = new CustomEvent('sf-bridge-' + scriptId, {detail: JSON.stringify(data)});
          window.dispatchEvent(event);
        };

        timeout && setTimeout(function() {
          done();
        }, timeout);

        var args = [/*args*/];
        args.push(done);

        func.apply(null, args);
    }).toString() + ')(' + details.func.toString() + ');';

    wrapFunc = wrapFunc.replace('{scriptId}', scriptId);
    wrapFunc = wrapFunc.replace('{timeout}', details.timeout);
    wrapFunc = wrapFunc.replace('[/*args*/]', JSON.stringify(details.args));

    /*@if isVkOnly=0>*/
    if (mono.isSafari) {
      var safariFix = function() {
        if (typeof CustomEvent === 'undefined') {
          CustomEvent = function (event, params) {
            params = params || { bubbles: false, cancelable: false };
            var evt = document.createEvent('CustomEvent');
            evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
            return evt;
          };
          CustomEvent.prototype = window.Event.prototype;
        }
      };
      wrapFunc = wrapFunc.replace('/* fix */', '('+safariFix.toString()+')();');
    } else
    if (mono.isOpera) {
      wrapFunc = wrapFunc.replace('/* fix */', 'var CustomEvent = window.CustomEvent;');
    }
    /*@if isVkOnly=0<*/

    var script = mono.create('script', {
      id: scriptId,
      text: wrapFunc
    });
    document.body.appendChild(script);
  }
};
/*@if isVkOnly=0>*/
SaveFrom_Utils.tutorial = {
  getYtSlideList: function(type) {
    "use strict";
    var logoImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAGxUlEQVRo3tWaeVATVxzHd+UMggqKknDKEbSd6bQz9Zh2OmM7vWbaOq21nf7TP+uBMoxXrW1tV6ttqVfrxRG5DUoUKGAQuQ8RRVARlYrFi8NCgwIqIIS8vu9m46QUMFkSoMx8JpnN+32/31+S3fc2D4YQwvyfMWnQaSLXlpNgItChPxacaXRMFKd1QI7HTGhC++lr1NNiDRT3BT0p6Q8iAh2CmWq0DZQNyPXoglXQhLbBB54WayDvYUB3QXcA4ekJ0H8CA8EKCuHh30XzKe0X0MoV0IS2wQeeFmsgq232o5zO2SSni6dD/27Jd5b0yQko1QaJoqhXoE++E5rQhsdJ6gVPizVw/K5vZ6bGh2S18/ANFPbItxT2BBFQ3BcoivzHT9nCv1FUGx7wgqfFGki+4XU/7Z4XSf+Lp0P/tQrk8h4FElDYK47cr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7P8fXbBFNZTBXEAFzNbhkWGQYBfA0Pji5weGK1+egNknP9xhqLm9GkMNCzYbJz7cyXBW2pZBlkMYp6tAFoLwkx/vcKZ3rMHy+tcnBu+z3Qyf/nzH6+3Pf34weJ3tYngFVE9SmF/+/Jgh9tI0hr///2GVB4nHXJoKVkdWhG56dY6h/OZyrHIVt1aA5SlKLb0PtjHMfrwfRWzOk/0MPfe3Uicp5lxfwLDv7VUwG0RnX1tAdDr/RkjRr39/GMIuTGLY8eYiQ/jFyWA+EeAbKJ3vBDLcaJCHdjFB67tvVDYYZF4lyPBz0NpoFxUsAenfDcR2IHMBAgwACpV16b/HM30AAAAASUVORK5CYII=';

    var language = mono.global.language;

    var langPrepare = (function(langCode, nodeList) {
      var imgList;
      var linkList;
      var img, link, node, i, n;

      for (n = 0; node = nodeList[n]; n++) {
        imgList = node.querySelectorAll('img[src="#logo"]');
        for (i = 0; img = imgList[i]; i++) {
          img.src = logoImg;
          img.width = 16;
          img.style.verticalAlign = 'baseline';
        }

        imgList = node.querySelectorAll('img[src="#arrow"]');
        for (i = 0; img = imgList[i]; i++) {
          img.src = arrowImg;
          img.width = 16;
          img.style.verticalAlign = 'baseline';
        }

        linkList = node.querySelectorAll('a[href="#support"]');
        for (i = 0; link = linkList[i]; i++) {
          link.href = 'http://savefrom.userecho.com';
          link.target = '_blank';
          link.style.color = '#1795b9';
        }

        linkList = node.querySelectorAll('a[href="#vk"]');
        for (i = 0; link = linkList[i]; i++) {
          link.href = 'https://vk.com/savefrom_net';
          link.target = '_blank';
          link.style.color = '#1795b9';
        }

        linkList = node.querySelectorAll('a[href="#fb"]');
        for (i = 0; link = linkList[i]; i++) {
          link.href = 'https://www.facebook.com/SaveFromNetEn';
          link.target = '_blank';
          link.style.color = '#1795b9';
        }
      }
    }).bind(null, language.lang);

    var styleFix = {
      en: {
        tutorialS1Main: {
          margin: '0px 17px'
        }
      },
      ru: {
        tutorialS2Main: {
          margin: '0px 18px',
          width: 'initial'
        },
        tutorialS4Main: {
          top: '228px',
          margin: '0px 16px',
          width: 'initial'
        },
        tutorialS5Main: {
          margin: '0 10px'
        }
      },
      de: {
        tutorialS1Arrow: {
          right: '28px'
        },
        tutorialS3Main: {
          margin: 0,
          width: 'initial',
          top: '228px'
        },
        tutorialS4Main: {
          margin: 0,
          width: 'initial',
          top: '228px'
        }
      },
      id: {
        tutorialS1Arrow: {
          width: '175px'
        },
        tutorialS3Main: {
          margin: '0 6px',
          top: '228px',
          width: 'initial'
        }
      },
      es: {
        tutorialS1Arrow: {
          width: '160px'
        },
        tutorialS3Main: {
          top: '228px'
        },
        tutorialS4Main: {
          margin: '0 14px',
          width: 'initial',
          top: '228px'
        }
      },
      tr: {
        tutorialS1Title: {
          fontSize: '32px',
          marginTop: '40px'
        },
        tutorialS1Main: {
          marginTop: '-14px'
        },
        tutorialS1Arrow: {
          width: '187px'
        },
        tutorialS3Main: {
          top: '228px'
        },
        tutorialS4Main: {
          top: '228px'
        },
        tutorialS5Title: {
          fontSize: '32px',
          marginTop: '40px'
        }
      },
      fr: {
        tutorialS3Main: {
          top: '228px'
        },
        tutorialS4Main: {
          top: '228px',
          margin: 0,
          width: 'initial'
        },
        tutorialS5Main: {
          margin: '0 18px'
        }
      },
      uk: {
        tutorialS1Arrow: {
          width: '175px'
        },
        tutorialS5Main: {
          margin: '0 18px'
        }
      }
    };

    styleFix = styleFix[mono.global.language.lang] || styleFix.en;

    var slideList = [
      mono.create(document.createDocumentFragment(), {
        append: [
          mono.create('span', {
            style: {
              display: 'block',
              color: '#a4a1a1',
              fontSize: '20px',
              textAlign: 'center',
              margin: '28px 0'
            },
            append: [
              mono.create('img', {
                style: {
                  verticalAlign: 'middle',
                  marginRight: '18px'
                },
                src: logoImg,
                width: 44
              }),
              language.extName
            ]
          }),
          mono.create('span', {
            style: mono.extend({
              display: 'block',
              color: '#84bd07',
              fontSize: '40px',
              textAlign: 'center',
              marginBottom: '28px'
            }, styleFix.tutorialS1Title),
            text: language.tutorialS1Title
          }),
          mono.create('span', {
            style: mono.extend({
              display: 'block',
              color: '#666',
              fontSize: '25px',
              textAlign: 'center',
              margin: '0 22px'
            }, styleFix.tutorialS1Main),
            append: mono.parseTemplate(language.tutorialS1Main)
          }),
          mono.create('span', {
            style: mono.extend({
              position: 'absolute',
              display: 'block',
              textAlign: 'center',
              width: '145px',
              fontSize: '15px',
              color: '#666',
              right: '48px',
              bottom: '10px'
            }, styleFix.tutorialS1Arrow),
            append: mono.parseTemplate(language.tutorialS1Arrow)
          }),
          mono.create('img', {
            src: type !== 'black' ? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAjCAYAAAD48HgdAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsSAAALEgHS3X78AAACBklEQVRYw83YTYhNYRgH8N/1MY2PNBtWGrGxkFFTrERZYGGjlNSrZzs2FmZpEvlaiJUasnqbk5TNiAVWLBSaMEgUpiwokQULX2Ms7pm6GaZJzT3nX6dz73ufOr+e99z3fDSKnDdjPToxF+P4hs/4iHd4jfcp4qc2ZV65/4IP+FXiOrEE3diGZWgUOb/FC9zDaIr4MluwxkwLi5yXoqfcNmBxibyGuyniayWwv0CXYwt2owNXMJgixiuF/YHsxX5sxECKuFQLWIlrYA0OYCmOpIiRymEtwHnYgcBVDKWIH5XDWoArcR6vUsS+2sBKXCdOYRH6U8SnWsBK3AIcQxf6/mdaZxt4rsj55Ezr57TRdhC9Rc57Z1I861PZmiLnbgwjpYhn09W2s2NSxBucwEA7jzvjFDlfLnLeOl1NWzvWkrPoryPsDt4VOe+qFay84RzCP68IVXUMbqO7yHlFrWBl14axp1awMhexvch5bq1gKeIhFmLKdFbdMXiq+RxRO9hjrK0jbBSr6wh7ghVFzvNbB9t6dzGZIufDWIXTKWK0yPmW5rLRhUMYqwrWofk034Mz6NX8E/RhBJsqgZW4XtzXfCUxme9YlyKeV7nyP9C8XrbmQop4TvUn/3FMlJ8ncHryh6pX/pe4WX59lCLGagErM1juj7YO1gF2Q/Pl4PWqIVNS5Lzzz7HfNv+X/HfgpHUAAAAASUVORK5CYII=' : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAjCAYAAAD48HgdAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAdNJREFUeNrM2EsoRFEcx/EZw4QkCiuRRylCTbFVFljIQlMeJVuTHSspETtZKDWkpJSVBbFSFhYKaTwXiLGjRBaUt/E9+t+axtDVjHvPrz7NLGamX+fce+ac6wyFQjUOh6MKyXDhHc+4xy2uEMQ13hwWJVFeH3CDDymnSqYjD/XIgROXOMEW9uV7/xInI2b2s9moENVIk5Ir2MSTXcUik4tatMCNJfjlUog9qlgceDCLM7TG4zdjGbFvo48y9Mi0D2HHjqn87YZqRCeWMYdXHYoZKcAUzuH765cT/nEpukCTrH0zyNRlxIykYAQZ6DI7rVYUMzKJO/TZPZWR6YcHHVauY2blIYBSK9cxs/GiGe26TKWRBSShTrdiKhPo1bHYhuzzvLoVe5O/Kp9uxVTWZSOar1sxNWqLaNOtmMo8GmQ7r1WxXaRGm067i6kcyTlCu2IHKNexmDoGluhY7FCusaRoB16rM4hCjMmIqSNflmwmB752vxZvewxu7OIdo1jDOJ6xAZcd2x4jatO4HbGGvaASx3ZeYwH5vwzPtCpl9Z4/WopxKodlVaRITle235VnWJX3e0YpXZYLv7wO23V8+ynqWVxQpvFRpxFTz9W6w0upfAowAMpXzPWPJzeOAAAAAElFTkSuQmCC',
            style: {
              position: 'absolute',
              right: '10px',
              bottom: '2px'
            },
            width: 38,
            height: 35
          })
        ]
      }),

      mono.create(document.createDocumentFragment(), {
        append: [
          mono.create('span', {
            style: {
              display: 'inline-block',
              marginTop: '37px',
              width: '430px',
              position: 'relative'
            },
            append: [
              mono.create('img', {
                src: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA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HgguAP3uRz/6kami9HIleoFIDbKsrCwTXHqxRm1CrKurO2lVXv+4evXqN62nFLLWEMr+X4ABAM4V9UQvZ19JAAAAAElFTkSuQmCC',
                width: 430,
                height: 219
              }),
              mono.create('span', {
                text: mono.global.language.download,
                style: {
                  position: 'absolute',
                  top: '184px',
                  left: '168px',
                  fontSize: '14px',
                  color: '#fff',
                  width: '84px'
                }
              }),
              mono.create('span', {
                text: language.tutorialS2Main,
                style: mono.extend({
                  position: 'absolute',
                  display: 'block',
                  top: '238px',
                  left: '0px',
                  fontSize: '18px',
                  color: '#333',
                  margin: '0 -22px',
                  width: '474px'
                }, styleFix.tutorialS2Main)
              })
            ]
          })
        ]
      }),

      mono.create(document.createDocumentFragment(), {
        append: [
          mono.create('span', {
            style: {
              display: 'inline-block',
              marginTop: '37px',
              width: '430px',
              position: 'relative'
            },
            append: [
              mono.create('img', {
                src: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAa4AAADRCAYAAACU9lY6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAJ0dJREFUeNrsnQt0VPW9738T8n6RB5AHgUggQCgKWsCDRaW2S1NQPFatD9R23esp9mpXq3XVnrV6dV31tudy21qfp1iXPa0e9SjWqyjCuccDVbS9EBAQBQIJhkd4JRPIi7zIvvv73/Of2TPZk8wkM8lM8v2w9mLPf//3f+/5z+T/nd/v//v/tsvtdouH68ztfnNbaG6ZQgghhIw8rea2zdx+Y27voiDBc+Bxc3vH3L5O0SKEEBJDZHq0aZ1Hq8RlWlzXegoIIYSQWGcFLK4H2A+EEELihPshXAvYD4QQQuKEBRCuLPYDIYSQOCErgX1ACCEknqBwEUIIoXARQgghFC5CCCGEwkUIISTeSBwtb6S3pUW6Dx6Qrh3b1WujtVW6D1T3qddjluHYYBg3Y6YkZPknFknIypLEGeVWZxYWSeLMmZJUPpPfLEIIiRLInGHE+5s4++QT0v5vr8XM/YwzBSznf62WZAoYIYRQuAJxP/6onF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0sDBGGpZXtiW5Ef2ze63/vsMAQeIL2EQQz4sEZhBASbyBQQaMG3DIrcABcNMWlIvPgOoMVhvkfzPkcOGEot6H9XGWVFItjOQIVwrW4vj7HCtBAoMjELF95NIFINprC8s4O6/5x3StnB7939M2Wav/3X17okmNNhlrnBQsOZfgxABHTbdqjJcMlatnhCRkLDJQd/ujhw+ykEaRk6tRR8160+w1RgMlxbHKo6EjxX2sWbnZ4WlyEEBKDYP3YX/YZ3sAGWIKwwJI5alO4CCEkFkEo+bL5oy/rRTjrwYKRwK8HIYSQeILCRQghhMJFyFjBMBjbFM+0tbaqAJpu21MqmtxuaWluDnpOZ0eH9zjOdUoqPhiCtYVr4Zje3A0NMdF3TveLe0X/RftviHNchAwBLKxPSUlhR8Tzr/eEBDXYTiosDPkz1wN2tKMWIQTn2tulwLy3JM+TNyBcKM/Kzo65vhzMPXUO4knVFC5ChoDOu4msMC6Xix0Sh+Czg3g5iQEEDVYZSE1NVcfPnjljDZ6JiWq/sLhYzpuCgroQFpTn5uWpOo0e66i3t1edP2HSJLXfcOqU91mE43Nygg74uKf8CROUaOlr2gXWfn8ZmZnqurAIA+8lxbw2rtlhHkMZ7gHt4h5wPuriPvC//f3ifnEe6qMu+gnnoT0AEUU52kRdiCzawDVxTP99OL1HWFo499y5c2F/ZlzHRQghJL6sZHYBIYQQChchhBBC4SKEEEIoXIQQQihchBBCCIWLEEIIoXARQgihcBFCCCFRF64WdgMhhJA4oRXCVcV+IIQQEidsg3A9wX4ghBASJzwB4Vpnbv+TfUEIISTGgVat08EZPze3681tk7m1sW8IIYTECG0ebVrh0Sr5/wIMAFbXbMLxu67tAAAAAElFTkSuQmCC',
                width: 430,
                height: 209
              }),
              mono.create('span', {
                text: language.tutorialS3History,
                style: {
                  position: 'absolute',
                  top: '143px',
                  left: '55px',
                  fontSize: '14px',
                  color: '#fff'
                }
              }),
              mono.create('span', {
                append: mono.parseTemplate(language.tutorialS3Main),
                style: mono.extend({
                  position: 'absolute',
                  display: 'block',
                  top: '238px',
                  left: '0px',
                  fontSize: '18px',
                  color: '#333',
                  margin: '0 -22px',
                  width: '474px'
                }, styleFix.tutorialS3Main)
              })
            ]
          })
        ]
      }),

      mono.create(document.createDocumentFragment(), {
        append: [
          mono.create('span', {
            style: {
              display: 'inline-block',
              marginTop: '37px',
              width: '430px',
              position: 'relative'
            },
            append: [
              mono.create('img', {
                src: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAa4AAADRCAYAAACU9lY6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpCMzdBMTc3MDJDM0NFNTExOUVBNEUxMTFGMUJDRTg1QyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCMEU3MDY3MzQwMjAxMUU1QkNGMEQyMjZDOD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J9P5CzWw9NowJkcF0JM4xwW/ysvLzSzwjzzyiBQVFckHH3zgfU3DSVtWer3XZ599JhkZGZKdnW2u4wIAggt9RmeJ1+u5xo0bJ99++62575ZOpqstMh2M8dJLL8mkSZPYUQB6Vbe7CvUW73oDQr1JIOc2QuSvGfe9c3Rkobam+vXrJ9OmTTMtL72B5NatW6knaFZPIiIibNuu1hWduFlb9tQV6kqPBJengiF06MFCuwqV3tTvtddek5EjR5prtS6Uhhb1JHTriZ13QNZjime7CK26oj/1Dup9Hlzcjj106XerB6R7771XqCfore+WukJd6Ui3h8Pr7TAQmuz8bunyoZ5wTIFdxwGu4wIABBWCCwBAcAEAQHABAEBwAQAILgAACC4AAAguAADBBQAAwQUAAMEFACC4AAAguAAAILgAAAQXAAAEFwAABBcAgOACAIDgAgCA4AIAEFwAABBcAAAQXAAAggsAAIILAACCCwBAcAEAQHABAEBwAQAILgAACC4AAAguAADBBQAAwQUAAMEFACC4AAAguAAAILgAAAQXAAAEFwAABBcAgOACAIDgAgCA4AIAEFwAABBcAAAQXAAAggsAAIILAACCCwBAcAEAQHABAEBwAQAILgAACC4AAAguAADB1YkNhJN9IVs5bPxuw8LC2KHUE44pFzm7jgPdriExMTF8GyEqNjY2ILeFwBIXFxew9Q6heUzpdnClpqZKfHw8f1GH2F9F+p2mpKTYtk3qSWjWk4SEBElOTrZ1u1rvdLvUldA7puhxwJbtlZWVuditAIBgQWcyAIDgAgCA4AIAwB1cDnYDACBIVGlw5bMfAABBIk+Dayn7AQAQJJZqcOVYywvsCwBAgNOsyvEMzlhgLVOsJddaqtk3AIAAUe3OpsnurJL/F2AA9as8iULjx2oAAAAASUVORK5CYII=',
                width: 430,
                height: 209
              }),
              mono.create('span', {
                append: mono.parseTemplate(language.tutorialS4Main),
                style: mono.extend({
                  position: 'absolute',
                  display: 'block',
                  top: '238px',
                  left: '0px',
                  fontSize: '18px',
                  color: '#333',
                  margin: '0 -22px',
                  width: '474px'
                }, styleFix.tutorialS4Main)
              })
            ]
          })
        ]
      }),

      mono.create(document.createDocumentFragment(), {
        append: [
          mono.create('span', {
            style: {
              display: 'inline-block',
              width: '430px',
              position: 'relative'
            },
            append: [
              mono.create('span', {
                style: mono.extend({
                  display: 'block',
                  color: '#84bd07',
                  fontSize: '40px',
                  margin: '67px 0 32px 0'
                }, styleFix.tutorialS5Title),
                text: language.tutorialS5Title
              }),
              mono.create('span', {
                style: mono.extend({
                  display: 'block',
                  color: '#333',
                  fontSize: '18px'
                }, styleFix.tutorialS5Main),
                append: mono.parseTemplate(language.tutorialS5Main)
              }),
              mono.create('span', {
                style: {
                  display: 'block',
                  color: '#666',
                  fontSize: '14px',
                  marginTop: '50px'
                },
                append: [
                  mono.create('img', {
                    style: {
                      verticalAlign: 'middle',
                      marginRight: '11px'
                    },
                    src: logoImg,
                    width: 29
                  }),
                  language.extName
                ]
              })
            ]
          })
        ]
      })
    ];

    langPrepare(slideList);

    return slideList;
  },
  getImage: function(type, color) {
    "use strict";
    var img;
    color = color || '#A6A2A3';
    var head = '<?xml version="1.0" encoding="UTF-8"?>';
    if (type === 'arrowLeft') {
      img = '<svg height="512px" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><polygon fill="'+color+'" points="352,128.4 319.7,96 160,256 160,256 160,256 319.7,416 352,383.6 224.7,256 "/></svg>';
    } else
    if (type === 'arrowRight') {
      img = '<svg height="512px" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><polygon fill="'+color+'" points="160,128.4 192.3,96 352,256 352,256 352,256 192.3,416 160,383.6 287.3,256 "/></svg>'
    }
    //todo: chrome 47 fix
    var _btoa = mono.isTM ? window.btoa : btoa;
    return 'data:image/svg+xml;base64,' + _btoa(head + img);
  },
  setSlide: function(details, index) {
    "use strict";
    index = parseInt(index);
    if (index < 0) {
      index = 0;
    }
    var max = details.slideList.length - 1;
    if (index > max) {
      index = max;
    }

    if (index === 0) {
      details.leftBtn.classList.add('hide');
    } else {
      details.leftBtn.classList.remove('hide');
    }

    if (index === max) {
      details.rightBtn.classList.add('hide');
    } else {
      details.rightBtn.classList.remove('hide');
    }

    var oldDot = details.dotContainer.querySelector('.sf-dot.active');
    var dot = details.dotContainer.querySelector('.sf-dot[data-index="' + index + '"]');

    oldDot && oldDot.classList.remove('active');
    dot.classList.add('active');

    var posLeft = index * details.slide.width;
    details.slider.firstChild.style.marginLeft = (posLeft * -1) + 'px';

    details.index = index;

    if (details.viewSlideList.indexOf(index) === -1) {
      details.viewSlideList.push(index);
    }

    if (details.startTime === 0 && index > 0) {
      details.startTime = Date.now();
    }
  },
  switchSlide: function(details, direct) {
    "use strict";
    var newIndex = details.index;
    if (direct) {
      newIndex++;
    } else {
      newIndex--;
    }

    this.setSlide(details, newIndex);
  },
  onResize: function(details) {
    "use strict";
    var height = window.innerHeight;
    details.box.style.paddingTop = parseInt((height - details.height - details.padding * 2) / 2) + 'px';
    details.box.style.height = height + 'px';
  },
  getLiveTime: function(startTime) {
    "use strict";
    var time = Date.now() - startTime;
    time = parseInt(time / 1000);
    var liveTime = 0;
    if (time < 11) {
      liveTime = time;
    } else
    if (time < 31) {
      liveTime = 15;
    } else
    if (time < 61) {
      liveTime = 30;
    } else
    if (time < 121) {
      liveTime = 60;
    } else
    if (time < 181) {
      liveTime = 90;
    } else {
      liveTime = 180;
    }
    return liveTime;
  },
  sendStat: function(details) {
    "use strict";
    if (!details.trackId) {
      return;
    }
    var viewSlideList = details.viewSlideList;
    viewSlideList.sort();
    var slideList = viewSlideList.join(',');
    mono.sendMessage({action: 'trackEvent', category: 'tutorial', event: 'slides' + details.trackId, label: slideList, params: {tid: 'UA-7055055-11'}});

    if (details.startTime > 0) {
      var liveTime = this.getLiveTime(details.startTime);
      if (liveTime > 0) {
        mono.sendMessage({action: 'trackEvent', category: 'tutorial', event: 'time' + details.trackId, label: liveTime, params: {tid: 'UA-7055055-11'}});
      }
    }
  },
  onClose: function(details) {
    "use strict";
    details.container.removeEventListener('click', details.onBodyClick);
    window.removeEventListener('resize', details._onResize);

    if (details.withOpacity) {
      details.box.style.opacity = 0;
      setTimeout(function() {
        details.box.parentNode.removeChild(details.box);
      }, 500);
    } else {
      details.box.parentNode.removeChild(details.box);
    }

    details.checkExists(function(isExists) {
      !isExists && this.sendStat(details);

      details.onClose && details.onClose();
    }.bind(this));
  },
  getContent: function(details) {
    "use strict";
    var fullWidth = 0;
    var container = mono.create('div', {
      class: 'sf-slider-conteiner'
    });
    details.slideList.forEach(function(data, index) {
      var slide = mono.create('div', {
        data: {
          index: index
        },
        style: {
          display: 'inline-block',
          height: details.slide.height + 'px',
          width: details.slide.width + 'px',
          position: 'relative',
          verticalAlign: 'top',
          textAlign: 'center'
        },
        append: [
          data
        ]
      });
      fullWidth += details.slide.width;
      container.appendChild(slide);
    });

    container.style.width = fullWidth + 'px';
    return [container];
  },
  getDotList: function(details) {
    "use strict";
    var _this = this;
    var nodeList = [];
    var count = details.slideList.length;
    for (var i = 0; i < count; i++) {
      nodeList.push(mono.create('a', {
        class: 'sf-dot',
        data: {
          index: i
        },
        href: '#',
        on: ['click', function(e) {
          e.preventDefault();
          _this.setSlide(details, this.dataset.index);
        }],
        append: mono.create('i')
      }));
    }
    return nodeList;
  },
  onBodyClick: function(details) {
    "use strict";
    details.bodyClickCount++;
    if (details.bodyClickCount < 2) {
      return;
    }

    details._onClose();
  },
  show: function(_details) {
    "use strict";
    var _this = SaveFrom_Utils.tutorial;

    var details = {
      container: document.body,
      width: 564,
      height: 398,
      padding: 8,
      slide: {},
      viewSlideList: [],
      startTime: 0,
      margin: 0
    };

    for (var key in _details) {
      details[key] = _details[key];
    }

    details.width -= details.padding * 2;
    details.height -= details.padding * 2;

    details.slide.width = details.width;
    details.slide.height = details.height - 34;

    details._onResize = mono.debounce((details.onResize || _this.onResize).bind(_this, details), 250);
    details._onClose = _this.onClose.bind(_this, details);
    details.setSlide = _this.setSlide.bind(_this, details);
    details.onBodyClick = _this.onBodyClick.bind(_this, details);
    details.bodyClickCount = 0;

    var boxClassName = details.boxClassName || 'sf-tutorial-box';

    details.box = mono.create('div', {
      class: boxClassName,
      style: mono.extend({
        position: 'fixed',
        width: '100%',
        textAlign: 'center',
        display: 'block',
        zIndex: 9999999,
        backgroundColor: 'rgba(0, 0, 0, 0.5)',
        top: 0
      }, details.boxStyle),
      append: [
        mono.create('div', {
          class: 'sf-tutorial-container',
          style: mono.extend({
            display: 'inline-block',
            width: details.width + 'px',
            height: details.height + 'px',
            backgroundColor: '#eee',
            fontFamily: 'Arial',
            lineHeight: 'normal',
            borderRadius: '6px',
            textAlign: 'left',
            position: 'relative',
            padding: details.padding + 'px',
            boxShadow: '0 0 25px rgba(0, 0, 0, 0.5)'
          }, details.containerStyle),
          on: ['click', function(e) {
            e.stopPropagation();
          }],
          append: [
            details.slider = mono.create('div', {
              class: 'sf-slider',
              style: mono.extend({
                backgroundColor: '#fff',
                borderRadius: '6px',
                height: details.slide.height + 'px',
                width: details.slide.width + 'px',
                overflow: 'hidden'
              }, details.slideStyle),
              append: _this.getContent(details)
            }),
            mono.create('div', {
              class: 'sf-contorls',
              style: {
                position: 'relative'
              },
              append: [
                details.leftBtn = mono.create('a', {
                  class: ['sf-btn', 'left'],
                  href: '#',
                  style: mono.extend({
                    position: 'absolute',
                    top: '8px',
                    left: 0,
                    width: '16px',
                    height: '27px'
                  }, details.leftBtnStyle),
                  on: ['click', function(e) {
                    e.preventDefault();
                    _this.switchSlide.call(_this, details, 0);
                  }]
                }),
                details.dotContainer = mono.create('div', {
                  class: ['sf-dots'],
                  append: _this.getDotList(details)
                }),
                details.rightBtn = mono.create('a', {
                  class: ['sf-btn', 'right'],
                  href: '#',
                  style: mono.extend({
                    position: 'absolute',
                    top: '8px',
                    right: 0,
                    width: '16px',
                    height: '27px'
                  }, details.rightBtnStyle),
                  on: ['click', function(e) {
                    e.preventDefault();
                    _this.switchSlide.call(_this, details, 1);
                  }]
                })
              ]
            }),
            mono.create('a', {
              class: ['sf-btn', 'close'],
              text: 'x',
              href: '#',
              style: mono.extend({
                display: 'block',
                position: 'absolute',
                borderRadius: '9px',
                right: '10px',
                top: '10px',
                backgroundColor: '#ccc',
                width: '18px',
                height: '18px',
                textAlign: 'center',
                textDecoration: 'none',
                color: '#fff',
                fontWeight: 'bold',
                fontSize: '14px',
                lineHeight: '16px'
              }, details.closeBtnStyle),
              on: ['click', function(e) {
                e.preventDefault();
                details._onClose();
              }]
            })
          ]
        }),
        mono.create('style', {
          text: mono.styleObjToText(mono.extend({
            '': {
              WebkitUserSelect: 'none',
              MozUserSelect: 'none',
              OUserSelect: 'none',
              userSelect: 'none'
            },
            '.sf-slider .sf-slider-conteiner': {
              transition: 'margin-left 0.5s'
            },
            '.sf-contorls .sf-btn.left': {
              backgroundImage: 'url(' + this.getImage('arrowLeft', details.arrowColor) + ')',
              backgroundPosition: 'center',
              backgroundRepeat: 'no-repeat',
              backgroundSize: '44px'
            },
            '.sf-contorls .sf-btn.left.hide': {
              display: 'none'
            },
            '.sf-contorls .sf-btn.right': {
              backgroundImage: 'url(' + this.getImage('arrowRight', details.arrowColor) + ')',
              backgroundPosition: 'center',
              backgroundRepeat: 'no-repeat',
              backgroundSize: '44px'
            },
            '.sf-contorls .sf-btn.right.hide': {
              display: 'none'
            },
            '.sf-contorls .sf-btn.left:hover': {
              backgroundImage: 'url(' + this.getImage('arrowLeft', details.arrowColorActive || '#00b75a') + ')'
            },
            '.sf-contorls .sf-btn.right:hover': {
              backgroundImage: 'url(' + this.getImage('arrowRight', details.arrowColorActive || '#00b75a') + ')'
            },
            '.sf-dots': {
              textAlign: 'center',
              paddingTop: '5px'
            },
            '.sf-dot': {
              display: 'inline-block',
              padding: '8px'
            },
            '.sf-dot i': {
              display: 'inline-block',
              width: '8px',
              height: '8px',
              borderRadius: '4px',
              backgroundColor: '#a4a1a1'
            },
            '.sf-dot.active i': {
              backgroundColor: '#00b75a'
            }
          }, details.cssStyle), '.' + boxClassName + ' .sf-tutorial-container')
        })
      ]
    });

    details.setSlide(0);
    (details.onResize || _this.onResize).call(_this, details);

    setTimeout(function() {
      if (details.withOpacity) {
        details.box.style.transition = 'opacity 0.5s';
        details.box.style.opacity = 0;
        details.container.appendChild(details.box);
        setTimeout(function() {
          details.box.style.opacity = 1;
        }, 50);
      } else {
        details.container.appendChild(details.box);
      }
      details.onShow && details.onShow();
    }, details.withDelay);

    window.addEventListener('resize', details._onResize);

    details.container.addEventListener('click', details.onBodyClick);
  }
};

SaveFrom_Utils.tutorialTooltip = {
  getTooltipEl: function(details) {
    "use strict";
    var language = mono.global.language;

    var zIndex = (function() {
      var zIndex = 1000;
      var top = document.getElementById('masthead-positioner');
      var styleList = top && window.getComputedStyle(top, null);
      if (styleList) {
        zIndex = parseInt(styleList.getPropertyValue('z-index')) + 1;
      }
      return zIndex;
    })();

    var box = mono.create('div', {
      class: 'sf-tooltip',
      on: ['mouseup', function(e) {
        e.stopPropagation();
      }],
      append: [
        mono.create('span', {
          style: {
            display: 'inline-block',
            border: '8px solid transparent',
            borderRight: '10px solid #4D4D4D',
            borderLeft: 0,
            width: 0,
            top: '8px',
            left: '0px',
            position: 'absolute'
          }
        }),
        mono.create('span', {
          style: {
            display: 'inline-block',
              backgroundColor: '#4D4D4D',
              marginLeft: '10px',
              padding: '10px 10px',
              maxWidth: '220px',
              lineHeight: '16px',
              fontSize: '14px',
              fontFamily: 'font-family: arial, sans-serif',
              color: '#fff'
          },
          append: [
            mono.create('p', {
              style: {
                margin: 0
              },
              append: mono.parseTemplate(language.tutorialTooltipText)
            }),
            mono.create('a', {
              class: 'sf-button',
              text: 'OK',
              style: {
                display: 'inline-block',
                textAlign: 'center',
                textDecoration: 'none',
                padding: '0 10px',
                cssFloat: 'right',

                marginTop: '5px',
                lineHeight: '20px',
                borderRadius: '3px',
                fontSize: '12px',
                color: '#fff',
                fontWeight: 'bolder',
                backgroundColor: '#167AC6'
              },
              on: ['click', (function(e) {
                e.preventDefault();
                details._onClose();
              }).bind(this)]
            }),
            mono.create('style', {
              text: mono.styleObjToText({
                '': {
                  position: 'absolute',
                  zIndex: zIndex + 2
                },
                '.sf-button:hover': {
                  backgroundColor: '#126db3 !important'
                },
                '.sf-button:active': {
                  opacity: 0.9
                }
              }, '.sf-tooltip')
            })
          ]
        })
      ]
    });

    return box;
  },
  onClose: function(details, isHide) {
    "use strict";
    if (details.fired) {
      return;
    }
    details.fired = true;

    if (details.tooltipEl.parentNode) {
      details.tooltipEl.parentNode.removeChild(details.tooltipEl);
    }

    window.removeEventListener('resize', details._onResize);
    details.target.removeEventListener('mouseup', details._onClose);

    if (isHide) {
      return;
    }

    if (details.startTime > 0) {
      var liveTime = SaveFrom_Utils.tutorial.getLiveTime(details.startTime);
      if (liveTime > 0) {
        mono.sendMessage({action: 'trackEvent', category: 'tutorial', event: 'timeTooltip' + details.trackId, label: liveTime, params: {tid: 'UA-7055055-11'}});
      }
    }

    details.onClose && details.onClose();
  },
  onResize: function(details) {
    "use strict";
    var btn = details.target;
    if (!btn.offsetParent || !btn.parentNode) {
      return details._onClose(1);
    }

    var btnPos = SaveFrom_Utils.getPosition(btn, details.tooltipContainer);
    var top = btnPos.top + details.btnTopOffset;
    var left = btnPos.left + btnPos.width + details.btnLeftOffset;
    details.tooltipEl.style.top = top + 'px';
    details.tooltipEl.style.left = left + 'px';
  },
  insert: function(_details) {
    "use strict";
    var details = {
      btnTopOffset: -3,
      btnLeftOffset: 0,
      startTime: Date.now(),
      fired: false
    };
    for (var key in _details) {
      details[key] = _details[key];
    }

    if (details.target.dataset.sfHasTooltip === '1') {
      return;
    }
    details.target.dataset.sfHasTooltip = '1';

    details._onResize = mono.debounce(this.onResize.bind(this, details), 250);
    details._onClose = this.onClose.bind(this, details);

    details.tooltipEl = this.getTooltipEl(details);

    details.target.addEventListener('mouseup', details._onClose);

    details.target.addEventListener('sf-removed', function() {
      details._onClose(1);
    });

    window.addEventListener('resize', details._onResize);

    this.onResize.call(this, details);

    document.body.appendChild(details.tooltipEl);

    return details;
  }
};
/*@if isVkOnly=0<*/

SaveFrom_Utils.mutationWatcher = {
  getMutationObserver: function() {
    "use strict";
    var MutationObserverCtor = null;
    if (typeof MutationObserver !== 'undefined') {
      MutationObserverCtor = MutationObserver;
    } else
    if (typeof WebKitMutationObserver !== 'undefined') {
      MutationObserverCtor = WebKitMutationObserver;
    } else
    if (typeof MozMutationObserver !== 'undefined') {
      MutationObserverCtor = MozMutationObserver;
    } else
    if (typeof JsMutationObserver !== 'undefined') {
      MutationObserverCtor = JsMutationObserver;
    }
    return MutationObserverCtor;
  },
  isAvailable: function() {
    "use strict";
    return !!this.getMutationObserver();
  },
  disconnect: function(details) {
    "use strict";
    details.observer.disconnect();
  },
  connect: function(details) {
    "use strict";
    details.observer.observe(details.target, details.config);
  },
  joinMutations: function(mutations) {
    "use strict";
    var jMutations = [];
    var targetList = [];

    var jObj = {}, obj, hasNodes;
    var mutation, i, node, tIndex;
    while(mutation =  mutations.shift()) {
      tIndex = targetList.indexOf(mutation.target);

      if (tIndex === -1) {
        tIndex = targetList.push(mutation.target) - 1;
        jObj[tIndex] = {
          target: mutation.target,
          added: [],
          removed: []
        };
      }

      obj = jObj[tIndex];
      hasNodes = undefined;

      for (i = 0; node = mutation.addedNodes[i]; i++) {
        if (node.nodeType !== 1) {
          continue;
        }

        obj.added.push(node);
        hasNodes = true;
      }

      for (i = 0; node = mutation.removedNodes[i]; i++) {
        if (node.nodeType !== 1) {
          continue;
        }

        obj.removed.push(node);
        hasNodes = true;
      }

      if (hasNodes !== undefined && obj.inList === undefined) {
        obj.inList = true;
        jMutations.push(obj);
      }
    }

    return jMutations;
  },
  isMatched: null,
  prepareMatched: function() {
    "use strict";
    if (this.isMatched) {
      return;
    }

    var el = document.createElement('div');

    if (typeof el.matches === 'function') {
      this.isMatched = function(node, selector){
        return node.matches(selector);
      };
    } else
    if (typeof el.matchesSelector === 'function') {
      this.isMatched = function(node, selector){
        return node.matchesSelector(selector);
      };
    } else
    if (typeof el.webkitMatchesSelector === 'function') {
      this.isMatched = function(node, selector){
        return node.webkitMatchesSelector(selector);
      };
    } else
    if (typeof el.mozMatchesSelector === 'function') {
      this.isMatched = function(node, selector){
        return node.mozMatchesSelector(selector);
      };
    } else
    if (typeof el.oMatchesSelector === 'function') {
      this.isMatched = function(node, selector){
        return node.oMatchesSelector(selector);
      };
    } else
    if (typeof el.msMatchesSelector === 'function') {
      this.isMatched = function(node, selector){
        return node.msMatchesSelector(selector);
      };
    }

    el = null;
  },
  match: function(details, summaryList, mutation) {
    "use strict";
    var _this = this;
    var node, i, query, n;
    var queries = details.queries;
    var hasChanges = false;
    ['added', 'removed'].forEach(function(type) {
      var nodeList = mutation[type];
      for (n=0; node = nodeList[n]; n++) {
        for(i = 0; query = queries[i]; i++) {
          if (query.is !== undefined && query.is !== type) {
            continue;
          }
          var nodeArr = summaryList[i][type];
          if (_this.isMatched(node, query.css) === true) {
            nodeArr.push(node);
          } else {
            nodeArr.push.apply(nodeArr, node.querySelectorAll(query.css));
          }

          if (hasChanges === false) {
            hasChanges = nodeArr[0] !== undefined;
          }
        }
      }
    });

    return hasChanges;
  },
  filterTarget: function(queries, node) {
    "use strict";
    var i, query;
    for(i = 0; query = queries[i]; i++) {
      if (this.isMatched(node, query.css) === true) {
        return true;
      }
    }
    return false;
  },
  run: function(_details) {
    "use strict";
    var _this = this;
    var details = {
      config: {
        childList: true,
        subtree: true
      },
      target: document.body,
      filterTarget: []
    };
    mono.extend(details, _details);

    details._disconnect = this.disconnect.bind(this, details);
    details._connect = this.connect.bind(this, details);
    details._match = this.match.bind(this, details);

    var _summaryList = [];
    for(var i = 0; i < details.queries.length; i++) {
      _summaryList.push({
        added: [],
        removed: []
      });
    }
    _summaryList = JSON.stringify(_summaryList);

    this.prepareMatched();

    var mObserver = this.getMutationObserver();
    details.observer = new mObserver(function (mutations) {
      // console.time('o');
      var jMutations = _this.joinMutations(mutations);
      if (jMutations.length === 0) {
        // console.timeEnd('o');
        return;
      }

      var hasChanges = false;
      var mutation;
      var summaryList = JSON.parse(_summaryList);
      while(mutation = jMutations.shift()) {
        // console.log('mutation', mutation);
        if (_this.filterTarget(details.filterTarget, mutation.target) === false) {
          if (details._match(summaryList, mutation) === true) {
            hasChanges = true;
          }
        }
      }

      hasChanges === true && details.callback(summaryList);
      // console.timeEnd('o');
    });

    details.start = function() {
      details._disconnect();
      details._connect();

      var hasChanges = false;
      var summaryList = JSON.parse(_summaryList);

      var mutation = {
        added: [details.target],
        removed: []
      };
      if (details._match(summaryList, mutation)) {
        hasChanges = true;
      }

      hasChanges === true && details.callback(summaryList);
    };

    details.stop = function() {
      details._disconnect();
    };

    details.start();

    return details;
  }
};

/**
 * @license
 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
 */
// @version 0.7.15
var WeakMap = (typeof WeakMap !== 'undefined') ? WeakMap : undefined;
if (typeof WeakMap === "undefined") {
  (function() {
    var defineProperty = Object.defineProperty;
    var counter = Date.now() % 1e9;
    WeakMap = function() {
      this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");
    };
    WeakMap.prototype = {
      set: function(key, value) {
        var entry = key[this.name];
        if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {
          value: [ key, value ],
          writable: true
        });
        return this;
      },
      get: function(key) {
        var entry;
        return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;
      },
      "delete": function(key) {
        var entry = key[this.name];
        if (!entry || entry[0] !== key) return false;
        entry[0] = entry[1] = undefined;
        return true;
      },
      has: function(key) {
        var entry = key[this.name];
        if (!entry) return false;
        return entry[0] === key;
      }
    };
  })();
}

var JsMutationObserver = (typeof JsMutationObserver !== 'undefined') ? JsMutationObserver : undefined;
(function() {
  if (typeof JsMutationObserver !== 'undefined') {
    return;
  }
  var registrationsTable = new WeakMap();
  var setImmediate;
  if (typeof navigator !== 'undefined' && /Trident|Edge/.test(navigator.userAgent)) {
    setImmediate = setTimeout;
  } else if (window.setImmediate) {
    setImmediate = window.setImmediate;
  } else {
    var setImmediateQueue = [];
    var sentinel = String(Math.random());
    window.addEventListener("message", function(e) {
      if (e.data === sentinel) {
        var queue = setImmediateQueue;
        setImmediateQueue = [];
        queue.forEach(function(func) {
          func();
        });
      }
    });
    setImmediate = function(func) {
      setImmediateQueue.push(func);
      window.postMessage(sentinel, "*");
    };
  }
  var isScheduled = false;
  var scheduledObservers = [];
  function scheduleCallback(observer) {
    scheduledObservers.push(observer);
    if (!isScheduled) {
      isScheduled = true;
      setImmediate(dispatchCallbacks);
    }
  }
  function wrapIfNeeded(node) {
    return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;
  }
  function dispatchCallbacks() {
    isScheduled = false;
    var observers = scheduledObservers;
    scheduledObservers = [];
    observers.sort(function(o1, o2) {
      return o1.uid_ - o2.uid_;
    });
    var anyNonEmpty = false;
    observers.forEach(function(observer) {
      var queue = observer.takeRecords();
      removeTransientObserversFor(observer);
      if (queue.length) {
        observer.callback_(queue, observer);
        anyNonEmpty = true;
      }
    });
    if (anyNonEmpty) dispatchCallbacks();
  }
  function removeTransientObserversFor(observer) {
    observer.nodes_.forEach(function(node) {
      var registrations = registrationsTable.get(node);
      if (!registrations) return;
      registrations.forEach(function(registration) {
        if (registration.observer === observer) registration.removeTransientObservers();
      });
    });
  }
  function forEachAncestorAndObserverEnqueueRecord(target, callback) {
    for (var node = target; node; node = node.parentNode) {
      var registrations = registrationsTable.get(node);
      if (registrations) {
        for (var j = 0; j < registrations.length; j++) {
          var registration = registrations[j];
          var options = registration.options;
          if (node !== target && !options.subtree) continue;
          var record = callback(options);
          if (record) registration.enqueue(record);
        }
      }
    }
  }
  var uidCounter = 0;
  JsMutationObserver = function (callback) {
    this.callback_ = callback;
    this.nodes_ = [];
    this.records_ = [];
    this.uid_ = ++uidCounter;
  };
  JsMutationObserver.prototype = {
    observe: function(target, options) {
      target = wrapIfNeeded(target);
      if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {
        throw new SyntaxError();
      }
      var registrations = registrationsTable.get(target);
      if (!registrations) registrationsTable.set(target, registrations = []);
      var registration;
      for (var i = 0; i < registrations.length; i++) {
        if (registrations[i].observer === this) {
          registration = registrations[i];
          registration.removeListeners();
          registration.options = options;
          break;
        }
      }
      if (!registration) {
        registration = new Registration(this, target, options);
        registrations.push(registration);
        this.nodes_.push(target);
      }
      registration.addListeners();
    },
    disconnect: function() {
      this.nodes_.forEach(function(node) {
        var registrations = registrationsTable.get(node);
        for (var i = 0; i < registrations.length; i++) {
          var registration = registrations[i];
          if (registration.observer === this) {
            registration.removeListeners();
            registrations.splice(i, 1);
            break;
          }
        }
      }, this);
      this.records_ = [];
    },
    takeRecords: function() {
      var copyOfRecords = this.records_;
      this.records_ = [];
      return copyOfRecords;
    }
  };
  function MutationRecord(type, target) {
    this.type = type;
    this.target = target;
    this.addedNodes = [];
    this.removedNodes = [];
    this.previousSibling = null;
    this.nextSibling = null;
    this.attributeName = null;
    this.attributeNamespace = null;
    this.oldValue = null;
  }
  function copyMutationRecord(original) {
    var record = new MutationRecord(original.type, original.target);
    record.addedNodes = original.addedNodes.slice();
    record.removedNodes = original.removedNodes.slice();
    record.previousSibling = original.previousSibling;
    record.nextSibling = original.nextSibling;
    record.attributeName = original.attributeName;
    record.attributeNamespace = original.attributeNamespace;
    record.oldValue = original.oldValue;
    return record;
  }
  var currentRecord, recordWithOldValue;
  function getRecord(type, target) {
    return currentRecord = new MutationRecord(type, target);
  }
  function getRecordWithOldValue(oldValue) {
    if (recordWithOldValue) return recordWithOldValue;
    recordWithOldValue = copyMutationRecord(currentRecord);
    recordWithOldValue.oldValue = oldValue;
    return recordWithOldValue;
  }
  function clearRecords() {
    currentRecord = recordWithOldValue = undefined;
  }
  function recordRepresentsCurrentMutation(record) {
    return record === recordWithOldValue || record === currentRecord;
  }
  function selectRecord(lastRecord, newRecord) {
    if (lastRecord === newRecord) return lastRecord;
    if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;
    return null;
  }
  function Registration(observer, target, options) {
    this.observer = observer;
    this.target = target;
    this.options = options;
    this.transientObservedNodes = [];
  }
  Registration.prototype = {
    enqueue: function(record) {
      var records = this.observer.records_;
      var length = records.length;
      if (records.length > 0) {
        var lastRecord = records[length - 1];
        var recordToReplaceLast = selectRecord(lastRecord, record);
        if (recordToReplaceLast) {
          records[length - 1] = recordToReplaceLast;
          return;
        }
      } else {
        scheduleCallback(this.observer);
      }
      records[length] = record;
    },
    addListeners: function() {
      this.addListeners_(this.target);
    },
    addListeners_: function(node) {
      var options = this.options;
      if (options.attributes) node.addEventListener("DOMAttrModified", this, true);
      if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);
      if (options.childList) node.addEventListener("DOMNodeInserted", this, true);
      if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);
    },
    removeListeners: function() {
      this.removeListeners_(this.target);
    },
    removeListeners_: function(node) {
      var options = this.options;
      if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);
      if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);
      if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);
      if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);
    },
    addTransientObserver: function(node) {
      if (node === this.target) return;
      this.addListeners_(node);
      this.transientObservedNodes.push(node);
      var registrations = registrationsTable.get(node);
      if (!registrations) registrationsTable.set(node, registrations = []);
      registrations.push(this);
    },
    removeTransientObservers: function() {
      var transientObservedNodes = this.transientObservedNodes;
      this.transientObservedNodes = [];
      transientObservedNodes.forEach(function(node) {
        this.removeListeners_(node);
        var registrations = registrationsTable.get(node);
        for (var i = 0; i < registrations.length; i++) {
          if (registrations[i] === this) {
            registrations.splice(i, 1);
            break;
          }
        }
      }, this);
    },
    handleEvent: function(e) {
      e.stopImmediatePropagation();
      switch (e.type) {
       case "DOMAttrModified":
        var name = e.attrName;
        var namespace = e.relatedNode.namespaceURI;
        var target = e.target;
        var record = new getRecord("attributes", target);
        record.attributeName = name;
        record.attributeNamespace = namespace;
        var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;
        forEachAncestorAndObserverEnqueueRecord(target, function(options) {
          if (!options.attributes) return;
          if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {
            return;
          }
          if (options.attributeOldValue) return getRecordWithOldValue(oldValue);
          return record;
        });
        break;

       case "DOMCharacterDataModified":
        var target = e.target;
        var record = getRecord("characterData", target);
        var oldValue = e.prevValue;
        forEachAncestorAndObserverEnqueueRecord(target, function(options) {
          if (!options.characterData) return;
          if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);
          return record;
        });
        break;

       case "DOMNodeRemoved":
        this.addTransientObserver(e.target);

       case "DOMNodeInserted":
        var changedNode = e.target;
        var addedNodes, removedNodes;
        if (e.type === "DOMNodeInserted") {
          addedNodes = [ changedNode ];
          removedNodes = [];
        } else {
          addedNodes = [];
          removedNodes = [ changedNode ];
        }
        var previousSibling = changedNode.previousSibling;
        var nextSibling = changedNode.nextSibling;
        var record = getRecord("childList", e.target.parentNode);
        record.addedNodes = addedNodes;
        record.removedNodes = removedNodes;
        record.previousSibling = previousSibling;
        record.nextSibling = nextSibling;
        forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) {
          if (!options.childList) return;
          return record;
        });
      }
      clearRecords();
    }
  };
})();

(typeof mono === 'undefined') && (mono = {loadModule: function() {this.loadModuleStack.push(arguments);},loadModuleStack: []});

mono.loadModule('dailymotion', function(moduleName, initData) {
  "use strict";

  var language = initData.getLanguage;
  var preference = initData.getPreference;
  var moduleState = preference.moduleDailymotion ? 1 : 0;

  var iframe = mono.isIframe() && /\/embed\/([\w\-]+)/i.test(document.location.href);

  mono.onMessage(function(message, cb){
    if (message.action === 'getModuleInfo') {
      if (message.url !== location.href) return;
      return cb({state: moduleState, moduleName: moduleName});
    }
    if (message.action === 'changeState') {
      if (moduleName !== message.moduleName) {
        return;
      }
      return dailymotion.changeState(message.state);
    }
    if (!moduleState) {
      return;
    }
    if (message.action === 'updateLinks') {
      dailymotion.updateLinks();
    }
  });

  if (moduleState) {
    mono.asyncCall(function() {
      dailymotion.run();
    });
  }

  var dailymotion = {
    contextMenu: null,
    linkCache: {},
    embed: null,
    title: '',
    styleIndex: 0,
    btnId: 'sf__download_btn',
    panelId: 'sf__download_panel',
    result: null,
    popupIsShow: false,

    run: function()
    {
      moduleState = 1;
      if (iframe) {
        dailymotion.appendIframeButtons();
        return;
      }

      if (SaveFrom_Utils.mutationWatcher.isAvailable()) {
        return dailymotion.mutationMode.enable();
      }

      var btnBox = dailymotion.insertButton();
      if (!btnBox) {
        var count = 0;
        var timer = setInterval(function(){
          count++;
          btnBox = dailymotion.insertButton();

          if(count > 5 || btnBox) {
            clearInterval(timer);
          }
        }, 1000);
      }

      mono.onUrlChange(function() {
        var exBtn = document.getElementById(dailymotion.btnId);
        if (!exBtn) {
          return dailymotion.insertButton();
        }

        setTimeout(function () {
          var exBtn = document.getElementById(dailymotion.btnId);
          if (!exBtn) {
            dailymotion.insertButton();
          }
        }, 1500);
      });
    },
    changeState: function(state) {
      if (iframe) return;
      moduleState = state;
      mono.clearUrlChange();
      dailymotion.rmBtn();
      dailymotion.mutationMode.stop();
      if (state) {
        dailymotion.run();
      }
    },

    hideMenu: function() {
      if (dailymotion.contextMenu && dailymotion.contextMenu.isShow) {
        dailymotion.contextMenu.hide();
        dailymotion.contextMenu = null;
      }
    },

    updateLinks: function() {
      dailymotion.result = null;
      dailymotion.insertButton();
    },

    appendIframeButtons: function()
    {
      var p = undefined,
        b = document.createElement('div'),
        a = document.createElement('a'),
        panel = document.createElement('div');

      a.href = '#';
      a.textContent = language.download.toLowerCase();
      SaveFrom_Utils.setStyle(a, {
        display: 'inline-block',
        color: 'rgba(255,255,255,.9)',
        textDecoration: 'none',
        padding: '5px 10px'
      });
      b.appendChild(a);

      SaveFrom_Utils.setStyle(b, {
        background: 'rgba(0, 0, 0, .4)',
        border: '1px solid rgba(255,255,255,.5)',
        borderRadius: '4px',
        fontFamily: 'Arial,Helvetica,sans-serif',
        fontSize: '13px',
        lineHeight: 'normal',
        position: 'absolute',
        top: '5px',
        left: '5px',
        padding: 0,
        margin: 0,
        zIndex: 99999
      });

      panel.id = dailymotion.panelId;
      SaveFrom_Utils.setStyle(panel, {
        color: '#fff',
        background: 'rgba(0,0,0,0.7)',
        textAlign: 'center',
        border: 0,
        display: 'none',
        fontFamily: 'Arial,Helvetica,sans-serif',
        fontSize: '13px',
        fontWeight: 'normal',
        lineHeight: 'normal',
        position: 'absolute',
        top: 0,
        left: 0,
        right: 0,
        margin: 0,
        padding: '3px',
        zIndex: 99990
      });


      dailymotion.btnBox = document.createElement('div');
      dailymotion.btnBox.style.display = 'none';
      dailymotion.btnBox.appendChild(b);
      dailymotion.btnBox.appendChild(panel);

      mono.off(document, 'mouseenter', dailymotion.onExtPlayerOver);
      mono.off(document, 'mouseleave', dailymotion.onExtPlayerOver);
      mono.on(document, 'mouseenter', dailymotion.onExtPlayerOver);
      mono.on(document, 'mouseleave', dailymotion.onExtPlayerOver);

      a.addEventListener('click', dailymotion.fetchIframeLinks);
      a.addEventListener('click', dailymotion.toggleIframePanel);

      document.body.appendChild(dailymotion.btnBox);
    },

    onExtPlayerOver: function(event) {
      if(event.type == 'mouseenter') {
        dailymotion.btnBox.style.display = 'block';
      } else
      if(event.type == 'mouseleave') {
        dailymotion.btnBox.style.display = 'none';
      }
    },

    fetchIframeLinks: function(e) {
      var a = this;
      var button = e.target;

      if(!dailymotion.result)
      {
        dailymotion.getLinks(document.body.innerHTML, function(links) {
          if (links && links.length > 0) {
            dailymotion.result = dailymotion.handleLinks(links);
            dailymotion.fillIframePanelInfo(dailymotion.result);
            return;
          }
          dailymotion.getEmbedVideoInfo(function(links){
            if(links && links.length > 0) {
              dailymotion.result = dailymotion.handleLinks(links);
              dailymotion.fillIframePanelInfo(dailymotion.result);
            } else {
              dailymotion.result = true;
              dailymotion.fillIframePanelInfo(null);
            }
          });
        });
      }

      button.removeEventListener('click', dailymotion.fetchIframeLinks, false);
      e.preventDefault();
      e.stopPropagation();
      return false;
    },

    toggleIframePanel: function(e)
    {
      e.preventDefault();
      e.stopPropagation();

      var panel = document.getElementById(dailymotion.panelId);
      if(panel)
      {
        var isHidden = panel.style.display === 'none';
        panel.style.display = isHidden ? '' : 'none';

        if (isHidden && [1].indexOf(preference.cohortIndex) !== -1) {
          mono.sendMessage({action: 'trackCohort', category: 'dailymotion', event: 'click', label: 'video-iframe'});
        }
      }
    },

    insertButton: function()
    {
      var btnContainer = null;

      btnContainer = document.querySelector('.fluid-container .pl_video_infos .row .sd_user_subscribe');
      if (btnContainer) {
        return dailymotion.appendBtn({
          btnContainer: btnContainer.parentNode,
          styleIndex: 5
        });
      }

      btnContainer = document.querySelector('.pl_videos_listwithplayer #player_tools #dmpi_video_tools');
      if (btnContainer) {
        return dailymotion.appendBtn({
          btnContainer: btnContainer.firstChild,
          styleIndex: 4
        });
      }

      btnContainer = document.querySelector('#content .pl_user_featured .col-4 ul li');
      if (btnContainer) {
        return dailymotion.appendBtn({
          btnContainer: btnContainer,
          styleIndex: 3
        });
      }

      return null;
    },

    getVideoId: function(details) {
      if (details.styleIndex === 4) {
        var linkWithId = details.btnContainer.querySelector('a[data-video-xid]');
        if (linkWithId) {
          return linkWithId.dataset.videoXid;
        }
      }

      var playerNode = document.querySelector('#player embed');
      if (playerNode) {
        var falshvars = playerNode.getAttribute('flashvars');
        if (falshvars) {
          var params = mono.parseUrlParams(falshvars, {forceSep: '&', useDecode: 1, argsOnly: 1});
          if (params.config) {
            try {
              params = JSON.parse(params.config);
              return params.metadata.id;
            } catch (e) {
            }
          }
        }
      }

      var playerTitleLink = document.querySelector('#player a.dmp_StartView-title-text');
      if (playerTitleLink) {
        var request = SaveFrom_Utils.embedDownloader.checkUrl(playerTitleLink.href);
        if (request) {
          return request.extVideoId;
        }
      }

      return null;
    },

    appendBtn: function(details) {
      var btnContainer = details.btnContainer;

      if (!btnContainer) {
        return;
      }

      var styleIndex = details.styleIndex;

      var oldBtn = btnContainer.querySelector('#' + dailymotion.btnId);

      var customStyle = {};

      if (styleIndex === 3 || styleIndex === 4) {
        mono.extend(customStyle, {
          display: 'inline-block',
          height: '25px',
          backgroundPosition: 'center',
          backgroundRepeat: 'no-repeat',
          backgroundSize: '12px',
          backgroundImage: 'url('+SaveFrom_Utils.svg.getSrc('download', '#808080')+')'
        });

        if (styleIndex === 3) {
          mono.extend(customStyle, {
            cssFloat: 'left',
            marginTop: '4px',
            marginRight: '10px'
          });
        }

        if (styleIndex === 4) {
          mono.extend(customStyle, {
            marginLeft: '2px',
            marginRight: '-2px',
            verticalAlign: 'top'
          });
        }
      }

      if (styleIndex === 5) {
        mono.extend(customStyle, {
          padding: '0 5px',
          cssFloat: 'left',
          marginLeft: '10px'
        });
      }

      var tagName = 'a';

      if (styleIndex === 5) {
        tagName = 'button';
      }

      var classList = [];

      if (styleIndex === 3 || styleIndex === 4) {
        classList.push('btn');
      }

      if (styleIndex === 5) {
        classList.push('button');
      }

      var buttonNode = mono.create(tagName, {
        id: dailymotion.btnId,
        href: '#',
        class: classList,
        title: language.download,
        style: customStyle,
        on: ['click', function(e) {
          e.preventDefault();
          e.stopPropagation();

          if (dailymotion.contextMenu && dailymotion.contextMenu.isShow) {
            dailymotion.hideMenu();
            return;
          }

          var id = dailymotion.getVideoId(details);

          var links = language.download + ' ...';
          var fromCache = dailymotion.linkCache[id];
          if (fromCache) {
            links = SaveFrom_Utils.popupMenu.prepareLinks.dailymotion(fromCache.links, fromCache.title);
          }

          var menu = dailymotion.contextMenu = SaveFrom_Utils.popupMenu.quickInsert(this, links, 'sf-popupMenu');

          if (fromCache) {
            return;
          }

          mono.sendMessage({
            action: 'getDailymotionLinks',
            extVideoId: id
          }, function(response) {
            if(response.links) {
              dailymotion.linkCache[id] = response;
              var menuLinks = SaveFrom_Utils.popupMenu.prepareLinks.dailymotion(response.links, response.title);
              menu.update(menuLinks);
              return;
            }
            menu.update(language.noLinksFound);
          });

          if ([1].indexOf(preference.cohortIndex) !== -1) {
            if (styleIndex === 4) {
              mono.sendMessage({action: 'trackCohort', category: 'dailymotion', event: 'click', label: 'video-playlist'});
            } else
            if (styleIndex === 5) {
              mono.sendMessage({action: 'trackCohort', category: 'dailymotion', event: 'click', label: 'video-single'});
            } else
            if (styleIndex === 3) {
              mono.sendMessage({action: 'trackCohort', category: 'dailymotion', event: 'click', label: 'video-chennal'});
            }
          }
        }]
      });

      if (styleIndex === 5) {
        mono.create(buttonNode, {
          append: [
            mono.create('img', {
              title: language.download,
              src: SaveFrom_Utils.svg.getSrc('download', '#808080'),
              style: {
                width: '12px',
                height: '12px',
                verticalAlign: 'middle',
                opacity: '0.9'
              }
            }),
            ' ',
            language.download
          ]
        });
      }

      if (mono.isOpera && (styleIndex === 3 || styleIndex === 4)) {
        buttonNode.appendChild(mono.create('img', {
          src: SaveFrom_Utils.svg.getSrc('download', '#808080'),
          style: {
            width: '12px',
            height: '12px',
            marginBottom: '2px'
          }
        }));
      }

      if (oldBtn && oldBtn.parentNode) {
        oldBtn.parentNode.replaceChild(buttonNode, oldBtn);
        oldBtn = null;
      } else
      if(styleIndex === 3) {
        btnContainer.insertBefore(buttonNode, btnContainer.firstChild);
      } else {
        btnContainer.appendChild(buttonNode);
      }

      return buttonNode;
    },

    rmBtn: function() {
      var btnList = document.querySelectorAll(['#'+dailymotion.btnId, '#'+dailymotion.panelId]);
      for (var i = 0, item; item = btnList[i]; i++) {
        item.parentNode.removeChild(item);
      }
      dailymotion.result = null;
      dailymotion.popupIsShow = false;
    },

    fillIframePanelInfo: function(result)
    {
      var p = document.getElementById(dailymotion.panelId);
      if(!p)
        return;

      SaveFrom_Utils.emptyNode(p);

      if(!result || !result.length)
      {
        p.appendChild(document.createTextNode(language.noLinksFound));
        p.style.paddingTop = '11px';
        p.style.paddingBottom = '11px';
        return;
      }

      var sStyle = {
        fontSize: '75%',
        fontWeight: 'normal',
        marginLeft: '3px',
        whiteSpace: 'nowrap',
        color: '#fff'
      };

      var fsIconStyle = {
        color: '#fff',
        opacity: 0.5
      };

      var fsTextStyle = {
        position: 'relative',
        top: '-1px'
      };

      var item = document.createElement('div');
      item.style.marginTop = '8px';
      item.style.marginBottom = '8px';
      item.style.paddingLeft = '70px';
      item.style.paddingRight = '70px';
      p.appendChild(item);
      var color = '', sep = false;
      for(var i = 0; i < result.length; i++)
      {
        if(sep)
          item.appendChild(document.createTextNode(' '));

        var a = document.createElement('a');
        a.href = result[i][0];
        a.title = language.downloadTitle;

        if(dailymotion.title)
        {
          a.setAttribute('download', mono.fileName.modify(
            dailymotion.title + '.' + result[i][2].toLowerCase()));

          a.addEventListener('click', SaveFrom_Utils.downloadOnClick, false);
        }

        a.textContent = result[i][2];
        a.style.margin = '0 0 0 10px';
        a.style.color = '#fff';

        if(result[i][1])
        {
          var s = document.createElement('span');
          s.textContent = result[i][1];
          SaveFrom_Utils.setStyle(s, sStyle);
          a.appendChild(s);
        }

        item.appendChild(a);
        sep = true;

        SaveFrom_Utils.appendFileSizeIcon(a, fsIconStyle, fsTextStyle);

        if(!color)
          color = SaveFrom_Utils.getStyle(a, 'color');
      }

      if(result.length > 0)
      {
        if(preference.moduleShowDownloadInfo === 1)
        {
          if(!color)
            color = 'blue';

          SaveFrom_Utils.appendDownloadInfo(p, color, null, {
            width: '16px',
            height: '16px',
            fontSize: '16px',
            lineHeight: '16px'
          });
        }
      }
    },


    handleLinks: function(video)
    {
      var result = [];
      var links = null;

      if(typeof(video) == 'object')
        links = video;
      else
        links = video.split('||');

      if(links && links.length > 0)
      {
        for(var i = 0; i < links.length; i++)
        {
          links[i] = links[i].replace(/\\\//g, '/');
          links[i] = links[i].replace(/\@\@[\w\-]+$/, '');
          var size = '';
          var t = links[i].match(/\/cdn\/\w+\-(\d+x\d+)\//i);
          if(t && t.length > 1)
          {
            size = t[1];
          }
          else
          {
            t = links[i].match(/\D(\d+x\d+)\D/i);
            if(t && t.length > 1)
            {
              size = t[1];
            }
          }

          var ext = 'FLV';
          var t = links[i].match(/\.(\w{1,6})(?:$|\?)/);
          if(t && t.length > 1)
          {
            ext = t[1].toUpperCase();
          }

          if(size !== '80x60')
          {
            var height = parseInt(size.split('x').slice(-1)[0]);
            result.push([links[i], height, ext]);
          }
        }
      }

      if(!result)
      {
        return null;
      }

      var sort = function(a, b){
        a = parseInt(a[1]);
        a = isNaN(a) ? 0 : a;
        b = parseInt(b[1]);
        b = isNaN(b) ? 0 : b;
        return a - b;
      };

      result.sort(sort);
      return result;
    },


    getLinks: function(text, cb)
    {
      var links = [];
      var info = SaveFrom_Utils.getMatchFirst(text,
        /(?:var|,)\s*info\s*=\s*\{(.*?)\}\s*(?:;|,\s*\w+\s*=)/i);

      if(!info) {
        return cb();
      }
      try
      {
        info = JSON.parse('{' + info + '}');
        if(info)
        {
          dailymotion.title = info.title;
          for(var i in info)
          {
            if (!info.hasOwnProperty(i)) {
              continue;
            }
            if (typeof info[i] !== 'string') {
              continue;
            }
            if(info[i].search(/^https?:\/\/[^\s\"]+\.(mp4|flv)(\?|$)/) > -1)
            {
              links.push(info[i]);
            }
          }
        }
      }
      catch(e){}
      cb(links);
    },

    getEmbedVideoInfo: function(callback)
    {
      if(!location.pathname) {
        return callback();
      }

      var url = location.pathname;
      if (!iframe) {
        url = "/embed" + url;
      }
      url =  location.protocol + '//' +  location.host + url;
      mono.sendMessage({action: 'getDailymotionEmbedVideoInfoMsg', url: url}, function(data) {
        if (data === undefined) {
          return callback();
        }
        dailymotion.title = data.title;
        data = data.links;
        callback(data);
      });
    },
    mutationMode: {
      observer: null,
      stop: function() {
        if (this.observer) {
          this.observer.stop();
        }

        ['sfSkip'].forEach(function(attr) {
          var dataAttr = mono.dataAttr2Selector(attr);
          var dataAttrList = document.querySelectorAll('['+dataAttr+']');
          for (var i = 0, item; item = dataAttrList[i]; i++) {
            item.removeAttribute(dataAttr);
          }
        });
      },
      enable: function() {
        if (this.observer) {
          return this.observer.start();
        }

        this.observer = SaveFrom_Utils.mutationWatcher.run({
          callback: function(summaryList) {
            var summary, n, i, node;

            summary = summaryList[0];
            for (n = 0; node = summary.added[n]; n++) {
              if (node.dataset.sfSkip > 0) {
                continue;
              }
              node.dataset.sfSkip = '1';

              dailymotion.appendBtn({
                btnContainer: node.parentNode,
                styleIndex: 5
              });
            }

            summary = summaryList[1];
            for (n = 0; node = summary.added[n]; n++) {
              if (node.dataset.sfSkip > 0) {
                continue;
              }
              node.dataset.sfSkip = '1';

              dailymotion.appendBtn({
                btnContainer: node.firstChild,
                styleIndex: 4
              });
            }

            summary = summaryList[2];
            for (n = 0; node = summary.added[n]; n++) {
              var parent = node.parentNode;
              if (parent.dataset.sfSkip > 0) {
                continue;
              }
              parent.dataset.sfSkip = '1';

              dailymotion.appendBtn({
                btnContainer: node,
                styleIndex: 3
              });
            }
          },
          queries: [
            {css: '.fluid-container .pl_video_infos .row .sd_user_subscribe', is: 'added'},
            {css: '.pl_videos_listwithplayer #player_tools #dmpi_video_tools'},
            {css: '#content .pl_user_featured .col-sm-4 ul li'}
          ]
        });
      }
    }
  };
}, null, function syncIsActive() {
  "use strict";
  if (mono.isSafari || mono.isGM) {
    if ( !mono.checkUrl(document.URL, [
        'http://dailymotion.*/*',
        'http://*.dailymotion.*/*',
        'https://dailymotion.*/*',
        'https://*.dailymotion.*/*'
      ]) ) {
      return false;
    }
  }

  if (mono.isIframe()) {
    if(!/\/embed\/([\w\-]+)/i.test(document.location.href)) {
      return false;
    }

    try {
      if (location.hostname === window.parent.location.hostname) {
        return false;
      }
    } catch(e) {}
  }

  return true;
});

(typeof mono === 'undefined') && (mono = {loadModule: function() {this.loadModuleStack.push(arguments);},loadModuleStack: []});

mono.loadModule('facebook', function(moduleName, initData) {
  "use strict";

  var language = initData.getLanguage;
  var preference = initData.getPreference;
  var moduleState = preference.moduleFacebook ? 1 : 0;

  mono.onMessage(function(message, cb){
    if (message.action === 'getModuleInfo') {
      if (message.url !== location.href) return;
      return cb({state: moduleState, moduleName: moduleName});
    }
    if (message.action === 'changeState') {
      if (moduleName !== message.moduleName) {
        return;
      }
      return fb.changeState(message.state);
    }
    if (!moduleState) {
      return;
    }
    if (message.action === 'updateLinks') {
      fb.changeState(0);
      fb.changeState(1);
    }
  });

  if (moduleState) {
    mono.asyncCall(function() {
      fb.run();
    });
  }

  var fb = {
    contextMenu: null,
    className: 'savefrom_fb_download',
    isMutation: false,
    run: function()
    {
      moduleState = 1;

      videoFeed.addStyle();
      photo.injectStyle();

      if (SaveFrom_Utils.mutationWatcher.isAvailable()) {
        this.isMutation = true;
        this.initEmbedDownloader();
        this.mutationMode.enable();
        return;
      }

      var photoContainer = document.getElementById('imagestage');
      if ( photoContainer ) {
        var img = photoContainer.querySelector('img.fbPhotoImage');
        if (img) {
          photo.addCurrentDlBtn(img);
        }
        img = null;
      }
      photoContainer = null;

      var _this = this;
      mono.onUrlChange(function() {
        _this.updateLinks();
      }, 1);
    },

    changeState: function(state) {
      fb.hideMenu();
      moduleState = state;
      mono.clearUrlChange();
      externalMedia.disable();
      photo.rmCurrentPhotoBtn();
      photo.rmDataAttrs();
      videoFeed.rmBtn();
      video.rmBtn();
      fb.mutationMode.stop();
      if (state) {
        fb.run();
      }
    },

    initEmbedDownloader: function() {
      SaveFrom_Utils.addStyleRules('.' + SaveFrom_Utils.embedDownloader.linkClass + ' img', {
        opacity: '.5'
      });

      SaveFrom_Utils.embedDownloader.init();
    },

    updateLinks: function()
    {
      this.removeDownloadLinks();
      video.showLinks();

      externalMedia.run();

      this.initEmbedDownloader();
    },


    removeDownloadLinks: function()
    {
      var selector = 'a.' + this.className +
        ',div.' + this.className +
        ',span.' + this.className;

      var e = document.querySelectorAll(selector);
      for(var i = e.length-1; i >= 0; i--)
        e[i].parentNode.removeChild(e[i]);
    },
    mutationMode: {
      observer: null,
      stop: function() {
        if (this.observer) {
          this.observer.stop();
        }

        ['sfSkip'].forEach(function(attr) {
          var dataAttr = mono.dataAttr2Selector(attr);
          var dataAttrList = document.querySelectorAll('['+dataAttr+']');
          for (var i = 0, item; item = dataAttrList[i]; i++) {
            item.removeAttribute(dataAttr);
          }
        });
      },
      wrapVideoGetLinks: function(player) {
        switch (player.tagName) {
          case 'EMBED':
            video.getLinksFromEmbed(player, function(links) {
              video.appendLinks(links);
            });
            break;
          case 'VIDEO':
            video.getLinksFromVideo(player, function(links) {
              video.appendLinks(links);
            });
            break;
        }
      },
      wrapVideoFeedOnLinkHover: function() {
        mono.off(this, 'mouseenter', fb.mutationMode.wrapVideoFeedOnLinkHover);
        if (!moduleState) {
          return;
        }
        videoFeed.onLinkHover.apply(this, arguments);
      },
      wrapPhotoOnHover: function() {
        mono.off(this, 'mouseenter', fb.mutationMode.wrapPhotoOnHover);
        if (!moduleState) {
          return;
        }
        photo.addCurrentDlBtn(this);
      },
      wrapExternalMediaMouseEnter: function() {
        if (!moduleState) {
          return;
        }
        var link = this;
        var attr = link.dataset[externalMedia.linkDataAttr];

        if (attr) {
          clearTimeout(externalMedia.timer);
          return;
        }

        if (externalMedia.handle(link)) {
          if(externalMedia.lastLink && externalMedia.lastLink !== link) {
            externalMedia.removeBtn(externalMedia.lastLink);
          }

          SaveFrom_Utils.embedDownloader.hidePanel();
          externalMedia.lastLink = link;
        } else {
          mono.off(this, 'mouseenter', fb.mutationMode.wrapExternalMediaMouseEnter);
          mono.off(this, 'mouseleave', fb.mutationMode.wrapExternalMediaMouseLeave);
        }
      },
      wrapExternalMediaMouseLeave: function() {
        if (!moduleState) {
          return;
        }
        var link = this;
        var attr = link.dataset[externalMedia.linkDataAttr];

        if (attr) {
          clearTimeout(externalMedia.timer);
          externalMedia.timer = setTimeout(function(){
            externalMedia.removeBtn(link);
          }, 1500);
        }
      },
      wrapExternalMedia: function(node) {
        mono.on(node, 'mouseenter', fb.mutationMode.wrapExternalMediaMouseEnter);
        mono.on(node, 'mouseleave', fb.mutationMode.wrapExternalMediaMouseLeave);
      },
      enable: function() {
        if (this.observer) {
          return this.observer.start();
        }

        var _this = this;

        this.observer = SaveFrom_Utils.mutationWatcher.run({
          callback: function(summaryList) {
            var summary, n, i, node;

            summary = summaryList[0];
            for (n = 0; node = summary.added[n]; n++) {
              fb.hideMenu();
              photo.addCurrentDlBtn(node);
            }

            for (i = 1; i < 3; i++) {
              summary = summaryList[i];
              for (n = 0; node = summary.added[n]; n++) {
                var isInsert = false;

                if (mono.matches(node, '#fbxPhotoContentContainer .videoStage ' + node.tagName)) {
                  isInsert = true;
                } else
                if (mono.matches(node, '.videoStage .videoStageContainer ' + node.tagName)) {
                  isInsert = true;
                }

                if (isInsert) {
                  _this.wrapVideoGetLinks(node);
                } else {
                  mono.on(node, 'mouseenter', _this.wrapVideoFeedOnLinkHover);
                }
              }
            }

            summary = summaryList[3];
            for (n = 0; node = summary.added[n]; n++) {
              if (node.getAttribute('aria-describedby') !== 'fbPhotosSnowliftCaption') {
                continue;
              }
              fb.hideMenu();

              if (node.dataset.sfSkip > 0) {
                continue;
              }
              node.dataset.sfSkip = '1';

              mono.on(node, 'mouseenter', _this.wrapPhotoOnHover);
            }

            summary = summaryList[4];
            for (n = 0; node = summary.added[n]; n++) {
              if (node.sfSkip > 0) {
                continue;
              }
              node.sfSkip = '1';

              _this.wrapExternalMedia(node);
            }

            summary = summaryList[5];
            for (n = 0; node = summary.removed[n]; n++) {
              mono.onRemoveListener(node);
            }

          },
          queries: [
            {css: '#fbxPhotoContentContainer .imageStage img.fbPhotoImage', is: 'added'},
            {css: 'embed', is: 'added'},
            {css: 'video', is: 'added'},
            {css: '.stage img.spotlight', is: 'added'},
            {css: 'a', is: 'added'},
            {css: '.' + mono.onRemoveClassName, is: 'removed'}
          ]
        });
      }
    },
    hideMenu: function() {
      if (fb.contextMenu) {
        fb.contextMenu.hide();
        fb.contextMenu = null;
      }
    }
  };

  var externalMedia = {
    linkDataAttr: 'savefromEd',
    timer: 0,
    lastLink: null,

    re: [
      /https?:\/\/(?:[a-z]+\.)?youtube\.com\/(?:#!?\/)?watch\?[^\s\"\'\<\>]*v=([\w\-]+)/i,
      /https?:\/\/(?:[a-z0-9]+\.)?youtube\.com\/(?:embed|v)\/([\w\-]+)/i,
      /https?:\/\/(?:[a-z]+\.)?youtu\.be\/([\w\-]+)/i,
      /https?:\/\/(?:[\w\-]+\.)?vimeo\.com\/(\d+)(?:\?|$)/i
    ],

    thumbnail: {
      youtube: {
        re: [/ytimg\.com(?:\/|%2F)vi(?:\/|%2F)([\w\-]+)(?:\/|%2F)/i],
        url: 'http://www.youtube.com/watch?v={vid}'
      }
    },

    disable: function() {
      mono.off(document, 'mouseenter', this.onLinkHover, true);
      mono.off(document, 'mouseleave', this.onLinkHover, true);

      var panel = SaveFrom_Utils.embedDownloader.panel;
      if (panel) {
        panel.style.display = 'none';
      }
    },

    run: function() {
      mono.off(document, 'mouseenter', this.onLinkHover, true);
      mono.off(document, 'mouseleave', this.onLinkHover, true);

      mono.on(document, 'mouseenter', this.onLinkHover, true);
      mono.on(document, 'mouseleave', this.onLinkHover, true);
    },


    onLinkHover: function(event) {
      var link = event.target;

      if (mono.isOpera) {
        if (link.id === 'fbPhotoSnowliftTagBoxes') {
          link = link.previousElementSibling;
        }
      }
      if (link.tagName === 'IMG') {
        if (link.classList.contains('spotlight') && link.getAttribute('aria-describedby') === 'fbPhotosSnowliftCaption') {
          return photo.addCurrentDlBtn(link);
        }
      }

      if (['EMBED', 'VIDEO'].indexOf(link.tagName) !== -1) {
        videoFeed.onLinkHover.call(link, event);
        return;
      }

      if(link.tagName !== 'A') {
        link = link.parentNode;
        if(!link || link.tagName !== 'A') {
          return;
        }
      }

      var attr = link.dataset[externalMedia.linkDataAttr];

      if (event.type === 'mouseenter') {
        if (attr) {
          clearTimeout(externalMedia.timer);
          return;
        }

        if (externalMedia.handle(link)) {
          if(externalMedia.lastLink && externalMedia.lastLink != link)
            externalMedia.removeBtn(externalMedia.lastLink);

          SaveFrom_Utils.embedDownloader.hidePanel();
          externalMedia.lastLink = link;
        }

        return;
      }

      if (attr) {
        clearTimeout(externalMedia.timer);
        externalMedia.timer = setTimeout(function(){
          externalMedia.removeBtn(link);
        }, 1500);
      }
    },

    removeBtn: function(link)
    {
      if(!link || typeof(link) != 'object')
        return;

      var btn = link.querySelector('.' + fb.className);
      if(btn)
      {
        btn.parentNode.removeAttribute(mono.dataAttr2Selector(externalMedia.linkDataAttr));
        btn.parentNode.removeChild(btn);
      }

      link.removeAttribute(mono.dataAttr2Selector(externalMedia.linkDataAttr));

      if(link == this.lastLink)
        this.lastLink = null;
    },


    checkUrl: function(url, retry)
    {
      if(!retry && url.search(/https?:\/\/([\w\-]+\.)?facebook\.com\/l\.php/i) > -1)
      {
        return this.checkUrl(decodeURIComponent(url), true);
      }

      for(var i = 0, l = this.re.length; i < l; i++)
      {
        var m = url.match(this.re[i]);
        if(m && m.length > 0)
          return m[0];
      }
    },


    handle: function(link)
    {
      var img = link.querySelector('img');
      if(img)
      {
        var parent = img.parentNode;
        if(img.src && SaveFrom_Utils.getStyle(parent, 'position') == 'relative')
        {
          var ajaxify = link.getAttribute('ajaxify');

          if(ajaxify && ajaxify.search(/\/flash\/expand_inline/i) > -1)
          {
            var url = this.getThumbnailUrl(img.src);
            if(url)
            {
              return this.createButton(url, parent, link, {
                display: 'block',
                position: 'absolute',
                bottom: '3px',
                right: '3px',
                zIndex: 9999,
                margin: 0,
                width: '16px',
                height: '16px'
              }, {
                display: 'block'
              });
            }
          }
          else if(this.checkUrl(link.href))
          {
            return this.createButton(link.href, parent, link, {
              display: 'block',
              position: 'absolute',
              bottom: '3px',
              right: '3px',
              zIndex: 9999,
              margin: 0,
              width: '16px',
              height: '16px'
            }, {
              display: 'block'
            });
          }
        }

        return false;
      }

      return this.createButton(link.href, link, link);
    },


    getThumbnailUrl: function(url)
    {
      for(var i in this.thumbnail)
      {
        for(var j = 0; j < this.thumbnail[i].re.length; j++)
        {
          var vid = SaveFrom_Utils.getMatchFirst(url, this.thumbnail[i].re[j]);
          if(vid)
            return this.thumbnail[i].url.replace(/\{vid\}/ig, vid);
        }
      }

      return '';
    },


    createButton: function(url, parent, link, styleParent, styleIcon)
    {
      url = this.checkUrl(url);
      if(!url)
        return false;

      var btn = document.createElement('a');
      btn.className = fb.className;
      btn.href = 'http://savefrom.net/?url=' + encodeURIComponent(url);
      btn.setAttribute(SaveFrom_Utils.embedDownloader.dataAttr, url);
      btn.title = language.download;

      btn.addEventListener('mousedown', function() {
        if ([1].indexOf(preference.cohortIndex) !== -1) {
          mono.sendMessage({action: 'trackCohort', category: 'facebook', event: 'click', label: 'video-feed'});
        }
      });

      SaveFrom_Utils.setStyle(btn, {
        marginLeft: '7px',
        verticalAlign: 'middle'
      });

      if(styleParent)
        SaveFrom_Utils.setStyle(btn, styleParent);

      var icon = document.createElement('img');
      icon.className = 'icon';
      icon.src = SaveFrom_Utils.svg.getSrc('download', '#a2db16');
      SaveFrom_Utils.setStyle(icon, {
        display: 'inline-block',
        width: '16px',
        height: '16px',
        verticalAlign: 'middle',
        //opacity: '0.9',
        cursor: 'pointer'
      });

      if(styleIcon)
        SaveFrom_Utils.setStyle(icon, styleIcon);

      btn.appendChild(icon);

      link.dataset[this.linkDataAttr] = 1;
      parent.appendChild(btn);

      return true;
    }
  };


  var video = {
    getParent: function()
    {
      return document.querySelector('.videoStage');
    },


    getLinks: function(parent, callback) {
      "use strict";
      var count = 0, _this = this;

      var func = function() {
        var embed = parent.querySelector('embed');
        if(embed) {
          return _this.getLinksFromEmbed(embed, callback.bind(this));
        }

        var video = parent.querySelector('video');
        if(video) {
          return _this.getLinksFromVideo(video, function(links) {
            callback.call(this, links);
          });
        }

        embed = null;
        video = null;

        count++;
        if(count > 10) {
          callback.call(_this, null);
        }

        setTimeout(func, 1000);
      };

      setTimeout(func, 1000);
    },


    getLinksFromEmbed: function(embed, cb) {
      if(!embed) {
        return cb(null);
      }

      var fv = embed.getAttribute('flashvars');
      if(fv === null) {
        return cb(null);
      }

      var params = mono.parseUrlParams(fv).params;
      if (params === undefined) {
        return cb(null);
      }

      var videoData = null;
      try {
        videoData = JSON.parse(decodeURIComponent(params)).video_data;
      } catch (e) {
        return cb(null);
      }
      if(!videoData) {
        return cb(null);
      }

      if (videoData.progressive) {
        videoData = videoData.progressive;
      }

      var links = {};
      var typeMap = {
        sd_src: 'SD',
        hd_src: 'HD'
      };
      for (var i = 0, item; item = videoData[i]; i++) {
        ['sd_src', 'hd_src'].forEach(function(type) {
          if (!item[type]) {
            return;
          }

          links[item[type]] = typeMap[type];
        });
      }

      return cb(links);
    },

    requestVideoLinks: function(videoid, cb) {
      "use strict";
      mono.sendMessage({
        action: 'getFacebookLinks',
        extVideoId: videoid
      }, function(response) {
        if (!response) {
          cb();
        } else {
          cb(response.links, response.title);
        }
      });
    },

    getLinksFromVideo: function(video, cb) {
      "use strict";
      if(!video) {
        return cb(null);
      }

      var links = {};

      var url = document.URL;
      var id;
      SaveFrom_Utils.embedDownloader.hostings.facebook.re.some(function(reg) {
        var _id;
        if (_id = url.match(reg)) {
          id = _id && _id[1];
          return true;
        }
      });
      if (!id) {
        var parent = mono.getParentByClass(video, 'userContentWrapper');
        parent = parent && parent.querySelectorAll('a.profileLink, a[rel="theater"]');
        if (parent && parent.length > 0) {
          parent = [].slice.call(parent);
          parent.some(function(item) {
            item = (item.href || '').match(/\/videos\/(\d+)/);
            item = item && item[1];
            if (item) {
              id = item;
              return true;
            }
          });
        }
      }
      id && (links.id = id);

      if(video.src) {
        var ext = SaveFrom_Utils.getFileExtension(video.src, 'mp4');
        links[video.src] = ext.toUpperCase();
      }

      var src = video.querySelectorAll('source');
      if(src && src.length > 0) {
        for(var i = 0; i < src.length; i++)
        {
          var ext = SaveFrom_Utils.getFileExtension(src[i].src, 'mp4');
          links[src[i].src] = ext.toUpperCase();
        }
      }

      return cb(links);
    },


    showLinks: function() {
      "use strict";
      var parent = this.getParent();
      if(!parent)
        return;

      var _this = this;
      this.getLinks(parent, function(links){
        _this.appendLinks(links);
      });
    },


    getFileName: function(url) {
      var name = SaveFrom_Utils.getFileName(url);
      if(name)
        return name;

      var d = SaveFrom_Utils.dateToObj();
      var dateStr = d.year + '-' + d.month + '-' + d.day + '_' +
        d.hour + '-' + d.min;

      return 'facebook_' + dateStr + '.' +
        SaveFrom_Utils.getFileExtension(url, 'mp4');
    },

    prepareLinks: function(links, _title) {
      var menuLinks = [];
      for (var url in links) {
        var title = this.getFileName(url);
        var extPos = title.lastIndexOf('.');
        var ext = title.substr(extPos+1);
        title = _title || title.substr(0, extPos);
        var format = ext.toUpperCase();

        var quality = links[url];
        var popupLink = { href: url, title: title, format: format, quality: quality, forceDownload: true };
        menuLinks.push(popupLink);
      }
      if (menuLinks.length === 0) {
        menuLinks = language.noLinksFound;
      }
      return menuLinks;
    },

    appendLinks: function(links) {
      if(!links) {
        return;
      }

      var box = SaveFrom_Utils.getElementByIds([
        'fbPhotoPageMediaInfo', 'fbPhotoSnowliftMediaTitle'
      ]);

      if (box === null) {
        return;
      }

      var type = 0;
      var title;
      if (box.id === 'fbPhotoPageMediaInfo') {
        title = document.querySelector('h2.uiHeaderTitle');
        if (title) {
          title = title.textContent;
        }
        type = 1;
      } else
      if (box.id === 'fbPhotoSnowliftMediaTitle') {
        title = document.querySelector('.fbPhotoSnowliftContainer');
        if (title) {
          title = title.querySelector('span.fbPhotoSnowliftVideoTitle')
        }
        if (title) {
          title = title.textContent;
        }
        type = 2;
      }

      if(!box || box.querySelector('.' + fb.className)) {
        return;
      }

      var panel = document.createElement('div');
      panel.className = fb.className;

      var button = mono.create('div', {
        title: language.download,
        style: {
          display: 'inline-block',
          width: '16px',
          height: '16px',
          backgroundImage: 'url('+SaveFrom_Utils.svg.getSrc('download', '#a2db16')+')',
          backgroundRepeat: 'no-repeat',
          backgroundPosition: 'center center',
          verticalAlign: 'middle',
          cursor: 'pointer'
        }
      });

      panel.appendChild(button);


      var popupMenuLinks = null;

      button.addEventListener('click', function() {
        if (fb.contextMenu && fb.contextMenu.isShow) {
          fb.hideMenu();
          return;
        }

        var menu = fb.contextMenu = SaveFrom_Utils.popupMenu.quickInsert(this, language.download + ' ...', fb.className + '_popup');

        if (popupMenuLinks) {
          menu.update(popupMenuLinks);
        } else
        if (links.id) {
          var id = links.id;
          delete links.id;
          video.requestVideoLinks(id, function(_links, title) {
            if (_links) {
              popupMenuLinks = SaveFrom_Utils.popupMenu.prepareLinks.facebook(_links, title);
            } else {
              popupMenuLinks = video.prepareLinks(links);
            }
            menu.update(popupMenuLinks);
          });
        } else {
          popupMenuLinks = video.prepareLinks(links, title);
          menu.update(popupMenuLinks);
        }

        if ([1].indexOf(preference.cohortIndex) !== -1) {
          if (type === 1) {
            mono.sendMessage({action: 'trackCohort', category: 'facebook', event: 'click', label: 'video-single'});
          } else {
            mono.sendMessage({action: 'trackCohort', category: 'facebook', event: 'click', label: 'video-player'});
          }
        }
      });

      if(box.id == 'fbPhotoSnowliftMediaTitle') {
        panel.style.display = 'inline';
        panel.style.marginRight = '5px';
        panel.style.lineHeight = '33px';
        fb.isMutation && mono.onRemoveEvent(panel, fb.hideMenu);
        box.insertBefore(panel, box.firstChild);
      } else {
        box.appendChild(panel);
      }

      box = null;
      panel = null;
      button = null;
    },
    rmBtn: function() {
      var btnList = document.querySelectorAll('.'+fb.className);
      for (var i = 0, item; item = btnList[i]; i++) {
        item.parentNode.removeChild(item);
      }
    }
  };

  var photo = {
    style: null,
    getFilenameFromUrl: function(url) {
      return SaveFrom_Utils.getMatchFirst(url, /\/([^\/]+\.[a-z0-9]{3,4})(?:\?|$)/i);
    },
    getPhotoId: function() {
      var params = mono.parseUrlParams(location.href);
      return params.fbid;
    },
    onGetPhotoUrl: function(url, container, onGetUrl) {
      if (!url) {
        var img = container.querySelector('img.spotlight') || container.querySelector('img.fbPhotoImage');
        if (!img) {
          return onGetUrl();
        }
        url = img.src;
      }
      if (!url) {
        return onGetUrl();
      }

      if (url.indexOf('dl=1') === -1) {
        if (url.indexOf('?') === -1) {
          url += '?dl=1'
        } else {
          url += '&dl=1'
        }
      }
      onGetUrl(url);
    },
    rmCurrentPhotoBtn: function(insertContainer) {
      var exBtn = undefined;
      var imgList = document.querySelectorAll('.sf-dl-current-photo-btn');
      for (var i = 0, imgItem; imgItem = imgList[i]; i++) {
        if (!insertContainer || !insertContainer.contains(imgItem)) {
          imgItem.parentNode.removeChild(imgItem);
        } else {
          exBtn = imgItem;
        }
      }
      return exBtn;
    },
    injectStyle: function() {
      if (this.style) {
        if (!this.style.parentNode) {
          document.body.appendChild(this.style);
        }
        return;
      }

      this.style = mono.create('style', {
        text: "div > .sf-dl-current-photo-btn {" +
        'display: none;' +
        'border: 1px solid #F8F8F8;' +
        'width: 20px;' +
        'height: 20px;' +
        'padding: 0;' +
        'position: absolute;' +
        'background: url('+SaveFrom_Utils.svg.getSrc('download', '#777777')+') center no-repeat #F8F8F8;' +
        'background-size: 12px;' +
        'top: 20px;' +
        'left: 20px;' +
        'z-index: 100;' +
        'cursor: pointer;' +
        "}" +
        "div > .sf-dl-current-photo-btn:hover {" +
        'background: url('+SaveFrom_Utils.svg.getSrc('download', '#00B75A')+') center no-repeat #F8F8F8;' +
        'background-size: 12px;' +
        "}" +
        "div > .sf-dl-current-photo-btn:active {" +
        "outline: 0;" +
        "box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);" +
        "}" +
        "div:hover > .sf-dl-current-photo-btn {display: block;}"
      });

      document.body.appendChild(this.style);
    },
    addDlCurrentPhotoBtn: function(container) {
      var exBtn = this.rmCurrentPhotoBtn(container);
      if (exBtn) {
        return;
      }
      var _this = this;

      container.appendChild(mono.create('a', {
        class: 'sf-dl-current-photo-btn',
        href: '#',
        title: language.download,
        on: ['click', function(e) {
          e.stopPropagation();
          e.preventDefault();

          if (fb.contextMenu && fb.contextMenu.isShow) {
            fb.hideMenu();
            return;
          }

          var onKeyDown = function(e) {
            if (e.keyCode === 18 || e.keyCode === 17) return;
            menu.hide();
            document.removeEventListener('keydown', onKeyDown);
          };

          var menu = fb.contextMenu = SaveFrom_Utils.popupMenu.quickInsert(this, language.download + ' ...', "photoDlMenu", {
            parent: container,
            onShow: function() {
              if (fb.isMutation) {
                return;
              }
              document.addEventListener('keydown', onKeyDown);
            },
            onHide: function() {
              if (fb.isMutation) {
                return;
              }
              document.removeEventListener('keydown', onKeyDown);
            }
          });

          var onGetUrl = function(link) {
            if (!link) {
              return menu.update(language.noLinksFound);
            }
            var photoFileName = mono.fileName.modify(photo.getFilenameFromUrl(link));
            var dotPos = photoFileName.lastIndexOf('.');
            var photoExt = photoFileName.substr(dotPos+1);
            var photoTitle = photoFileName.substr(0, dotPos);
            menu.update([{href: link, title: photoTitle, quality: language.download,
              format: ' ', ext: photoExt, isBank: true, func: function() {
                menu.hide();
              }}]);
          };

          var fbid = photo.getPhotoId();
          if (!fbid) {
            return photo.onGetPhotoUrl(undefined, container, onGetUrl);
          }
          mono.sendMessage({action: 'getFacebookPhotoUrl', fbid: fbid}, function(url) {
            photo.onGetPhotoUrl(url, container, onGetUrl);
          });
        }]
      }));
    },
    addCurrentDlBtn: function(img) {
      var contaier = img.parentNode;
      if (contaier.dataset.sfSkip > 0) {
        return;
      }
      contaier.dataset.sfSkip = '1';

      var url = img.src;
      if (!url) {
        return;
      }

      this.addDlCurrentPhotoBtn(contaier);
    },
    rmDataAttrs: function() {
      var dataAttr = mono.dataAttr2Selector('sfSkip');
      var dataAttrList = document.querySelectorAll('*['+dataAttr+']');
      for (var i = 0, item; item = dataAttrList[i]; i++) {
        item.removeAttribute(dataAttr);
      }
    }
  };

  var videoFeed = {
    style: null,
    addStyle: function() {
      if (this.style) {
        if  (!this.style.parentNode) {
          document.body.appendChild(this.style);
        }
        return;
      }

      this.style = mono.create('style', {
        class: 'sfFeedStyle',
        text: '' +
        '.'+fb.className+'-feed'+'.sf-feed {' +
        'display: none;' +
        'width: 20px;' +
        'height: 20px;' +
        'padding: 0;' +
        'position: absolute;' +
        'background: url('+SaveFrom_Utils.svg.getSrc('download', '#a2db16')+') center no-repeat transparent;' +
        'background-size: 16px;' +
        'top: 5px;' +
        'left: 5px;' +
        'z-index: 1;' +
        'cursor: pointer;' +
        '}' +
        'div:hover > .'+fb.className+'-feed'+'.sf-feed {' +
        'display: block;' +
        '}' +
        '.'+fb.className+'-feed'+'.sf-feed:active {' +
        'outline: 0;' +
        '}'
      });

      document.body.appendChild(this.style);
    },
    onDlBtnClick: function(e) {
      e.preventDefault();
      e.stopPropagation();

      if (fb.contextMenu && fb.contextMenu.isShow) {
        fb.hideMenu();
        return;
      }

      try {
        var links = JSON.parse(this.dataset.sfDlLinks);
      } catch (e) {
        return;
      }

      var menu = fb.contextMenu = SaveFrom_Utils.popupMenu.quickInsert(this, language.download + ' ...', fb.className+'_popup');

      if (links.id) {
        var id = links.id;
        delete links.id;
        video.requestVideoLinks(id, function(_links, title) {
          var popupMenuLinks;
          if (_links) {
            popupMenuLinks = SaveFrom_Utils.popupMenu.prepareLinks.facebook(_links, title);
          } else {
            popupMenuLinks = video.prepareLinks(links);
          }
          menu.update(popupMenuLinks);
        });
      } else {
        var popupMenuLinks = video.prepareLinks(links);
        menu.update(popupMenuLinks);
      }

      if ([1].indexOf(preference.cohortIndex) !== -1) {
        mono.sendMessage({action: 'trackCohort', category: 'facebook', event: 'click', label: 'video-feed'});
      }
    },
    addDownloadBtn: function(container, links) {
      container.appendChild(mono.create('a', {
        data: {
          sfDlLinks: JSON.stringify(links)
        },
        title: language.download,
        class: [fb.className+'-feed', 'sf-feed'],
        href: '#',
        on: ['click', videoFeed.onDlBtnClick]
      }));
    },
    onLinkHover: function() {
      if (this.dataset.hasSfFeedBtn > 1) {
        return;
      }
      this.dataset.hasSfFeedBtn = '1';

      var onReady = function(links) {
        "use strict";
        if (!links) {
          return;
        }

        var timeLineMainColumn = document.getElementById('pagelet_timeline_main_column')
          || document.getElementById('stream_pagelet')
          || document.getElementById('mainContainer');

        if (!timeLineMainColumn || !timeLineMainColumn.contains(this)) {
          return;
        }

        videoFeed.addDownloadBtn(this.parentNode, links);
      };

      var videoEl = this;
      if (videoEl.tagName === 'VIDEO') {
        videoEl = videoEl.querySelector('embed') || this;
      }

      if (videoEl.tagName === 'EMBED') {
        video.getLinksFromEmbed(videoEl, onReady.bind(this));
      } else
      if (videoEl.tagName === 'VIDEO') {
        video.getLinksFromVideo(videoEl, onReady.bind(this));
      }
    },
    rmBtn: function() {
      var dataAttr = mono.dataAttr2Selector('hasSfFeedBtn');
      var dataAttrList = document.querySelectorAll('*['+dataAttr+']');
      for (var i = 0, item; item = dataAttrList[i]; i++) {
        item.removeAttribute(dataAttr);
      }
      var btnList = document.querySelectorAll('.'+fb.className+'-feed');
      for (var i = 0, item; item = btnList[i]; i++) {
        item.parentNode.removeChild(item);
      }
    }
  };
}, null, function syncIsActive() {
  "use strict";
  if (mono.isSafari || mono.isGM) {
    if (!mono.checkUrl(document.URL, [
        'http://facebook.com/*',
        'http://*.facebook.com/*',
        'https://facebook.com/*',
        'https://*.facebook.com/*'
      ])) {
      return false;
    }
  }

  if (mono.isIframe()) {
    return false;
  }

  return true;
});

(typeof mono === 'undefined') && (mono = {loadModule: function() {this.loadModuleStack.push(arguments);},loadModuleStack: []});

mono.loadModule('lm', function(moduleName, initData) {
  "use strict";
  var language = initData.getLanguage;
  var preference = initData.getPreference;
  var moduleState = (preference.lmFileHosting || preference.lmMediaHosting) ? 1 : 0;

  if (preference.showUmmyInfo) {
    mono.asyncCall(function() {
      checkUmmyPage();
    });
  }

  mono.asyncCall(function() {
    ummyRadioBanner.run();
  });

  mono.onMessage(function(message, cb){
    if (message.action === 'getModuleInfo') {
      if (message.url !== location.href) return;
      return cb({state: moduleState, moduleName: moduleName});
    }
    if (message.action === 'changeState') {
      if (moduleName !== message.moduleName) {
        return;
      }
      return lm.changeState(message.state);
    }
    if (!moduleState) {
      return;
    }
    if (message.action === 'updateLinks') {
      lm.savefromLinkCount = -1;
      lm.run();
    }
  });

  if (moduleState) {
    mono.asyncCall(function() {
      lm.run();
    });
  }

  var checkUmmyPage = function() {
    if (typeof location === 'undefined') return;

    var url = location.href;
    if (url.indexOf("videodownloader.ummy.net") === -1) {
      return;
    }
    if (url.match(/pozdravlyaem|congratulations|tebrikler/) !== null) {
      mono.sendMessage({action: 'updateOption', key: 'showUmmyInfo', value: 0});
      mono.sendMessage({action: 'updateOption', key: 'ummyDetected', value: 1});
    }
  };

  var lm = {
    htmlAfter: '',

    linkText: '',

    linkStyle: {
      'border': 'none',
      'textDecoration': 'none',
      'padding': '0',
      'position': 'relative'
    },

    imgStyle: {
      'border': 'none',
      'width': 'auto',
      'height': 'auto'
    },

    buttonSrc: 'data:image/gif;base64,R0lGODlhEAAQAOZ3APf39+Xl5fT09OPj4/Hx8evr6/3+/u7u7uDh4OPi497e3t7e3/z8/P79/X3GbuXl5ubl5eHg4WzFUfb39+Pj4lzGOV7LOPz7+/n6+vn5+ZTLj9/e387Ozt7f3/7+/vv7/ISbePn5+m/JV1nRKXmVbkCnKVrSLDqsCuDh4d/e3uDn3/z7/H6TdVeaV1uSW+bn5v39/eXm5eXm5kyHP/f39pzGmVy7J3yRd9/f3mLEKkXCHJbka2TVM5vaZn6Wdfn6+YG/c/r5+ZO/jeLi41aHTIeageLn4f39/vr6+kzNG2PVM5i+lomdf2CXYKHVmtzo2YXNeDqsBebl5uHh4HDKWN3g3kKqEH6WeZHTXIPKdnSPbv79/pfmbE7PHpe1l4O8dTO5DODg4VDLIlKUUtzo2J7SmEWsLlG4NJbFjkrJHP7+/VK5Nfz8+zmnC3KKa+Hg4OHh4Y63j/3+/eDg4Ojo6P///8DAwP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAHcALAAAAAAQABAAAAfWgHd2g4SFhYJzdYqLjIpzgx5bBgYwHg1Hk2oNDXKDFwwfDF5NLmMtcStsn4MhGT8YS04aGmU1QRhIGYMTADQAQlAODlloAMYTgwICRmRfVBISIkBPKsqDBAREZmcVFhYVayUz2IMHB1dWOmImI2lgUVrmgwUFLzdtXTxKSSduMfSD6Aik48MGlx05SAykM0gKhAAPAhTB0oNFABkPHg5KMIBCxzlMQFQZMGBIggSDpsCJgGDOmzkIUCAIM2dOhEEcNijQuQDHgg4KOqRYwMGOIENIB90JBAA7',

    sfref: '&utm_source={sfHelperName}&utm_medium=extensions&utm_campaign=link_modifier',

    pageUrl: 'http://savefrom.net/',
    anchorAttribute: 'savefrom_lm',
    anchorAttributeLink: 'savefrom_lm_is_link',
    anchorIndexAttribute: 'savefrom_lm_index',

    linkRegExp: null,

    savefromLinkCount: 0,

    re: {
      filehosting: {
        'rapidshare.com': [/^https?:\/\/([\w\-]+\.)?rapidshare\.com\/\#\!download\|\d+\|\d+\|[^\s\"\|]+\|\d+/i, /^https?:\/\/(rs\d+\.|www\.)?rapidshare\.com\/files\/\d+\/.+/i],
        'filefactory.com': [/^http:\/\/(www\.)?filefactory\.com\/file\/[a-z0-9]+\/?/i],
        'sendspace.com': [/^http:\/\/(www\.)?sendspace\.com\/file\/\w+/i]
      },

      mediahosting: {
        'youtube.com': [
          /^https?:\/\/([a-z]+\.)?youtube\.com\/(#!?\/)?watch\?.*v=/i,
          /^https?:\/\/([a-z0-9]+\.)?youtube\.com\/(embed|v)\/[\w\-]+/i
        ],
        'youtu.be': [/^https?:\/\/([a-z]+\.)?youtu\.be\/[\w\-]+/i],
        'google.com': [/^http:\/\/video\.google\.com\/videoplay\?.*docid=/i],
        'metacafe.com': [/^http:\/\/(www\.)?metacafe\.com\/watch\/\d+\/[^\/]+\/?/i],
        'break.com': [/^http:\/\/(www\.)?break\.com\/(index|movies\w*|(\w+\-)+\w+)\/.+\.html$/i, /^http:\/\/view\.break\.com\/\d+/i],
        'vimeo.com': [/^http:\/\/([\w\-]+\.)?vimeo\.com\/\d+$/i],
        'sevenload.com': [/^http:\/\/([\w\-]+\.)?sevenload\.com\/videos\/[-\w\+\/=]+/i, /^http:\/\/([\w\-]+\.)?sevenload\.com\/shows\/.+/i],
        'facebook.com': [/^https?:\/\/(?:www\.)facebook\.com\/([^\/]+\/)*video\.php\?([^&]+&)*v=\d+/i],
        //'rutube.ru': [/^http:\/\/rutube\.ru\/tracks\/\d+\.html\?.*v=[a-f0-9]+/i],
        'mail.ru': [/^http:\/\/([a-z0-9_-]+\.)?video\.mail\.ru\/(.+\/)+\d+\.html/i, /^http:\/\/r\.mail\.ru\/\w+\/video\.mail\.ru\/(.+\/)+\d+\.html/i],
        'yandex.ru': [/^http:\/\/video\.yandex\.ru\/users\/[-\w,!\+]+\/view\/[-\w,!\+]+\/?/i],
        'rambler.ru': [/^http:\/\/vision\.rambler\.ru\/users\/[^\/\s]+\/\d+\/[-\w_\+!]+\/?/i],
        'smotri.com': [/^http:\/\/([a-z0-9_-]+\.)?smotri\.com\/video\/view\/\?.*id=v[0-9a-f]/i],
        'tvigle.ru': [/^http:\/\/(www\.)?tvigle\.ru\/channel\/\d+\?.*vid_id=\d+/i, /^http:\/\/(www\.)tvigle\.ru\/prg\/\d+\/\d+/i],
        'intv.ru': [/^http:\/\/(www\.)?intv\.ru\/(view|quickdl)\/\?.*film_id=\w+/i, /^http:\/\/(www\.)?intv\.ru\/v\/\w+/i],
        'yasee.ru': [/^http:\/\/([a-z0-9_-]+\.)?yasee\.ru\/video\/view\/\?.*id=v[0-9a-f]/i],
        'narod.tv': [/^http:\/\/(?:www\.)?narod\.tv\/\?.*vid=/i],
        'vkadre.ru': [/^http:\/\/(www\.)?vkadre\.ru\/videos\/\d+/i],
        'myvi.ru': [
          /^http:\/\/(www\.)?myvi\.ru\/([a-z][a-z]\/)?videodetail\.aspx\?.*video=/i,
          /^http:\/\/(www|kino|anime)\.myvi\.ru\/watch\/[\w\-]+/i
        ],
        '1tv.ru': [/^http:\/\/(www\.)?1tv\.ru(\:\d+)?\/newsvideo\/\d+/i, /^http:\/\/(www\.)?1tv\.ru(\:\d+)?\/news\/\w+\d+/i],
        'ntv.ru': [/^http:\/\/news\.ntv\.ru\/(\w+\/)?\d+\/video\/?/i],
        'vesti.ru': [/^http:\/\/(www\.)?vesti\.ru\/videos\?.*vid=\d+/i],
        'bibigon.ru': [/^http:\/\/(www\.)?bibigon\.ru\/videow\.html\?id=\d+/i, /^http:\/\/(www\.)?bibigon\.ru\/video\.html\?vid=\d+/i],
        'mreporter.ru': [/^http:\/\/(www\.)?mreporter\.ru\/reportermessages\!viewreport\.do[^\?]*\?.*reportid=\d+/i],
        'autoplustv.ru': [/^http:\/\/(www\.)?autoplustv\.ru\/494\/\?id=\d+/i],
        'russia.ru': [/^http:\/\/([\w\-]+\.)?russia\.ru\/video\/?/i],
        'amik.ru': [/^http:\/\/(www\.)?amik\.ru\/video\/vid\d+\.html/i, /^http:\/\/(www\.)?amik\.ru\/video\/vcid\d+\.html/i],
        'life.ru': [/^http:\/\/([\w+\-]+\.)?life\.ru\/video\/\d+/i]
      }
    },


    parseHref: function(href, search)
    {
      var res = [];
      res.push(href);

      var i = href.toLowerCase().indexOf('http://', 7);
      if(i > 7)
      {
        res.push(href.substring(i));
      }
      else if(search)
      {
        var h = search.match(/http%3a(%2f%2f|\/\/)[^\s\&\"\<\>]+/i);
        if(h && h.length > 0)
        {
          res.push(decodeURIComponent(h[0]));
        }
        else
        {
          var s = '';
          try
          {
            s = decodeURIComponent(search);
          }
          catch(err)
          {
          }

          if(s)
          {
            h = s.match(/((?:aHR0cDovL|aHR0cHM6Ly)[a-z0-9+\/=]+)/i);
            if(h && h.length > 1)
            {
              h = base64.decode(h[1]);
              if(h.search(/^https?:\/\//i) != -1)
                res.push(decodeURIComponent(h));
            }
          }
        }
      }

      return res;
    },


    href: function(a)
    {
      return a.getAttribute('href') || '';
    },


    getElementIndex: function(e)
    {
      var html = e.innerHTML;
      if(!html || html == ' ')
        return 1;

      var bg = e.style.backgroundImage;
      if(bg && bg != 'none')
        return 1;

      var c = e.getElementsByTagName('*');
      for(var i = 0; i < c.length; i++)
      {
        if(c[i].tagName == 'IMG')
          return 2;
        else
        {
          bg = c[i].style.backgroundImage;
          if(bg && bg != 'none')
            return 1;
        }
      }

      return 0;
    },


    run: function()
    {
      SaveFrom_Utils.embedDownloader.init();

      lm.sfref = lm.sfref.replace('{sfHelperName}', preference.sfHelperName);

      var prefFileHosting = !!preference.lmFileHosting;
      var prefMediaHosting = !!preference.lmMediaHosting;

      moduleState = 1;

      lm.linkRegExp = {};
      if(prefFileHosting)
      {
        for(var i in lm.re.filehosting)
          lm.linkRegExp[i] = lm.re.filehosting[i];
      }

      if(prefMediaHosting)
      {
        for(var i in lm.re.mediahosting)
          lm.linkRegExp[i] = lm.re.mediahosting[i];
      }


      var a = document.getElementsByTagName('a');
      if(lm.savefromLinkCount != a.length)
      {
        lm.savefromLinkCount = a.length;

        var found = {}, lastHref = '';

        for(var i = 0, len = a.length; i < len; i++)
        {
          var href = handleAnchor(a[i]);
          if(href)
          {
            var index = 0;
            var attr = a[i].getAttribute(lm.anchorIndexAttribute);
            if(attr === 0 || attr)
              index = parseInt(attr);
            else
            {
              index = lm.getElementIndex(a[i]);
              a[i].setAttribute(lm.anchorIndexAttribute, index);
            }

            if(found[href])
            {
              if(index < found[href].index)
              {
                found[href].elements = [a[i]];
                found[href].index = index;
                lastHref = href;
              }
              else if(index == found[href].index && href != lastHref)
              {
                found[href].elements.push(a[i]);
                lastHref = href;
              }
            }
            else
            {
              found[href] = {
                index: index,
                elements: [a[i]]
              };

              lastHref = href;
            }
          }
        }

        var count = 0;
        for(var i in found)
        {
          for(var j = 0, len = found[i].elements.length; j < len; j++)
          {
            var e = found[i].elements[j];
            count++;
            if(!e.getAttribute(lm.anchorAttribute))
              modifyLink(e, i);
          }
        }
      }



      function checkLink(link, domain)
      {
        if(!link)
          return false;

        if(link == window.location.href)
          return false;

        domain = SaveFrom_Utils.getTopLevelDomain(domain);
        if(!domain || !lm.linkRegExp[domain])
          return false;

        for(var i = 0; i < lm.linkRegExp[domain].length; i++)
        {
          if(link.search(lm.linkRegExp[domain][i]) != -1)
            return true;
        }

        return false;
      }


      function handleAnchor(obj)
      {
        var href = obj.href;
        if (typeof href === 'string' && href.search(/^https?:\/\/([\w\-]+\.)?savefrom\.net\//i) == -1) {
          var hrefArray = lm.parseHref(href, obj.search);

          if(hrefArray.length > 0)
          {
            if(lm.href(obj).indexOf('#') != 0 && checkLink(hrefArray[0], obj.hostname))
            {
              return hrefArray[0];
            }
            else if(hrefArray.length > 1)
            {
              for(var j = 1; j < hrefArray.length; j++)
              {
                var aTemp = document.createElement('a');
                aTemp.href = hrefArray[j];
                if(lm.href(aTemp).indexOf('#') != 0 && checkLink(hrefArray[j], aTemp.hostname))
                {
                  return hrefArray[j];
                }
              }
            }
          }
        }

        return '';
      }

      function modifyLink(obj, link)
      {
        if(!obj)
          return;

        obj.setAttribute(lm.anchorAttribute, '1');

        var box = document.createElement('span');
        box.setAttribute('style', 'padding: 0; margin: 0; margin-left: 5px;');
        box.addEventListener('click', function(e) {
          e.stopPropagation();
        });

        var parent = obj.parentNode;
        if(!parent)
          return;

        try
        {
          link = encodeURIComponent(link);
        }
        catch(err)
        {
          return;
        }

        var href = lm.pageUrl + '?url=' + link;
        if(lm.sfref)
          href += lm.sfref;

        // add button
        var a = document.createElement('a');
        a.href = href;
        a.target = '_blank';
        a.title = language.lmButtonTitle;

        a.style.backgroundImage = 'url('+lm.buttonSrc+')';
        a.style.backgroundRepeat = 'no-repeat';
        a.style.width = '16px';
        a.style.height = '16px';
        a.style.display = 'inline-block';

        a.addEventListener('click', function() {
          if ([1].indexOf(preference.cohortIndex) !== -1) {
            mono.sendMessage({action: 'trackCohort', category: 'mediahost', event: 'from', label: '%domain%'});
          }
        });

        for(var i in lm.linkStyle)
          a.style[i] = lm.linkStyle[i];

        if (obj.style.zIndex) {
          a.style.zIndex = obj.style.zIndex;
        }

        a.setAttribute(lm.anchorAttribute, '1');
        a.setAttribute(lm.anchorAttributeLink, '1');
        if(lm.linkText)
        {
          a.textContent = lm.linkText;
        }

        box.appendChild(a);

        if(lm.htmlAfter)
          box.textContent += lm.htmlAfter;


        if(obj.nextSibling)
          parent.insertBefore(box, obj.nextSibling);
        else
          parent.appendChild(box);
      }
    },
    changeState: function(state) {
      preference.lmFileHosting = state;
      preference.lmMediaHosting = state;
      moduleState = state;
      var btnList = document.querySelectorAll('a['+lm.anchorAttributeLink+']');
      for (var i = 0, item; item = btnList[i]; i++) {
        item = item.parentNode;
        item.parentNode.removeChild(item);
      }
      var dataAttrList = document.querySelectorAll(['*['+lm.anchorAttribute+']', '*['+lm.anchorIndexAttribute+']']);
      for (i = 0, item; item = dataAttrList[i]; i++) {
        item.removeAttribute(lm.anchorAttribute);
        item.removeAttribute(lm.anchorIndexAttribute);
      }
      lm.savefromLinkCount = -1;

      if (state) {
        lm.run();
      }
    }
  };


  // Base64
  var base64 = {
    key: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",

    decode: function(text)
    {
      var res = '';
      var c1, c2, c3, e1, e2, e3, e4;
      var i = 0;

      text = text.replace(/[^A-Za-z0-9\+\/\=]/g, '');

      while(i < text.length)
      {
        e1 = base64.key.indexOf(text.charAt(i++));
        e2 = base64.key.indexOf(text.charAt(i++));
        e3 = base64.key.indexOf(text.charAt(i++));
        e4 = base64.key.indexOf(text.charAt(i++));

        c1 = (e1 << 2) | (e2 >> 4);
        c2 = ((e2 & 15) << 4) | (e3 >> 2);
        c3 = ((e3 & 3) << 6) | e4;

        res += String.fromCharCode(c1);

        if(e3 != 64)
          res += String.fromCharCode(c2);
        if(e4 != 64)
          res += String.fromCharCode(c3);
      }

      return res;
    }
  };

  var ummyRadioBanner = {};
  ummyRadioBanner.langList = {
    ru: {
      title: 'Слушай любимое радио онлайн!',
      more: 'Подробнее',
      close: 'Закрыть'
    },
    en: {
      title: 'The Best Online Radio Player!',
      more: 'More',
      close: 'Close'
    }
  };
  ummyRadioBanner.language = {};
  ummyRadioBanner.getType = function() {
    var hostname = location.hostname;
    var list = [
      '101.ru',
      'lovi.fm',
      'radiopotok.ru',
      'tunein.com',
      'radiotuna.com',
      'live365.com',
      'internet-radio.com',
      'streema.com',
      'ivoox.com',
      'webmaster-gratuit.com',
      'radio.de',
      'jango.com',
      'russiafm.net',
      'moskva.fm',
      'radiorecord.ru',
      'radio.com',
      'guia-radio.com',
      'frequence-radio.com',
      'lafrance.fm',
      'ecouter-en-direct.com',
      'radioonline.fm',
      'internetradiouk.com',
      'england.fm',
      'delicast.com'
    ];
    var dot_pos = hostname.indexOf('.');
    while (dot_pos !== -1) {
      if (list.indexOf(hostname) !== -1) {
        return hostname;
      }
      hostname = hostname.substr(dot_pos + 1);
      dot_pos = hostname.indexOf('.');
    }
  };
  ummyRadioBanner.run = function() {
    mono.sendMessage('getUmmyRadioLogo', function(response) {
      ummyRadioBanner.icon = response;
      mono.storage.get('uRadio', function(storage) {
        storage.uRadio = storage.uRadio || {};
        ummyRadioBanner.add(storage.uRadio);
      });
    });
  };
  ummyRadioBanner.addInList = function(storage, type, isClose) {
    if (isClose) {
      storage.siteList[type]++;
    } else {
      storage.siteList[type] = 3;
    }
    mono.storage.set({uRadio: storage});
  };
  ummyRadioBanner.add = function(storage) {
    if (mono.isOpera) {
      return;
    }

    var vid;
    if (['ru', 'uk'].indexOf(language.lang) !== -1) {
      this.language = this.langList['ru'];
      vid = 420;
    } else {
      this.language = this.langList['en'];
      vid = 421;
    }

    var type = this.getType();
    if (!type) return;

    if (storage.siteList === undefined) {
      storage.siteList = {};
    }
    if (storage.siteList[type] === undefined) {
      storage.siteList[type] = 0;
    }

    if (storage.siteList[type] >= 3) {
      return;
    }

    var body;
    var hide = function() {
      body.style.opacity = 0;
      setTimeout(function() {
        body.parentNode.removeChild(body);
      }, 1000);
    };
    document.body.appendChild(
      body = mono.create('div', {
        class: 'sf-ummy-banner',
        style: {
          position: 'fixed',
          bottom: '10px',
          width: '100%',
          textAlign: 'center',
          display: 'block',
          opacity: 0,
          zIndex: 1000
        },
        append: mono.create('div', {
          style: {
            display: 'inline-block',
            width: '524px',
            height: '55px',
            backgroundColor: 'rgba(0,0,0,0.5)',
            fontFamily: 'Tahoma, Geneva, sans-serif',
            borderRadius: '3px',
            textAlign: 'left',
            position: 'relative'
          },
          append: [
            mono.create('div', {
              style: {
                position: 'absolute',
                width: '45px',
                height: '45px',
                background: 'url('+ummyRadioBanner.icon+') center no-repeat',
                left: '6px',
                top: '5px'
              }
            }),
            mono.create('span', {
              style: {
                position: 'absolute',
                fontSize: '20px',
                color: '#fff',
                left: '63px',
                lineHeight: '55px',
                verticalAlign: 'middle',
                fontWeight: 'normal',
                fontFamily: 'Tahoma, Geneva, sans-serif',
                cssFloat: 'none',
                padding: 'auto'
              },
              text: this.language.title
            }),
            mono.create('a', {
              href: 'http://radionline.fm/' + '?VID=' + vid,
              target: '_blank',
              style: {
                position: 'absolute',
                width: '130px',
                height: '29px',
                lineHeight: '29px',
                borderRadius: '3px',
                color: '#fff',
                top: '13px',
                left: '377px',
                textAlign: 'center',
                backgroundColor: '#f94346',
                cursor: 'pointer',
                textDecoration: 'none',
                letterSpacing: 'normal',
                fontSize: '12px',
                padding: 'auto'
              },
              append: mono.create('span', {
                style: {
                  cssFloat: 'none',
                  color: '#fff',
                  fontSize: '12px',
                  padding: 'auto',
                  fontFamily: 'Tahoma, Geneva, sans-serif'
                },
                text: this.language.more
              }),
              on: [
                ['click', function() {
                  this.addInList(storage, type, 0);
                  hide();
                }.bind(this)]
              ]
            }),
            mono.create('span', {
              class: 'sf-close',
              style: {
                display: 'block',
                position: 'absolute',
                color: '#ccc',
                top: '2px',
                right: '3px',
                fontSize: '8px',
                cursor: 'pointer',
                width: '10px',
                height: '10px',
                textAlign: 'right',
                fontFamily: 'Tahoma, Geneva, sans-serif',
                cssFloat: 'none',
                padding: 'auto'
              },
              on: [
                ['click', function(e) {
                  e.preventDefault();
                  this.addInList(storage, type, 1);
                  hide();
                }.bind(this)]
              ],
              text: 'X',
              title: this.language.close
            }),
            mono.create('style', {
              text: '.sf-ummy-banner a:hover {color: #fff !important; background-color: #F7292C !important;}' +
              '.sf-ummy-banner .sf-close:hover {color: #fff !important;}' +
              '.sf-ummy-banner {transition: opacity 0.2s}'
            })
          ]
        })
      })
    );
    setTimeout(function() {
      body.style.opacity = 1;
    }, 100);
  };
}, null, function syncIsActive() {
  "use strict";
  if (mono.isIframe()) {
    return false;
  }

  if (mono.isSafari || mono.isFF || mono.isGM) {
    if (mono.checkUrl(document.URL, [
        "ftp://*",
        "file://*",
        "http://google.*/*",
        "http://*.google.*/*",
        "https://google.*/*",
        "https://*.google.*/*",
        "http://acidtests.org/*",
        "http://*.acidtests.org/*",
        "http://savefrom.net/*",
        "http://*.savefrom.net/*",
        "http://youtube.com/*",
        "http://*.youtube.com/*",
        "https://youtube.com/*",
        "https://*.youtube.com/*",
        "http://vimeo.com/*",
        "http://*.vimeo.com/*",
        "https://vimeo.com/*",
        "https://*.vimeo.com/*",
        "http://dailymotion.*/*",
        "http://*.dailymotion.*/*",
        "https://dailymotion.*/*",
        "https://*.dailymotion.*/*",
        "http://vk.com/*",
        "http://*.vk.com/*",
        "http://vkontakte.ru/*",
        "http://*.vkontakte.ru/*",
        "https://vk.com/*",
        "https://*.vk.com/*",
        "https://vkontakte.ru/*",
        "https://*.vkontakte.ru/*",
        "http://odnoklassniki.ru/*",
        "http://*.odnoklassniki.ru/*",
        "http://my.mail.ru/*",
        "https://my.mail.ru/*",
        "http://ok.ru/*",
        "http://*.ok.ru/*",
        "http://soundcloud.com/*",
        "http://*.soundcloud.com/*",
        "https://soundcloud.com/*",
        "https://*.soundcloud.com/*",
        "http://facebook.com/*",
        "http://*.facebook.com/*",
        "https://facebook.com/*",
        "https://*.facebook.com/*",
        "https://instagram.com/*",
        "http://instagram.com/*",
        "https://*.instagram.com/*",
        "http://*.instagram.com/*",
        "https://rutube.ru/*",
        "http://rutube.ru/*",
        "https://*.rutube.ru/*",
        "http://*.rutube.ru/*"
      ])) {
      return false;
    }
  }

  return true;
});

(typeof mono === 'undefined') && (mono = {loadModule: function() {this.loadModuleStack.push(arguments);},loadModuleStack: []});

mono.loadModule('odnoklassniki', function(moduleName, initData) {
  "use strict";

  var language = initData.getLanguage;
  var preference = initData.getPreference;
  var moduleState = preference.moduleOdnoklassniki ? 1 : 0;
  var allowDownloadMode = mono.isChrome || mono.isFF || (mono.isGM && mono.isTM);

  mono.onMessage(function(message, cb){
    if (message.action === 'getModuleInfo') {
      if (message.url !== location.href) return;
      return cb({state: moduleState, moduleName: moduleName});
    }
    if (message.action === 'changeState') {
      if (moduleName !== message.moduleName) {
        return;
      }
      return odnoklassniki.changeState(message.state);
    }
    if (!moduleState) {
      return;
    }
    if (message.action === 'updateLinks') {
      updateLinks();
    }
    if (message.action === 'downloadMP3Files') {
      if (allowDownloadMode) {
        audio.downloadMP3Files();
      } else {
        audio.showListOfAudioFiles(false);
      }
    }
    if (message.action === 'downloadPlaylist') {
      audio.showListOfAudioFiles(true);
    }
  });

  if (moduleState) {
    mono.asyncCall(function() {
      odnoklassniki.run();
    });
  }

  var odnoklassniki = {
    linkCache: {},
    contextMenu: null,
    videoToken: null,
    run: function() {
      moduleState = 1;

      audio.getJsSessionId();
      videoFeed.injectStyle();
      photo.injectStyle();

      if (SaveFrom_Utils.mutationWatcher.isAvailable()) {
        return odnoklassniki.mutationMode.enable();
      }

      audio.showLinks();
      videoFeed.enable();
      mono.onUrlChange(function(url, oldUrl) {
        video.catchPopup();
      }, 1);
    },
    changeState: function(state) {
      moduleState = state;
      video.rmBtn();
      audio.disable();
      photo.rmCurrentPhotoBtn();
      mono.clearUrlChange();
      videoFeed.disable();
      videoFeed.rmBtn();
      odnoklassniki.hideMenu();
      odnoklassniki.mutationMode.stop();
      odnoklassniki.clearCache();
      if (state) {
        odnoklassniki.run();
      }
    },
    hideMenu: function() {
      if (odnoklassniki.contextMenu) {
        odnoklassniki.contextMenu.hide();
        odnoklassniki.contextMenu = null;
      }
    },
    clearCache: function() {
      var linkCache = odnoklassniki.linkCache;
      for (var key in linkCache) {
        delete linkCache[key];
      }
    },
    mutationMode: {
      observer: null,
      stop: function() {
        if (this.observer) {
          this.observer.stop();
        }

        ['sfSkip'].forEach(function(attr) {
          var dataAttr = mono.dataAttr2Selector(attr);
          var dataAttrList = document.querySelectorAll('['+dataAttr+']');
          for (var i = 0, item; item = dataAttrList[i]; i++) {
            item.removeAttribute(dataAttr);
          }
        });
      },
      wrapOnPhotoOver: function() {
        mono.off(this, 'mouseenter', odnoklassniki.mutationMode.wrapOnPhotoOver);

        if (!moduleState) {
          return;
        }

        photo.addCurrentDlBtn(this);
      },
      wrapVideoFeedOnImgOver: function() {
        mono.off(this, 'mouseenter', odnoklassniki.mutationMode.wrapVideoFeedOnImgOver);

        if (!moduleState) {
          return;
        }

        videoFeed.onImgOver.call(this);
      },
      wrapAudioOnMouseOver: function() {
        if (!moduleState) {
          return;
        }

        audio.onMouseOver.apply(this, arguments);
      },
      wrapAudioOnMouseOut: function() {
        if (!moduleState) {
          return;
        }

        audio.onMouseOut.apply(this, arguments);
      },
      enable: function() {
        if (this.observer) {
          return this.observer.start();
        }

        var _this = this;

        this.observer = SaveFrom_Utils.mutationWatcher.run({
          callback: function(summaryList) {
            var summary, n, i, node;

            for (i = 0; i < 3; i++) {
              summary = summaryList[i];
              for (n = 0; node = summary.added[n]; n++) {
                if (node.sfSkip > 0) {
                  continue;
                }
                node.sfSkip = '1';

                mono.on(node, 'mouseenter', _this.wrapAudioOnMouseOver);
                mono.on(node, 'mouseleave', _this.wrapAudioOnMouseOut);
              }
            }

            if (!mono.isSafari && !mono.isOpera) {
              summary = summaryList[3];
              for (n = 0; node = summary.added[n]; n++) {
                if (node.dataset.sfSkip > 0) {
                  continue;
                }
                node.dataset.sfSkip = '1';

                mono.on(node, 'mouseenter', _this.wrapOnPhotoOver);
              }
            }

            summary = summaryList[4];
            for (n = 0; node = summary.added[n]; n++) {
              if (node.dataset.sfSkip > 0) {
                continue;
              }
              node.dataset.sfSkip = '1';

              var parent = SaveFrom_Utils.getParentByClass(node, 'vp_video');
              if (!parent) {
                return;
              }

              var info = video.getPlayerOptions(node);
              if (info) {
                video.appendLinkUnderVideo(parent.parentNode, info);
              }
            }

            for (i = 5; i < 8; i++) {
              summary = summaryList[i];
              for (n = 0; node = summary.added[n]; n++) {
                if (node.dataset.sfSkip > 0) {
                  continue;
                }
                node.dataset.sfSkip = '1';

                mono.on(node, 'mouseenter', _this.wrapVideoFeedOnImgOver);
              }
            }

            summary = summaryList[8];
            for (n = 0; node = summary.removed[n]; n++) {
              mono.onRemoveListener(node);
            }
          },
          queries: [
            {css: '.m_portal_track', is: 'added'},
            {css: '.m_c_tr', is: 'added'},
            {css: '.mus-tr_i', is: 'added'},
            {css: '#photo-layer_photo', is: 'added'},
            {css: '.vp_video .vid-card_cnt', is: 'added'},
            {css: '.d_comment_text_w img', is: 'added'},
            {css: '.video-card .video-card_img-w img', is: 'added'},
            {css: '.vid-card_cnt img', is: 'added'},
            {css: '.' + mono.onRemoveClassName, is: 'removed'}
          ]
        });
      }
    }
  };

  var downloadLinkClassName = 'savefrom_ok_download';

  var updateLinks = function() {
    odnoklassniki.clearCache();
    removeDownloadLinks();
    audio.getJsSessionId();
    video.catchPopup();
  };

  var createTextLink = function(href, text, blank) {
    if(blank == undefined)
      blank = true;

    var a = document.createElement('a');
    a.href = href;
    a.className = downloadLinkClassName;
    a.textContent = text;

    if(blank)
      a.setAttribute('target', '_blank');

    return a;
  };

  var removeDownloadLinks = function () {
    var selector = '.' + downloadLinkClassName;

    var e = document.querySelectorAll(selector);
    for(var i = e.length-1; i >= 0; i--)
      e[i].parentNode.removeChild(e[i]);
  };

  ///////////////////////////////////////////////////////////////////
  //  AUDIO

  var audio = {
    downloadIdPrefix: 'savefrom_ok_audio_download_',
    infoIdPrefix: 'savefrom_ok_audio_info_',
    lastRow: null,
    lastRowCandidate: null,
    timer: 0,
    jsessionId: '',
    scriptNode: null,
    cache: {},
    ajaxTimer: {},


    showRowElements: function(row, show, force)
    {
      if(!row)
        return;

      var node = row.querySelectorAll('div.' + downloadLinkClassName);

      if(show && (!node || node.length == 0))
      {
        if(!audio.showRowLinks(row))
          return;

        node = row.querySelectorAll('div.' + downloadLinkClassName);
      }

      if(node && node.length > 0)
      {
        var d = show ? '' : 'none';
        for(var i = 0; i < node.length; i++)
        {
          node[i].style.display = d;
        }
      }
    },


    getNodeTrackId: function(node)
    {
      var query = node.getAttribute('data-query');
      if(query)
      {
        try
        {
          query = JSON.parse(query);
          if(query && query.trackId)
            return query.trackId;
        }
        catch(Err)
        {
          return null;
        }
      }

      return null;
    },


    getTrackId: function(parent)
    {
      if(!parent)
        return null;

      var trackId = audio.getNodeTrackId(parent);
      if(trackId)
      {
        var links = {};
        links[trackId] = parent;
        return links;
      }

      var id = parent.id;
      if(id)
      {
        var hashPos = id.indexOf('#');
        if (hashPos !== -1) {
          id = id.substr(hashPos + 1);
        }
        trackId = SaveFrom_Utils.getMatchFirst(id, /^\w+_(\d+)$/i);
        if (!trackId) {
          if (id.indexOf('GROUP_FEED') !== -1) {
            trackId = id.substr( id.lastIndexOf('_') + 1 );
          }
        }
        if(trackId)
        {
          var links = {};
          links[trackId] = parent;
          return links;
        }
      }

      return null;
    },


    showRowLinks: function(row)
    {
      var links = audio.getTrackId(row);
      for(var i in links)
      {
        if(audio.handleRow(i, links[i]))
          return true;
      }

      return false;
    },

    disable: function() {
      mono.off(document, 'mouseenter', audio.onMouseOver, true);
      mono.off(document, 'mouseleave', audio.onMouseOut, true);

      audio.lastRowCandidate = null;
      audio.lastRow = null;
      var dlBtn = document.querySelectorAll('.'+downloadLinkClassName);
      for (var i = 0, item; item = dlBtn[i]; i++) {
        item.parentNode.removeChild(item);
      }
    },

    getJsSessionId: function() {
      "use strict";
      var url = location.protocol + '//' +  location.host + '/web-api/music/conf';
      mono.ajax({
        type: 'POST',
        url: url,
        data: '_',
        dataType: 'json',
        success: function(data) {
          if (data && data.sid) {
            audio.jsessionId = data.sid;
          }
        }
      });
    },

    showLinks: function() {
      "use strict";
      audio.cache = {};

      for(var i in audio.ajaxTimer) {
        window.clearTimeout(audio.ajaxTimer[i]);
      }

      audio.ajaxTimer = {};

      mono.off(document, 'mouseenter', audio.onMouseOver, true);
      mono.off(document, 'mouseleave', audio.onMouseOut, true);

      mono.on(document, 'mouseenter', audio.onMouseOver, true);
      mono.on(document, 'mouseleave', audio.onMouseOut, true);
    },


    getLink: function(trackId)
    {
      if(!trackId || !audio.jsessionId)
        return;

      audio.ajaxTimer[trackId] = window.setTimeout(function(){
        delete audio.ajaxTimer[trackId];
        audio.deleteLink(trackId);
      }, 30000);

      mono.sendMessage({
        action: 'getOdnoklassnikiAudioLinks',
        url: location.href,
        trackId: trackId,
        jsessionId: audio.jsessionId
      }, function(response){
        audio.setLink(response.trackId, response.data);
      });
    },


    onMouseOver: function(event)
    {
      if (!audio.jsessionId) {
        return;
      }

      var node = event.target;

      if (node.nodeType !== 1) {
        return;
      }

      if (!node.classList.contains('m_portal_track') &&
        !node.classList.contains('m_c_tr') &&
        !node.classList.contains('mus-tr_i')
      ) {
        return;
      }

      var row = node;
      if(row) {
        audio.lastRowCandidate = row;
        window.clearTimeout(audio.timer);

        if(audio.lastRow == row)
          return;

        audio.timer = window.setTimeout(function(){
          audio.showRowElements(audio.lastRow, false);
          audio.lastRow = row;
          audio.lastRowCandidate = null;
          audio.showRowElements(audio.lastRow, true);
        }, 250);
      }
    },


    onMouseOut: function(event)
    {
      if(!audio.lastRow && !audio.lastRowCandidate) {
        return;
      }

      var node = event.target;
      if(SaveFrom_Utils.isParent(node, audio.lastRow) ||
        SaveFrom_Utils.isParent(node, audio.lastRowCandidate))
      {
        window.clearTimeout(audio.timer);
        audio.timer = window.setTimeout(function(){
          audio.showRowElements(audio.lastRow, false);
          audio.lastRow = null;
          audio.lastRowCandidate = null;
        }, 1000);
      }
      node = null;
    },


    handleRow: function(trackId, row)
    {
      if(!trackId || !row)
        return false;

      var parent = row;
      parent.style.position = 'relative';

      var duration = row.querySelector('.m_c_duration, .m_portal_duration');

      var box = document.createElement('div');
      box.className = downloadLinkClassName;

      var right = 40;
      var mmpcw = document.getElementById('mmpcw');
      if (mmpcw && mmpcw.contains(row)) {
        right = 65;
      }

      SaveFrom_Utils.setStyle(box, {
        color: '#fff',
        background: '#46aa19',
        border: '1px solid #337d12',
        borderRadius: '3px',
        padding: '1px 5px',
        position: 'absolute',
        right: right + 'px',
        top: '50%',
        lineHeight: '15px',
        opacity: 0,
        zIndex: 9999,
        cursor: 'pointer'
      });

      box.addEventListener('click', audio.onBoxClick, false);

      var title = audio.getTitle(trackId, row);

      var link1 = createTextLink('#', '...');
      link1.id = audio.downloadIdPrefix + trackId;
      link1.title = language.downloadTitle;
      if(duration)
      {
        link1.setAttribute('data-savefrom-helper-duration',
          audio.secondsFromDurationNode(duration));
      }

      if(title)
      {
        title += '.mp3';
        link1.setAttribute('download', mono.fileName.modify(title));
      }

      SaveFrom_Utils.setStyle(link1, {
        color: '#fff',
        fontWeight: 'normal'
      });

      link1.addEventListener('click', audio.onDownloadLinkClick, false);

      box.appendChild(link1);
      parent.appendChild(box);

      if(audio.cache[trackId])
        audio.setLinkFromCache(trackId, link1);
      else
        audio.getLink(trackId);

      box.style.marginTop = '-' + (box.offsetHeight / 2) + 'px';
      box.style.opacity = '1';

      var close = document.createElement('span');
      close.textContent = String.fromCharCode(215);
      close.title = language.close;
      SaveFrom_Utils.setStyle(close, {
        color: '#fff',
        fontFamily: 'Tahoma,Helvetica,sans-serif',
        fontSize: '15px',
        marginLeft: '7px',
        opacity: '.7',
        cursor: 'pointer'
      });
      close.addEventListener('click', audio.onCloseBtnClick, false);
      box.appendChild(close);

      return true;
    },


    onBoxClick: function(event)
    {
      event.preventDefault();
      event.stopPropagation();

      var a = this.querySelector('a.' + downloadLinkClassName);
      if(a) {
        mono.trigger(a, 'click', {cancelable: true});
        return false;
      }

      this.style.display = 'none';
      return false;
    },


    onDownloadLinkClick: function(event)
    {
      if(event.button == 2)
        return false;

      event.stopPropagation();

      if(this.href == '#')
      {
        event.preventDefault();
        return false;
      }

      SaveFrom_Utils.downloadOnClick(event);

      if ([1].indexOf(preference.cohortIndex) !== -1) {
        var mmpcw = document.getElementById('mmpcw');
        if (!mmpcw || !mmpcw.contains(this)) {
          mono.sendMessage({action: 'trackCohort', category: 'ok', event: 'click', label: 'music-feed'});
        } else {
          mono.sendMessage({action: 'trackCohort', category: 'ok', event: 'click', label: 'music-list'});
        }
      }
      return false;
    },


    onCloseBtnClick: function(event)
    {
      if(event.button == 2)
        return true;

      event.preventDefault();
      event.stopPropagation();

      var parent = SaveFrom_Utils.getParentByClass(this, downloadLinkClassName);
      if(parent)
        parent.style.display = 'none';

      return false;
    },


    deleteLink: function(trackId, node)
    {
      if(!node && trackId)
        node = document.getElementById(audio.downloadIdPrefix + trackId);

      if(!node)
        return;

      var box = node.parentNode;
      if (!box) {
        return;
      }
      box.parentNode.removeChild(box);
    },


    getHash: function(src, magic)
    {
      if(!magic)
        magic = [4,3,5,6,1,2,8,7,2,9,3,5,7,1,4,8,8,3,4,3,1,7,3,5,9,8,1,4,3,7,2,8];

      var a = [];
      for(var i = 0; i < src.length; i++)
      {
        a.push(parseInt('0x0' + src.charAt(i)));
      }

      src = a;

      var res = [];
      src = src.slice(0);
      src[32] = src[31];
      var sum = 0;
      var i = 32;
      while(i-- > 0)
        sum += src[i];

      for(var x = 0; x < 32; x++)
        res[x] = Math.abs(sum - src[x + 1] * src[x] * magic[x]);

      return res.join('');
    },


    setLinkFromCache: function(trackId, node)
    {
      if(!audio.cache[trackId])
        return false;

      if(!node)
        node = document.getElementById(audio.downloadIdPrefix + trackId);

      if(!node)
        return;

      node.href = audio.cache[trackId].url;
      node.textContent = '';
      if(audio.cache[trackId].downloadAttr)
        node.setAttribute('download', audio.cache[trackId].downloadAttr);

      var icon = mono.create('div', {
        style: {
          display: 'inline-block',
          width: '16px',
          height: '16px',
          verticalAlign: 'middle',
          opacity: '0.9',
          background: 'url('+ SaveFrom_Utils.svg.getSrc('download', '#ffffff') +') center no-repeat'
        }
      });
      node.appendChild(icon);

      var info = document.createTextNode(audio.cache[trackId].info);

      if(node.nextSibling)
        node.parentNode.insertBefore(info, node.nextSibling);
      else
        node.parentNode.appendChild(info);

      return true;
    },


    setLink: function(trackId, data, clientHash)
    {
      if(!trackId)
        return;

      window.clearTimeout(audio.ajaxTimer[trackId]);

      var node = document.getElementById(audio.downloadIdPrefix + trackId);
      if(!node)
        return;

      if(audio.setLinkFromCache(trackId, node))
        return;

      if(!data || !data.play)
      {
        audio.deleteLink(trackId, node);
        node.textContent = '?';
        return;
      }

      if(clientHash === undefined)
      {
        var md5 = data.play.match(/(?:\?|&)md5=([\da-f]{32})/i);
        if(md5 && md5.length > 1) {
          md5 = md5[1];
          try {
            md5 = SaveFrom_Utils.md5(md5 + 'secret');
            audio.setLink(trackId, data, audio.getHash(md5));
            return;
          } catch(err) {}
        }

        audio.deleteLink(trackId, node);
        return;
      }

      var size = SaveFrom_Utils.getMatchFirst(data.play, /(?:\?|&)size=(\d+)/i);
      if(!size)
        return;

      audio.cache[trackId] = {};
      audio.cache[trackId].url = data.play + (clientHash ? '&clientHash=' + clientHash : '');

      var info = ' (' + SaveFrom_Utils.sizeHuman(size, 2);

      var duration = node.getAttribute('data-savefrom-helper-duration');
      if(data.track)
      {
        if(data.track.duration)
          duration = data.track.duration;

        if(data.track.ensemble && data.track.name)
        {
          var title = data.track.ensemble + ' - ' + data.track.name;
          audio.cache[trackId].title = title;
          audio.cache[trackId].downloadAttr = mono.fileName.modify(title + '.mp3');
        }
      }

      if(size && duration)
      {
        duration = parseInt(duration);
        if(isNaN(duration))
        {
          delete audio.cache[trackId];
          return;
        }

        var bitrate = Math.floor((size / duration) / 125) + ' ' + language.kbps;
        info += ' ~ ' + bitrate;
      }

      info += ')';
      audio.cache[trackId].info = info;

      audio.setLinkFromCache(trackId, node);
    },


    getTitle: function(id, row)
    {
      if(!id || !row)
        return '';

      var name = '';

      var performer = row.querySelector('.m_c_artist, .mus-tr_artist, .m_portal_c_artist');
      var title = row.querySelector('.m_track_source, .mus-tr_song, .m_portla_track_name');

      if(performer)
      {
        performer = performer.textContent;
        if(performer)
          name += performer.trim();
      }

      if(title)
      {
        title = title.textContent;
        if(title)
        {
          if(name)
            name += ' - ';

          name += title.trim();
        }
      }

      if(name)
        return name.replace(/\<a\s+[^\>]+\>/ig, '').replace(/\<\/a\>/ig, '');

      return '';
    },


    secondsFromDurationNode: function(node)
    {
      if(!node)
        return 0;

      var text = node.textContent;
      if(!text)
        return 0;

      var m = text.match(/^(?:\s*(\d+)\s*\:)?\s*(\d+)\s*\:\s*(\d+)/);
      if(m && m.length > 3)
      {
        if(!m[1])
          m[1] = 0;

        return parseInt(m[1]) * 3600 + parseInt(m[2]) * 60 + parseInt(m[3]);
      }

      return 0;
    },

    getPlaylistName: function(container) {
      if (container === document) return;

      var title = container.querySelector('.mus_h2_tx');
      if (!title) return;
      return mono.fileName.modify(title.textContent) || undefined;
    },

    elIsHidden: function isHidden(el) {
      return (el.offsetParent === null)
    },

    getLayer: function() {
      var layer = document.getElementById('mmpcw');
      if (!layer) {
        return;
      }
      if (layer.classList.contains('__hidden')) {
        return;
      }
      layer = layer.querySelector('div.m_c_s[aria-hidden="false"]');
      if (!layer || audio.elIsHidden(layer)) {
        return;
      }
      return layer;
    },

    getPopup: function(title, type, onClose) {
      var template = SaveFrom_Utils.playlist.getInfoPopupTemplate();

      var progressEl;
      mono.create(template.textContainer, {
        append: [
          !title ? undefined : mono.create('p', {
            text: title,
            style: {
              color: '#0D0D0D',
              fontSize: '20px',
              marginBottom: '11px',
              marginTop: '13px'
            }
          }),
          progressEl = mono.create('p', {
            text: '',
            style: {
              color: '#868686',
              fontSize: '14px',
              lineHeight: '24px'
            }
          })
        ]
      });

      var popupEl = SaveFrom_Utils.popupDiv(template.body, 'sf_progress_popup', undefined, undefined, onClose);

      var setState = function(state) {
        if (setState.state === state) {
          return;
        }
        setState.state = state;

        template.buttonContainer.style.display = 'none';
        progressEl.style.display = 'none';
        mono.sendMessage({action: 'getWarningIcon', type: type, color: '#77D1FA'}, function(icon) {
          template.icon.style.backgroundImage = 'url('+icon+')';
        });
        if (state === 'progress') {
          progressEl.style.display = 'block';
        }
        if (state === 'error') {
          mono.sendMessage({action: 'getWarningIcon', type: type, color: '#AAAAAA'}, function(icon) {
            template.icon.style.backgroundImage = 'url('+icon+')';
          });
          progressEl.style.display = 'block';
        }
      };

      return {
        onPrepare: function(text) {
          setState('progress');
          progressEl.textContent = text;
        },
        onProgress: function(count, max) {
          progressEl.textContent = language.vkFoundFiles.replace('%d', count) + ' ' + language.vkFoundOf + ' ' + max;
        },
        onReady: function() {
          mono.trigger(popupEl, 'kill');
        },
        onError: function(text) {
          setState('error');
          progressEl.textContent = text;
        }
      }
    },

    getAudioLinksViaAPI: function(trackIdList, onProgress, cb) {
      var abort = false;
      var trackList = [];
      var len = trackIdList.length;
      var next = function() {
        if (abort) {
          return;
        }
        var trackIdArr = trackIdList.splice(0, 10);
        if (trackIdArr.length === 0) {
          return cb(trackList);
        }

        mono.sendMessage({
          action: 'getOkAudioListLinks',
          trackIdArr: trackIdArr,
          jsessionId: audio.jsessionId
        }, function(responseList){
          if (Array.isArray(responseList)) {
            for (var i = 0, item; item = responseList[i]; i++) {
              if (typeof item.play !== 'string' || typeof item.track !== 'object') continue;

              var url = item.play;
              var md5 = url.match(/(?:\?|&)md5=([\da-f]{32})/i);
              if (!md5) continue;

              var title;
              if (item.track.name) {
                title = item.track.name;
              }
              if (item.track.ensemble) {
                title = item.track.ensemble + (title ? ' - ' + title : '');
              }
              if (!title) {
                title = 'noname';
              }

              md5 = md5[1];
              try {
                md5 = SaveFrom_Utils.md5(md5 + 'secret');
                var hash = audio.getHash(md5);

                url += '&clientHash=' + hash;

                trackList.push({
                  url: url,
                  duration: item.track.duration || 0,
                  title: title,
                  filename: mono.fileName.modify(title) + '.mp3'
                });
              } catch(err) {}
            }
          }
          onProgress(len - trackIdList.length, len);
          next();
        });
      };
      next();

      return {
        abort: function() {
          abort = true;
        }
      }
    },

    getAudioListLinksPopup: function(trackIdList, title, cb) {
      var process;
      var popup = this.getPopup(title, 'audio', function onClose() {
        if (process) {
          process.abort();
        }
      });
      var _cb = function(links) {
        if (links.length === 0) {
          popup.onError(language.vkMp3LinksNotFound);
          return;
        }
        popup.onReady();

        cb(links);
      }.bind(this);

      popup.onPrepare(language.download+' ...');

      process = this.getAudioLinksViaAPI(trackIdList, popup.onProgress, _cb);
    },

    getAudioLinks: function(container, title, cb) {
      var rowList = container.querySelectorAll(['.m_portal_track', '.m_c_tr', '.mus-tr_i']);
      var trackIdList = [];
      for (var i = 0, row; row = rowList[i]; i++) {
        var trackIdObj = audio.getTrackId(row);
        for (var trackId in trackIdObj) {
          trackIdList.push(trackId);
        }
      }
      this.getAudioListLinksPopup(trackIdList, title, cb);
    },

    downloadMP3Files: function() {
      var container = audio.getLayer() || document;
      var title = audio.getPlaylistName(container);
      audio.getAudioLinks(container, title, function(trackList) {
        SaveFrom_Utils.downloadList.showBeforeDownloadPopup(trackList, {
          type: 'audio',
          folderName: title
        });
      });
    },

    showListOfAudioFiles: function(showPlaylist) {
      var container = audio.getLayer() || document;
      var title = audio.getPlaylistName(container);
      audio.getAudioLinks(container, title, function(trackList) {
        if(trackList.length) {
          if(showPlaylist) {
            SaveFrom_Utils.playlist.popupPlaylist(trackList, title, true);
          } else {
            SaveFrom_Utils.playlist.popupFilelist(trackList);
          }
          return;
        }

        alert(language.vkMp3LinksNotFound);
      });
    }
  };

  //  /AUDIO
  ///////////////////////////////////////////////////////////////////



  ///////////////////////////////////////////////////////////////////
  //  VIDEO

  var video = {
    requestMobileToken: function(response, cb) {
      var host = null;
      response.links.some(function(item) {
        var hostname = item.url.match(/\/\/([^/]+)/);
        hostname = hostname && hostname[1];
        if (hostname) {
          host = hostname;
          return true;
        }
      });
      SaveFrom_Utils.bridge({
        args: [host],
        func: function(host, cb) {
          var cookie = document.cookie;
          var vdsig = cookie && cookie.match(/vdsig=([^;]+);/);
          vdsig = vdsig && vdsig[1];
          if (vdsig) {
            return cb({vtkn: vdsig});
          }

          host = host || 'vd4.mycdn.me';
          var xhr = new XMLHttpRequest();
          xhr.open('POST', 'http://'+host+'/usr_login', true);
          xhr.withCredentials = true;
          xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
          xhr.onreadystatechange = function() {
            if (xhr.readyState === 4 && xhr.status === 200) {
              var data = null;
              try {
                data = JSON.parse(xhr.responseText);
              } catch(e){}

              return cb(data);
            }
          };
          xhr.send();
        },
        cb: function(data) {
          if (!data || !data.vtkn) {
            return cb();
          }

          if (data.ttl) {
            data.expire = Date.now() + data.ttl * 1000;
            odnoklassniki.videoToken = data;
          }

          response.vtkn = data.vtkn;

          cb(response);
        }
      });
    },
    getMobileToken: function(response, cb) {
      if (response.vtkn) {
        return cb(response);
      }

      var videoToken = odnoklassniki.videoToken;
      if (videoToken && videoToken.expire > Date.now()) {
        response.vtkn = videoToken.vtkn;
        return cb(response);
      }

      return video.requestMobileToken(response, cb);
    },
    wrapMobileLinks: function(response, cb) {
      video.getMobileToken(response, function(response) {
        if (!response || !response.vtkn) {
          return cb();
        }

        response.action = 'getOkViaMobileWrapped';
        response.links.forEach(function(link) {
          var sep = !/\?/.test(link.url) ? '?' : '&';
          link.url += sep + 'vdsig=' + response.vtkn;
        });
        cb(response);
      });
    },
    prepareResponse: function(response, cb) {
      var abort = function() {
        cb(language.noLinksFound);
      };
      if (!response || !response.links) {
        return abort();
      }

      if (!preference.showUmmyItem && response.action === 'getRutubeLinks') {
        return abort();
      }

      if (response.action === 'getOkViaMobile') {
        return video.wrapMobileLinks(response, function(response) {
          if (!response) {
            return abort();
          }

          video.prepareResponse(response, cb);
        });
      }

      var prepareLinkType = null;
      if (response.action === 'getYoutubeLinks') {
        prepareLinkType = 'youtube';
      } else
      if (response.action === 'getVimeoLinks') {
        prepareLinkType = 'vimeo';
      } else
      if (response.action === 'getDailymotionLinks') {
        prepareLinkType = 'dailymotion';
      } else
      if (response.action === 'getRutubeLinks') {
        prepareLinkType = 'rutube';
      }

      var menuLinks = null;

      if (prepareLinkType) {
        menuLinks = SaveFrom_Utils.popupMenu.prepareLinks[prepareLinkType](response.links, response.title);
      } else {
        menuLinks = videoFeed.prepareLinks(response.links, response.title);
      }

      return cb(menuLinks);
    },

    matchOpenGraph: function(metadata) {
      if (!metadata || !metadata.movie || !metadata.movie.contentId) {
        return;
      }

      var url = metadata.movie.contentId;

      if (url.indexOf('rutube.') !== -1 && preference.showUmmyItem) {
        return {
          action: 'getRutubeLinks',
          links: [url]
        }
      }

      if (url.indexOf('pladform') !== -1) {
        var urlArgs = mono.parseUrlParams(url);
        return {
          action: 'getPladformVideo',
          extVideoId: {
            playerId: urlArgs.pl,
            videoId: urlArgs.videoid
          }
        };
      }

      var request = SaveFrom_Utils.embedDownloader.checkUrl(url);
      if (request) {
        return request;
      }

      var poster = metadata.movie.poster;
      if (poster) {
        var ytId = poster.match(/ytimg\.com\/vi\/([^\/]+)\//);
        ytId = ytId && ytId[1];
        if (ytId) {
          return {
            action: 'getYoutubeLinks',
            extVideoId: ytId
          }
        }
      }
    },

    switchMetadataProvider: function(metadata) {
      "use strict";
      if (!metadata || !metadata.provider || !metadata.movie) {
        return;
      }

      switch(metadata.provider) {
        case 'USER_YOUTUBE':
          if (metadata.movie.contentId) {
            return {
              request: {
                action: 'getYoutubeLinks',
                extVideoId: metadata.movie.contentId
              }
            };
          }
          break;
        case 'OPEN_GRAPH':
          var request = this.matchOpenGraph(metadata);
          if (request) {
            return {
              request: request
            }
          }
          break;
        case 'LIVE_TV_ODKL':
        case 'UPLOADED_ODKL':
        case 'UPLOADED':
        case 'PARTNER':
        case 'YKL':
          if (metadata.videos && metadata.movie.title) {
            return {
              request: {
                action: 'wrapMobileLinks',
                title: metadata.movie.title,
                links: metadata.videos
              }
            };
          }

          /* via mobile
           return {
           request: {
           action: 'okDirectOrMobile',
           mvId: metadata.movie.id,
           metadata: metadata,
           title: metadata.movie.title,
           links: null
           }
           };
           */

          /* odirect only
           if (metadata.videos && metadata.movie.title) {
           return {
           links: videoFeed.prepareLinks(metadata.videos, metadata.movie.title)
           };
           }*/
          break;
      }
    },

    getPlayerMetadata: function(movieId, sid, cb, withSid) {
      var params = {
        cmd: 'videoPlayerMetadata',
        mid: movieId,
        rnd: Date.now()
      };

      if (withSid) {
        params.mtId = sid;
      }

      mono.ajax({
        url: location.protocol + '//' + location.host + '/dk?' + mono.param(params),
        success: function(data) {
          var metadata = null;

          try {
            metadata = JSON.parse(data);
          }catch(e){}

          return cb(metadata);
        },
        error: function() {
          if (!withSid && sid) {
            video.getPlayerMetadata(movieId, sid, cb, 1);
            return;
          }

          return cb();
        }
      });
    },

    getEmbed: function(contentId, cb) {
      var params = mono.parseUrlParams(contentId);
      if (!params.id || !params.sig) {
        return cb();
      }

      var url = 'http://cdn-ok.com/video/get/?' + mono.param({
          id: params.id,
          format: 1,
          sig: params.sig,
          sig2: 'oldRotator'
        });

      mono.sendMessage({action: 'getData', url: url}, function(data) {
        if (!data) {
          return cb();
        }

        var jsonList = mono.findJson(data, [/"sourceType":/, /"sourceId":/]);

        var isFound = jsonList.some(function(json) {
          if (json.sourceType === 'youtube' && json.sourceId) {
            cb({
              request: {
                action: 'getYoutubeLinks',
                extVideoId: json.sourceId
              }
            });
            return true;
          }
        });

        if (!isFound) {
          return cb();
        }
      });
    },

    readMetadata: function(metadata, cb, skipPlayerMeta) {
      if (metadata.movie) {
        if (/cdn-ok\.com\/embed\//.test(metadata.movie.contentId)) {
          return this.getEmbed(metadata.movie.contentId, function(info) {
            if (!info || !info.request) {
              return cb();
            }

            mono.sendMessage(info.request, function (response) {
              video.prepareResponse(response, cb);
            });
          });
        }
      }

      if (!skipPlayerMeta && metadata.movie && metadata.movie.movieId) {
        var sid = metadata.movie.link && mono.parseUrlParams(decodeURIComponent(metadata.movie.link))['st.vpl.sid'];
        return this.getPlayerMetadata(metadata.movie.movieId, sid, function(_metadata) {
          video.readMetadata(_metadata || metadata, cb, 1);
        });
      }

      var info = this.switchMetadataProvider(metadata);
      if (!info) {
        return cb();
      }

      if (info.links) {
        return cb(info.links);
      }

      if (info.request) {
        if (info.request.action === 'getRutubeLinks') {
          video.prepareResponse(info.request, cb);
        } else
        if (info.request.action === 'wrapMobileLinks') {
          video.wrapMobileLinks(info.request, function(response) {
            video.prepareResponse(response, function(menuLinks) {
              cb(menuLinks, 1);
            });
          });
        } else {
          mono.sendMessage(info.request, function (response) {
            video.prepareResponse(response, cb);
          });
        }
      } else {
        cb();
      }
    },

    loadLinks: function(info, menu) {
      var linkCache = odnoklassniki.linkCache;
      var cacheKey = JSON.stringify(info);
      var cache = linkCache[cacheKey];
      if (cache) {
        return menu.update(cache);
      }

      var onGetMeta = function(metadata, skipPlayerMeta) {
        var onFail = function() {
          menu.update(language.noLinksFound);
        };

        if (!metadata) {
          return onFail();
        }

        video.readMetadata(metadata, function(menuLinks, noCache) {
          if (!menuLinks) {
            return onFail();
          }

          if (Array.isArray(menuLinks) && !menuLinks.length) {
            noCache = 1;
          }

          if (!noCache) {
            linkCache[cacheKey] = menuLinks;
          }

          menu.update(menuLinks);
        }, skipPlayerMeta);
      };

      if (info.metadata) {
        onGetMeta(info.metadata);
      } else
      if (info.request) {
        if (info.request.action === 'getOkMetadata') {
          mono.sendMessage(info.request, onGetMeta);
        } else
        if (info.request.action === 'getPlayerMetadata') {
          this.getPlayerMetadata(info.request.extVideoId, info.request.sid, function (metadata) {
            onGetMeta(metadata, 1);
          });
        } else
        if (info.request.action === 'getRutubeLinks') {
          video.prepareResponse(info.request, function(menuLinks) {
            menu.update(menuLinks);
          });
        } else {
          mono.sendMessage(info.request, function (response) {
            video.prepareResponse(response, function(menuLinks) {
              menu.update(menuLinks);
            });
          });
        }
      } else {
        menu.update(language.noLinksFound);
      }
    },

    appendLinkUnderVideo: function(container, info) {
      "use strict";
      var insertContainer = container.querySelector('.vp-layer-info_cnt');
      if (!insertContainer) {
        return;
      }

      var exButton = insertContainer.querySelector('.' + downloadLinkClassName);

      var button = mono.create('span', {
        className: downloadLinkClassName,
        style: {
          marginLeft: '12px'
        },
        on: [
          ['click', function(e) {e.stopPropagation();}],
          ['mousedown', function(e) {e.stopPropagation();}],
          ['keydown', function(e) {e.stopPropagation();}]
        ],
        append: [
          mono.create('a', {
            href: '#',
            text: language.download,
            on: ['click', function(e) {
              e.preventDefault();

              mono.onRemoveEvent(button, odnoklassniki.hideMenu);

              if (odnoklassniki.contextMenu && odnoklassniki.contextMenu.isShow) {
                if (odnoklassniki.contextMenu.button !== this) {
                  odnoklassniki.hideMenu();
                } else {
                  odnoklassniki.hideMenu();
                  return;
                }
              }

              var menu = odnoklassniki.contextMenu = SaveFrom_Utils.popupMenu.quickInsert(this, language.download+'...', 'sf-single-video-menu', {
                parent: container
              });

              if ([1].indexOf(preference.cohortIndex) !== -1) {
                mono.sendMessage({action: 'trackCohort', category: 'ok', event: 'click', label: 'video-under'});
              }

              video.loadLinks(info, menu);
            }]
          })
        ]
      });

      if (exButton && exButton.parentNode) {
        exButton.parentNode.replaceChild(button, exButton);
        exButton = null;
      } else {
        insertContainer.appendChild(button);
      }
    },

    getPlayerOptions: function(node) {
      var optionsNode = mono.getParent(node, '[data-player-element-id][data-options]');

      var options = optionsNode && optionsNode.dataset.options;

      if (!options) {
        return;
      }

      try {
        options = JSON.parse(options);
      }catch(e){}

      var flashvars = options.flashvars;

      if (!flashvars) {
        return;
      }

      if (flashvars.metadata) {
        var metadata = null;

        try {
          metadata = JSON.parse(flashvars.metadata);
        }catch(e){}

        if (metadata) {
          return {
            metadata: metadata
          }
        }
      }

      if (flashvars.metadataUrl) {
        return {
          request: {
            action: 'getOkMetadata',
            url: decodeURIComponent(flashvars.metadataUrl)
          }
        }
      }

      var url = options.url;
      if (url) {
        var request = SaveFrom_Utils.embedDownloader.checkUrl(url);
        if (request) {
          return {
            request: request
          }
        }

        if (url.indexOf('rutube.') !== -1) {
          return {
            request: {
              action: 'getRutubeLinks',
              links: [url]
            }
          }
        }
      }
    },

    catchPopup: function() {
      "use strict";
      var videoContainer = null;
      this.lastWaitEl && this.lastWaitEl.abort();

      this.lastWaitEl = this.waitEl(function() {
        videoContainer = document.querySelector('.vp_video .vid-card_cnt');
        if (!videoContainer) {
          return;
        }

        return videoContainer;
      }, function() {
        var parent = SaveFrom_Utils.getParentByClass(videoContainer, 'vp_video');
        if (!parent) {
          return;
        }

        var info = video.getPlayerOptions(videoContainer);
        if (info) {
          video.appendLinkUnderVideo(parent.parentNode, info);
        }
      });
    },

    rmBtn: function() {
      var dlBtn = document.querySelectorAll('.'+downloadLinkClassName);
      for (var i = 0, item; item = dlBtn[i]; i++) {
        item.parentNode.removeChild(item);
      }
    },

    lastWaitEl: null,
    waitEl: function(func, cb, options) {
      var out;
      var capsule = mono.extend({
        abort: function() {
          clearInterval(capsule.timeout);
          capsule.isAborted = true;
        }
      }, {
        delay: 500,
        repeat: 12,
        isAborted: false,
        timeout: null
      }, options);

      if (out = func()) {
        cb(out);
        return capsule;
      }

      (function wait() {
        capsule.repeat--;
        capsule.timeout = setTimeout(function() {
          if (capsule.isAborted) {
            return;
          }

          if (out = func()) {
            return cb(out);
          }

          if (!capsule.isAborted && capsule.repeat) {
            wait();
          }
        }, capsule.delay);
      })();

      return capsule;
    }
  };

  var videoFeed = {
    btnClassName: 'sf-feed-dl-btn',
    style: undefined,
    thumbClassName: 'vid-card_img',
    prepareLinks: function(links, title) {
      if (!links || !links.length) {
        return language.noLinksFound;
      }

      if (typeof links === 'string') {
        return links;
      }

      title = title || '';

      var menuLinks = [];
      var popupLink;
      var quality;
      var format;
      var url;
      for (var i = 0, len = links.length; i < len; i++) {
        var link = links[i];
        if(typeof(link) === 'object' && link.url) {
          url = link.url;
          var ext = link.ext;

          if(!ext) {
            ext = 'MP4';
            if(link.url.indexOf('.mp4') !== -1) {
              ext = 'MP4';
            }
            if(url.indexOf('.flv') !== -1) {
              ext = 'FLV';
            }
            if (link.url.indexOf('.mov') !== -1) {
              ext = 'MOV';
            }
            if (link.url.indexOf('.mpg') !== -1) {
              ext = 'MPG';
            }
          }

          ext = ext.toLowerCase();
          format = ext.toUpperCase();
          quality = link.subname || link.quality || link.name || ext;
        } else {
          url = link;
          ext = 'MP4';
          if(url.indexOf('.mp4') !== -1) {
            ext = 'MP4';
          }
          if(url.indexOf('.flv') !== -1) {
            ext = 'FLV';
          }
          if (url.indexOf('.mov') !== -1) {
            ext = 'MOV';
          }
          if (url.indexOf('.mpg') !== -1) {
            ext = 'MPG';
          }

          ext = ext.toLowerCase();
          format = ext.toUpperCase();

          quality = ext;
          var qualityMath = SaveFrom_Utils.getMatchFirst(links[i], /\.(\d+)\.mp4/i);
          if(qualityMath) {
            quality = qualityMath;
          }
        }

        var trueName = [144,240,360,480,720,1080,1440,'4K'];
        var origName = ['mobile','lowest','low','sd','hd','full','quad','ultra'];
        var pos = origName.indexOf(quality);
        if (pos !== -1) {
          quality = trueName[pos];
        }

        popupLink = { href: url, title: link.title? link.title : title, ext: ext, format: format, quality: quality, forceDownload: true };
        menuLinks.push(popupLink);
      }
      return menuLinks;
    },
    getPosterData: function(node) {
      var infoNode = mono.getParent(node, '[hrefattrs]');

      var info = infoNode && infoNode.getAttribute('hrefattrs');

      if (!info) {
        return;
      }

      var params = mono.parseUrlParams(info, {argsOnly: 1, forceSep: '&', useDecode: 1});

      var sid = params['st.vpl.sid'];
      var vid = params['st.vpl.id'];
      if (!vid) {
        var vidNode = mono.getParent(node, '[data-id]');
        vid = vidNode && vidNode.dataset.id;

        if (vid && vid[0] === 'c') {
          return;
        }
      }

      if (vid && vid.substr(0, 3) === 'OK_') {
        vid = SaveFrom_Utils.getMatchFirst(vid, /OK_\d+_(\d+)/);
      }

      if (!vid) {
        return;
      }

      return {
        request: {
          sid: sid,
          action: 'getPlayerMetadata',
          extVideoId: vid
        }
      };
    },
    onBtnClick: function(info, e) {
      e.preventDefault();
      e.stopPropagation();

      mono.onRemoveEvent(this, odnoklassniki.hideMenu);

      if (odnoklassniki.contextMenu && odnoklassniki.contextMenu.isShow) {
        if (odnoklassniki.contextMenu.button !== this) {
          odnoklassniki.hideMenu();
        } else {
          odnoklassniki.hideMenu();
          return;
        }
      }

      if ([1].indexOf(preference.cohortIndex) !== -1) {
        if (info.isChat) {
          mono.sendMessage({action: 'trackCohort', category: 'ok', event: 'click', label: 'video-message'});
        } else {
          mono.sendMessage({action: 'trackCohort', category: 'ok', event: 'click', label: 'video-feed-on-video'});
        }
      }

      // post in popup
      var menuParent = document.querySelector('#mtLayer.__active #mtLayerMain > div');
      if (!menuParent) {
        // video gaallery
        menuParent = document.getElementById('vv_content');
      }
      if (!menuParent) {
        // pm msgs
        menuParent = document.getElementById('__messagesList__');
        if (menuParent && !menuParent.offsetParent) {
          menuParent = null;
        }
      }
      var menu = odnoklassniki.contextMenu = SaveFrom_Utils.popupMenu.quickInsert(this, language.download + ' ...', 'sf-popupMenu', {
        parent: menuParent||undefined
      });

      video.loadLinks(info, menu);
    },
    onImgOver: function(e, retry) {
      retry = retry === undefined ? 0 : retry;
      if (this.dataset.sfSkip2 === '1') {
        return;
      }
      var _this = this;
      var isChat = mono.matches(this, '.mdialog_chat_window .d_comment_text_w ' + this.tagName);

      var container = null;
      if (isChat) {
        container = SaveFrom_Utils.getParentByClass(this, 'd_comment_text_w');
      } else
      if (mono.matches(this, '.video-card > .video-card_img-w ' + this.tagName)) {
        container = SaveFrom_Utils.getParentByClass(this, 'video-card_img-w');
      } else
      if (mono.matches(this, '.vid-card_cnt ' + this.tagName)) {
        container = SaveFrom_Utils.getParentByClass(this, 'vid-card_cnt');
      }

      if (!container) {
        this.dataset.sfSkip2 = '1';
        return;
      }

      if (container.getElementsByClassName(videoFeed.btnClassName).length) {
        return;
      }

      var isVideoVitrina = mono.matches(this, '.vid-card_img__link ' + this.tagName);

      var btnData = video.getPlayerOptions(this);
      if (!btnData) {
        btnData = videoFeed.getPosterData(this);
      }
      if (!btnData) {
        if (isVideoVitrina && retry < 1) {
          return setTimeout(function() {
            videoFeed.onImgOver.call(_this, null, 1);
          }, 1000);
        }
        this.dataset.sfSkip2 = '1';
        return;
      }

      btnData.isChat = isChat;

      var customStyle = {};

      if (isChat) {
        mono.extend(customStyle, {
          left: '15px',
          top: '15px'
        });
      }

      if (isVideoVitrina) {
        mono.extend(customStyle, {
          backgroundColor: '#454648',
          borderColor: 'rgb(53, 53, 53)'
        });
      }

      var btn = mono.create('i', {
        class: videoFeed.btnClassName,
        style: customStyle,
        on: [
          ['mousedown', function(e) {e.stopPropagation();}],
          ['keydown', function(e) {e.stopPropagation();}]
        ]
      });

      btn.addEventListener('click', videoFeed.onBtnClick.bind(btn, btnData));

      if (mono.isOpera) {
        btn.appendChild(mono.create('img', {
          src: SaveFrom_Utils.svg.getSrc('download', '#eb722e'),
          style: {
            width: '12px',
            height: '12px',
            margin: '4px',
            backgroundColor: 'transition'
          }
        }));
      }

      container.appendChild(btn);
    },
    onOver: function(e) {
      var node = e.target;
      if (node.nodeType !== 1) {
        return;
      }
      if (node.tagName !== 'IMG') {
        if (!mono.isSafari && !mono.isOpera && node.id === 'photo-layer_photo') {
          photo.addCurrentDlBtn(node);
        }
        return;
      }
      videoFeed.onImgOver.call(node, e);
    },
    injectStyle: function() {
      if (this.style) {
        if (!this.style.parentNode) {
          document.body.appendChild(this.style);
        }
        return;
      }

      this.style = mono.create('style', {
        text: "div > .sf-feed-dl-btn {" +
        'display: none;' +
        'border: 1px solid #F8F8F8;' +
        'width: 20px;' +
        'height: 20px;' +
        'padding: 0;' +
        'position: absolute;' +
        'background: url('+SaveFrom_Utils.svg.getSrc('download', '#eb722e')+') center no-repeat #F8F8F8;' +
        'background-size: 12px;' +
        'top: 5px;' +
        'left: 5px;' +
        'z-index: 1;' +
        'cursor: pointer;' +
        "}" +
        "div > .sf-feed-dl-btn:hover {" +
        'background: url('+SaveFrom_Utils.svg.getSrc('download', '#00B75A')+') center no-repeat #F8F8F8;' +
        'background-size: 12px;' +
        "}" +
        "div > .sf-feed-dl-btn:active {" +
        "outline: 0;" +
        "box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);" +
        "}" +
        "div:hover > .sf-feed-dl-btn {display: block;}"
      });

      document.body.appendChild(this.style);
    },
    enable: function() {
      mono.off(document, 'mouseenter', this.onOver, true);
      mono.on(document, 'mouseenter', this.onOver, true);
    },
    disable: function() {
      mono.off(document, 'mouseenter', this.onOver, true);

      if (this.style) {
        this.style.parentNode && this.style.parentNode.removeChild(this.style);
      }
    },
    rmBtn: function() {
      var btnList = document.querySelectorAll('.sf-feed-dl-btn');
      for (var i = 0, item; item = btnList[i]; i++) {
        item.parentNode.removeChild(item);
      }
      var dataAttr = mono.dataAttr2Selector('sfSkip2');
      var dataAttrList = document.querySelectorAll('['+dataAttr+']');
      for (i = 0, item; item = dataAttrList[i]; i++) {
        item.removeAttribute(dataAttr);
      }
    }
  };

  //  /VIDEO
  ///////////////////////////////////////////////////////////////////


  //  PHOTO
  ///////////////////////////////////////////////////////////////////

  var photo = {
    style: null,
    rmCurrentPhotoBtn: function(insertContainer) {
      var exBtn = undefined;
      var imgList = document.querySelectorAll('.sf-dl-current-photo-btn');
      for (var i = 0, imgItem; imgItem = imgList[i]; i++) {
        if (!insertContainer || !insertContainer.contains(imgItem)) {
          imgItem.parentNode.removeChild(imgItem);
        } else {
          exBtn = imgItem;
        }
      }
      return exBtn;
    },
    addDlCurrentPhotoBtn: function(container) {
      var exBtn = this.rmCurrentPhotoBtn(container);
      if (exBtn) {
        return;
      }
      exBtn = null;

      var _this = this;

      container.appendChild(mono.create('a', {
        class: 'sf-dl-current-photo-btn',
        href: '#',
        title: language.download,
        on: ['click', function(e) {
          e.stopPropagation();
          e.preventDefault();

          if (odnoklassniki.contextMenu && odnoklassniki.contextMenu.isShow && odnoklassniki.contextMenu.button === this) {
            if (odnoklassniki.contextMenu.button !== this) {
              odnoklassniki.hideMenu();
            } else {
              odnoklassniki.hideMenu();
              return;
            }
          }

          var onKeyDown = function(e) {
            if (e.keyCode === 18 || e.keyCode === 17) return;
            menu.hide();
            document.removeEventListener('keydown', onKeyDown);
          };
          var menu = odnoklassniki.contextMenu = SaveFrom_Utils.popupMenu.quickInsert(this, language.download + ' ...', "photoDlMenu", {
            parent: container,
            onShow: function() {
              document.addEventListener('keydown', onKeyDown);
            },
            onHide: function() {
              document.removeEventListener('keydown', onKeyDown);
            }
          });

          var img = container.querySelector('img.plp_photo');
          if (!img) {
            return menu.update(language.noLinksFound);
          }
          var url = img.dataset.fsSrc || img.dataset.nfsSrc || img.src;
          if (!url) {
            return menu.update(language.noLinksFound);
          }

          var photoExt = 'jpg';
          var photoTitle = 'photo_'+parseInt(Date.now() / 1000);
          menu.update([{
            href: url, title: photoTitle, quality: language.download, format: ' ',
            ext: photoExt, forceDownload: true, isBank: true, func: function() {
              menu.hide();
            }}]);
        }],
        append: [
          !mono.isOpera ? undefined : mono.create('img', {
            src: SaveFrom_Utils.svg.getSrc('download', '#eb722e'),
            style: {
              width: '12px',
              height: '12px',
              margin: '4px'
            }
          })
        ]
      }));
    },
    injectStyle: function() {
      if (photo.style) {
        if (!photo.style.parentNode) {
          document.body.appendChild(photo.style);
        }
        return;
      }

      photo.style = mono.create('style', {
        text: "div > .sf-dl-current-photo-btn {" +
        'display: none;' +
        'border: 1px solid #F8F8F8;' +
        'width: 20px;' +
        'height: 20px;' +
        'padding: 0;' +
        'position: absolute;' +
        'background: url('+SaveFrom_Utils.svg.getSrc('download', '#eb722e')+') center no-repeat #F8F8F8;' +
        'background-size: 12px;' +
        'top: 73px;' +
        'left: 20px;' +
        'z-index: 100;' +
        'cursor: pointer;' +
        "}" +
        "div > .sf-dl-current-photo-btn:hover {" +
        'background: url('+SaveFrom_Utils.svg.getSrc('download', '#00B75A')+') center no-repeat #F8F8F8;' +
        'background-size: 12px;' +
        "}" +
        "div > .sf-dl-current-photo-btn:active {" +
        "outline: 0;" +
        "box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);" +
        "}" +
        "div:hover > .sf-dl-current-photo-btn {display: block;}"
      });

      document.body.appendChild(photo.style);
    },
    addCurrentDlBtn: function(container) {
      if (container.dataset.sfSkip2 === '1') {
        return;
      }
      container.dataset.sfSkip2 = '1';

      var img = container.querySelector('img.plp_photo');
      if (!img) {
        return;
      }
      var url = img.dataset.fsSrc || img.dataset.nfsSrc || img.src;
      if (!url) {
        return;
      }
      this.addDlCurrentPhotoBtn(container);
    }
  };

  //  /PHOTO
  //////////////////////////////////////////////////////////////////
}, null, function syncIsActive() {
  "use strict";
  if (mono.isSafari || mono.isGM) {
    if (!mono.checkUrl(document.URL, [
        'http://odnoklassniki.ru/*',
        'http://*.odnoklassniki.ru/*',
        'http://ok.ru/*',
        'http://*.ok.ru/*'
      ])) {
      return false;
    }
  }

  if (mono.isIframe()) {
    return false;
  }

  return true;
});

(typeof mono === 'undefined') && (mono = {loadModule: function() {this.loadModuleStack.push(arguments);},loadModuleStack: []});

mono.loadModule('mailru', function(moduleName, initData) {
  "use strict";

  var language = initData.getLanguage;
  var preference = initData.getPreference;
  var moduleState = preference.moduleMailru ? 1 : 0;

  var allowDownloadMode = mono.isChrome || mono.isFF || (mono.isGM && mono.isTM);

  mono.onMessage(function(message, cb){
    if (message.action === 'getModuleInfo') {
      if (message.url !== location.href) return;
      return cb({state: moduleState, moduleName: moduleName});
    }
    if (message.action === 'changeState') {
      if (moduleName !== message.moduleName) {
        return;
      }
      return mailru.changeState(message.state);
    }
    if (!moduleState) {
      return;
    }
    if (message.action === 'downloadMP3Files') {
      if (allowDownloadMode) {
        audio.downloadMP3Files();
      } else {
        audio.showListOfAudioFiles(false);
      }
    }
    if (message.action === 'downloadPlaylist') {
      audio.showListOfAudioFiles(true);
    }
  });

  if (moduleState) {
    mono.asyncCall(function() {
      mailru.run();
    });
  }

  var mailru = {
    contextMenu: null,
    run: function() {
      moduleState = 1;

      audio.injectStyle();
      if (SaveFrom_Utils.mutationWatcher.isAvailable()) {
        this.mutationMode.enable();
        return;
      }

      audio.showLinks();
      mono.onUrlChange(function(url, oldUrl) {
        video.catchPopup();
      }, 1);
    },
    changeState: function(state) {
      moduleState = state;
      mono.clearUrlChange();
      audio.disable();
      audio.rmBtn();
      video.rmBtn();
      this.mutationMode.stop();
      this.hideMenu();
      if (state) {
        this.run();
      }
    },
    hideMenu: function() {
      if (mailru.contextMenu) {
        mailru.contextMenu.hide();
        mailru.contextMenu = null;
      }
    },
    mutationMode: {
      observer: null,
      stop: function() {
        if (this.observer) {
          this.observer.stop();
        }

        ['sfSkip'].forEach(function(attr) {
          var dataAttr = mono.dataAttr2Selector(attr);
          var dataAttrList = document.querySelectorAll('['+dataAttr+']');
          for (var i = 0, item; item = dataAttrList[i]; i++) {
            item.removeAttribute(dataAttr);
          }
        });
      },
      wrapAudioOnMouseOver: function(context) {
        mono.off(this, 'mouseenter', context.event);
        if (!moduleState) {
          return;
        }

        audio.onTrackOver(this, context.type);
      },
      enable: function() {
        if (this.observer) {
          return this.observer.start();
        }

        this.observer = SaveFrom_Utils.mutationWatcher.run({
          callback: function(summaryList) {
            var summary, n, i, node, context;

            summary = summaryList[0];
            for (n = 0; node = summary.added[n]; n++) {
              if (node.dataset.sfSkip > 0) {
                continue;
              }
              node.dataset.sfSkip = '1';

              context = {};
              context.type = 0;
              context.event = mailru.mutationMode.wrapAudioOnMouseOver.bind(node, context);

              mono.on(node, 'mouseenter', context.event);
            }

            summary = summaryList[1];
            for (n = 0; node = summary.added[n]; n++) {
              if (node.dataset.sfSkip > 0) {
                continue;
              }
              node.dataset.sfSkip = '1';

              context = {};
              context.type = 1;
              context.event = mailru.mutationMode.wrapAudioOnMouseOver.bind(node, context);

              mono.on(node, 'mouseenter', context.event);
            }

            var videoInfo, parent, info;

            for (i = 2; i < 4; i++) {
              summary = summaryList[i];
              for (n = 0; node = summary.added[n]; n++) {
                if (node.dataset.sfSkip > 0) {
                  continue;
                }
                node.dataset.sfSkip = '1';

                videoInfo = video.getVideoId(node);
                if (!videoInfo) {
                  continue;
                }

                parent = SaveFrom_Utils.getParentByClass(node, 'b-video__left');
                if (!parent) {
                  continue;
                }

                info = parent.querySelector('.b-video__info-time');
                if (!info) {
                  continue;
                }

                video.insertBtnInPopup(videoInfo, info);
              }
            }

            for (i = 4; i < 6; i++) {
              summary = summaryList[i];
              for (n = 0; node = summary.added[n]; n++) {
                if (node.dataset.sfSkip > 0) {
                  continue;
                }
                node.dataset.sfSkip = '1';

                videoInfo = video.getVideoId(node);
                if (!videoInfo) {
                  continue;
                }

                parent = SaveFrom_Utils.getParentByClass(node, 'sp-video__item-page');
                if (!parent) {
                  continue;
                }

                info = parent.querySelector('.sp-video__item-page__info__additional');
                if (!info) {
                  continue;
                }

                video.insertBtnInPage(videoInfo, info);
              }
            }

            summary = summaryList[6];
            for (n = 0; node = summary.removed[n]; n++) {
              mono.onRemoveListener(node);
            }
          },
          queries: [
            {css: '.jp__track', is: 'added'},
            {css: '.b-music-songs .song', is: 'added'},
            {css: '.b-video__left .b-video__container object', is: 'added'},
            {css: '.b-video__left .b-video__container video', is: 'added'},
            {css: '.sp-video__item-page .sp-video__item-page__video-wrapper object', is: 'added'},
            {css: '.sp-video__item-page .sp-video__item-page__video-wrapper video', is: 'added'},
            {css: '.' + mono.onRemoveClassName, is: 'removed'}
          ]
        });
      }
    }
  };

  var tooltip = {
    tooltip: undefined,
    updatePos: function(button, options) {
      var btnPosition = SaveFrom_Utils.getPosition(button);
      var size = SaveFrom_Utils.getSize(this.tooltip);

      this.tooltip.style.top = (btnPosition.top + options.top - size.height)+'px';

      var left = btnPosition.left + parseInt(options.width / 2) - parseInt(size.width / 2);
      var pageWidth = document.body.clientWidth + document.body.scrollLeft;
      if (pageWidth < left + size.width) {
        left = pageWidth -  size.width;
      }
      this.tooltip.style.left = left + 'px';
    },
    show: function(button, options) {
      var _this = this;
      if (this.tooltip !== undefined) {
        this.hide();
      } else {
        this.tooltip = mono.create('div', {
          class: 'sf-tooltip',
          style: mono.extend({
            position: 'absolute',
            display: 'none',
            zIndex: 9999,
            opacity: 0,
            transition: 'opacity 0.2s',
            whiteSpace: 'nowrap',
            fontSize: '12px',
            color: '#111',
            fontFamily: 'arial, verdana, sans-serif, Lucida Sans'
          }, options.style),
          on: ['mouseenter', function(e) {
            _this.hide();
          }]
        });
        document.body.appendChild(this.tooltip);
      }
      this.tooltip.style.display = 'block';

      setTimeout(function() {
        _this.updatePos(button, options);
        _this.tooltip.style.opacity = 1;
      });

      return this.tooltip;
    },
    hide: function() {
      this.tooltip.style.opacity = 0;
      this.tooltip.style.display = 'none';
    }
  };

  var getFolderName = function () {
    var folderName = document.title;
    var sep = folderName.indexOf('-');
    if (sep !== -1) {
      folderName = folderName.substr(0, sep -1);
    }

    return mono.fileName.modify(folderName);
  };

  var audio = {
    className: 'sf-audio-panel',
    lastRow: null,
    style: undefined,
    secondsFromDuration: function(time) {
      var minSec = time.split(':');
      return parseInt(minSec[0]) * 60 + parseInt(minSec[1]);
    },
    getTitle: function(row) {
      var title = row.querySelector('.jp__track-fullname');
      var artist = row.querySelector('.jp__track-performer');
      if (artist === null) {
        artist = row.querySelector('.jp__track-name-text');
        if (artist !== null) {
          artist = artist.querySelector('a:not(.jp__track-fullname)');
          if (artist !== null) {
            var tmp = title;
            title = artist;
            artist = tmp;
          }
        }
      }
      if (artist !== null) {
        artist = artist.textContent.trim();
        if (!artist) {
          artist = 'noname';
        }
      } else {
        artist = '';
      }
      if (artist) {
        artist = artist + ' - ';
      } else {
        artist = '';
      }
      if (title === null) {
        return;
      }
      title = title.textContent;
      var fullName =  artist + title;
      fullName = fullName.replace(/[\r\n\t\s]+/img, ' ').replace(/\s+/g, ' ').trim();
      return fullName;
    },
    getTitle2: function(row) {
      var title = row.querySelector('.title');
      var name = row.querySelector('.name');
      var author = row.querySelector('.author');
      if (name !== null) {
        name = name.textContent;
        if (name.length === 0) {
          name = 'noname';
        }
      }
      if (author) {
        author = author.textContent;
      }
      var fullName = '';
      if (name && author) {
        fullName = author + ' - ' + name;
      } else {
        fullName = title.textContent;
      }
      fullName = fullName.replace(/[\r\n\t\s]+/img, ' ').replace(/\s+/g, ' ').trim();
      return fullName;
    },
    getMp3UrlList: function(cb) {
      var ver = 1;
      var rowList = document.querySelectorAll('.song');
      if (rowList.length === 0) {
        rowList = document.querySelectorAll('.jp__track');
        ver = 0;
      }
      var waitCount = rowList.length;
      var readyCount = 0;
      var urlList = [];
      var dblList = {};
      var isReady = function() {
        if (waitCount === readyCount) {
          cb(urlList);
        }
      };
      if (waitCount === readyCount) {
        return isReady();
      }
      for (var i = 0, row; row = rowList[i]; i++) {
        audio.getUrl(row, ver, function(url) {
          readyCount++;
          if (!url) {
            return isReady();
          }
          if (dblList[url]) {
            return isReady();
          }
          dblList[url] = 1;

          var duration;
          var fullTitle;
          if(ver === 0) {
            duration = row.querySelector('.jp__track-duration-total');
            if (duration === null) {
              return isReady();
            }
            fullTitle = audio.getTitle(row);
            if (!fullTitle) {
              return isReady();
            }
          } else {
            duration = row.querySelector('.duration');
            if (duration === null) {
              return isReady();
            }
            fullTitle = audio.getTitle2(row);
            if (!fullTitle) {
              return isReady();
            }
          }
          var filename = mono.fileName.modify(fullTitle) + '.mp3';
          duration = audio.secondsFromDuration(duration.textContent);
          urlList.push({url: url, filename: filename, title: fullTitle, duration: duration});
          isReady();
        });
      }
    },
    showListOfAudioFiles: function(isPlaylist) {
      audio.getMp3UrlList(function(list) {
        if(list.length === 0) {
          return;
        }
        if (isPlaylist) {
          SaveFrom_Utils.playlist.popupPlaylist(list, getFolderName(), true);
        } else {
          SaveFrom_Utils.playlist.popupFilelist(list);
        }
      });
    },
    downloadMP3Files: function() {
      audio.getMp3UrlList(function(list) {
        if(list.length === 0) {
          return;
        }
        SaveFrom_Utils.downloadList.showBeforeDownloadPopup(list, {
          type: 'audio',
          folderName: getFolderName()
        });
      });
    },
    onDlBtnOver: function(e) {
      if (mono.isOpera || mono.isSafari) {
        return;
      }
      if (e.type === 'mouseenter') {
        var _this = this;
        var options = undefined;
        var ttp = tooltip.show(_this, options = {
          top: -14,
          width: 16,
          style: {
            backgroundColor: '#fff',
            border: '1px solid #ccc',
            color: 'rgb(48, 48, 48)'
          }
        });
        if (_this.dataset.bitrate) {
          ttp.style.padding = '2px 5px 3px';
          ttp.textContent = ' (' + _this.dataset.size + ' ~ ' + _this.dataset.bitrate + ')';
          return;
        }
        ttp.style.padding = '2px 2px 0 2px';
        ttp.textContent = '';
        ttp.appendChild(mono.create('img', {
          src: '//my9.imgsmail.ru/r/my/preloader_circle_16.gif',
          height: 16,
          width: 16
        }));

        mono.sendMessage({action: 'getFileSize', url: _this.href}, function(response) {
          ttp.style.padding = '2px 5px 3px';
          if (!response.fileSize) {
            ttp.textContent = language.getFileSizeFailTitle;
            tooltip.updatePos(_this, options);
            return;
          }
          var size = SaveFrom_Utils.sizeHuman(response.fileSize, 2);
          var bitrate = Math.floor((response.fileSize / _this.dataset.duration) / 125) + ' ' + language.kbps;

          _this.dataset.bitrate = bitrate;
          _this.dataset.size = size;

          ttp.textContent = ' (' + size + ' ~ ' + bitrate + ')';

          tooltip.updatePos(_this, options);
        });
        return;
      }
      // mouseleave
      tooltip.hide();
    },
    getUrlViaBridge: function(row, cb) {
      if (audio.getUrlViaBridge.index === undefined) {
        audio.getUrlViaBridge.index = 0;
      }

      var className = 'sf-bridge-item-'+audio.getUrlViaBridge.index;
      audio.getUrlViaBridge.index++;
      row.classList.add(className);

      SaveFrom_Utils.bridge({
        args: [{
          className: className
        }],
        func: function(data, cb) {
          var className = data.className;
          var el = document.getElementsByClassName(className)[0];
          el.classList.remove(className);

          var $data = jQuery(el).data();
          if ($data && $data.item) {
            cb($data.item.url);
          }
        },
        cb: function(data) {
          cb(data);
        },
        timeout: 300
      });
    },
    getUrl: function(row, rowType, cb) {
      var url = row.dataset.url;
      if (url) {
        return cb(url);
      }
      if (rowType === 0) {
        var urlLink = row.querySelector('a.jp__track-fullname-link');
        if (urlLink === null) {
          return cb();
        }
        urlLink = urlLink.href;
        var params = mono.parseUrlParams(urlLink);
        if (params.file === undefined || params.uid === undefined) {
          return audio.getUrlViaBridge(row, function(url) {
            if (url) {
              row.dataset.url = url;
            }
            cb(url);
          });
        }
        return cb('http://music.my.mail.ru/file/' + params.file + '.mp3?u=' + params.uid);
      } else
      if (rowType === 1) {
        if (row.dataset.file) {
          return cb('http://music.my.mail.ru/file/' + row.dataset.file + '.mp3');
        }
        return cb();
      }
    },
    onDlBtnClick: function(e) {
      e.stopPropagation();
      SaveFrom_Utils.downloadOnClick(e);

      if ([1].indexOf(preference.cohortIndex) !== -1) {
        mono.sendMessage({action: 'trackCohort', category: 'my.mail.ru', event: 'click', label: 'music-audio'});
      }
    },
    getDlLink: function(url, duration, fullTitle) {
      return mono.create('a', {
        data: {
          duration: duration
        },
        href: url,
        style: {
          position: 'relative',
          display: 'inline-block',
          width: '16px',
          height: '16px',
          verticalAlign: 'middle'
        },
        download: mono.fileName.modify(fullTitle + '.mp3'),
        on: [
          ['mouseenter', audio.onDlBtnOver],
          ['mouseleave', audio.onDlBtnOver],
          ['click', this.onDlBtnClick]
        ]
      });
    },
    addDownloadPanelNew: function(row, url) {
      var durationEl = row.querySelector('.duration');
      if (durationEl === null || url === undefined) {
        return;
      }
      var fullTitle = audio.getTitle2(row);
      if (!fullTitle) {
        return;
      }
      var container;
      if (!(container = durationEl.parentNode)) {
        return;
      }
      var duration = audio.secondsFromDuration(durationEl.textContent);

      var dlPanel = mono.create('div', {
        class: [audio.className, 'type-2'],
        style: {
          cssFloat: 'right'
        },
        append: [
          this.getDlLink(url, duration, fullTitle)
        ]
      });

      var sidebar = document.querySelector('.l-music__sidebar');
      if (sidebar.contains(container)) {
        dlPanel.style.lineHeight = '32px';
      }

      var titleEl = container.querySelector('.title');
      container.insertBefore(dlPanel, titleEl);
    },
    addDownloadPanel: function(row, url) {
      var duration = row.querySelector('.jp__track-duration-total');
      if (duration === null || url === undefined) {
        return;
      }
      var fullTitle = audio.getTitle(row);
      if (!fullTitle) {
        return;
      }
      duration = audio.secondsFromDuration(duration.textContent);

      var dlPanel = mono.create('div', {
        class: [audio.className, 'type-0'],
        append: [
          this.getDlLink(url, duration, fullTitle)
        ]
      });

      var container = row.querySelector('.jp__track-management');
      if (!container) {
        return;
      }

      if (container.firstChild) {
        container.insertBefore(dlPanel, container.firstChild);
      } else {
        container.appendChild(dlPanel);
      }
    },
    onTrackOver: function(row, rowType) {
      if (row.getElementsByClassName(audio.className).length !== 0) {
        return;
      }

      audio.getUrl(row, rowType, function(url) {
        if (rowType === 1) {
          audio.addDownloadPanelNew(row, url);
        } else {
          audio.addDownloadPanel(row, url);
        }
      });
    },
    onMouseOver: function(e) {
      var node = e.target;
      if (node.nodeType !== 1) {
        return;
      }
      var rowType = 0;
      var row = null;

      if (node.classList.contains('jp__track')) {
        row = node;
      } else
      if (node.classList.contains('song')) {
        if (!node.parentNode.classList.contains('b-music-songs')) {
          node = null;
        }
        rowType = 1;
        row = node;
      }

      if (row === null) {
        return;
      }

      audio.onTrackOver(row, rowType);
    },
    injectStyle: function() {
      if (this.style) {
        if (!this.style.parentNode) {
          document.body.appendChild(this.style);
        }
        return;
      }

      this.style = mono.create('style', {
        text: '' +
        '.' + this.className + '{' +
        'display: none;' +
        'left: 22px;' +
        'background-image: url(' + SaveFrom_Utils.svg.getSrc('download', '#168DE2') + ');' +
        'background-repeat: no-repeat;' +
        'background-position: center;' +
        'background-size: 16px;' +
        '}' +
        '.jp__track:hover .' + this.className + '{' +
        'display: block;' +
        'opacity: 0.5;' +
        '}' +
        '.jp__track:hover .' + this.className + '.type-0 {' +
        'display: inline-block;' +
        'margin-left: -16px;' +
        'position: relative;' +
        'left: -2px;' +
        '}' +
        '.jp__track.jp__track-plays .' + this.className + '{' +
        'left: -18px;' +
        '}' +
        '.' + this.className + ':hover {' +
        'opacity: 1 !important;' +
        '}' +
        '.' + this.className + '.type-2' + '{' +
        'margin-right: 5px;' +
        'margin-left: 5px;' +
        '}' +
        '.song:hover .' + this.className + '.type-2' + '{' +
        'display: block;' +
        'opacity: 0.5;' +
        '}' +
        ''
      });

      document.body.appendChild(this.style);
    },
    rmBtn: function() {
      if (audio.style) {
        audio.style.parentNode.removeChild(audio.style);
        audio.style = undefined;
      }
      var btnList = document.querySelectorAll('.'+audio.className);
      for (var i = 0, item; item = btnList[i]; i++) {
        item.parentNode.removeChild(item);
      }
    },
    disable: function() {
      mono.off(document, 'mouseenter', audio.onMouseOver, true);
    },
    showLinks: function() {
      mono.off(document, 'mouseenter', audio.onMouseOver, true);
      mono.on(document, 'mouseenter', audio.onMouseOver, true);
    }
  };

  var video = {
    btnIndex: 0,
    domCache: {},
    className: 'sf-video-btn',

    prepareLinks: function(links) {
      var menuLinks = [];
      for (var i = 0, link; link = links[i]; i++) {
        var url = link.url;
        var format = 'FLV';
        if (url.indexOf('.mp4') !== -1) {
          format = 'MP4';
        }
        if (url.indexOf('.mov') !== -1) {
          format = 'MOV';
        }
        if (url.indexOf('.mpg') !== -1) {
          format = 'MPG';
        }
        if (!link.quality) {
          link.quality = '-?-';
        }
        var quality = link.quality.toUpperCase();

        var qList = ['1080P', '720P', '480P', '360P', '272P'];
        var tList = ['1080', '720', '480', '360', '272'];

        var qPos = qList.indexOf(quality);
        if (qPos !== -1) {
          quality = tList[qPos];
        }

        var ext = format.toLowerCase();
        var popupLink = { href: url, title: link.title, ext: ext, format: format, quality: quality, forceDownload: true, noSize: true };
        menuLinks.push(popupLink);
      }
      if (menuLinks.length === 0) {
        return;
      }
      return menuLinks;
    },

    showLinkList: function(links, button, isUpdate) {
      if (!links) {
        links = language.noLinksFound;
      }

      if (isUpdate) {
        if (!mailru.contextMenu) {
          return;
        }
        mailru.contextMenu.update(links);
        return;
      }

      if (mailru.contextMenu && mailru.contextMenu.isShow) {
        mailru.hideMenu();
        return;
      }
      mailru.contextMenu = SaveFrom_Utils.popupMenu.quickInsert(button, links, 'video-links-popup', {
        parent: mono.getParentByClass(button, 'b-video__main')
      });
    },

    appendPageBtn: function(container, btnIndex) {
      var exBtn = container.querySelector('.'+video.className);
      if (exBtn !== null) {
        return;
      }

      var child = container.lastChild;
      var style = {};
      style.marginLeft = '15px';

      var  btn = mono.create('span', {
        class: video.className,
        append: [
          mono.create('a', {
            data: {
              index: btnIndex
            },
            text: language.download,
            href: '#',
            on: ['click', function(e) {
              e.preventDefault();

              mono.onRemoveEvent(this, mailru.hideMenu);

              video.readDomCache(this.dataset.index, this);

              if ([1].indexOf(preference.cohortIndex) !== -1) {
                mono.sendMessage({action: 'trackCohort', category: 'my.mail.ru', event: 'click', label: 'video'});
              }
            }],
            style: style
          })
        ]
      });

      container.insertBefore(btn, child);

      child = null;
    },

    appendBtn: function(container, btnIndex) {
      var exBtn = container.querySelector('.'+video.className);
      if (exBtn !== null) {
        return;
      }

      var child = undefined;
      var style = {};
      if (container.childNodes.length > 1) {
        child = container.childNodes[1];
      } else {
        child = container.lastChild;
        style.marginRight = '5px';
      }

      var btn = mono.create('span', {
        class: container.lastChild.getAttribute('class')+' '+video.className,
        append: [
          mono.create('a', {
            data: {
              index: btnIndex
            },
            text: language.download,
            href: '#',
            on: ['click', function(e) {
              e.preventDefault();

              mono.onRemoveEvent(this, mailru.hideMenu);

              video.readDomCache(this.dataset.index, this);

              if ([1].indexOf(preference.cohortIndex) !== -1) {
                mono.sendMessage({action: 'trackCohort', category: 'my.mail.ru', event: 'click', label: 'video'});
              }
            }],
            style: style
          })
        ]
      });

      container.insertBefore(btn, child);
      child = null;
    },

    readDomCache: function(index, button) {
      video.showLinkList(language.download, button);

      var abort = function() {
        video.showLinkList(undefined, button, 1)
      };

      var showLinks = function(response) {
        if (response.action === 'getRutubeLinks') {
          if (!preference.showUmmyItem) {
            return abort();
          }
          video.showLinkList(SaveFrom_Utils.popupMenu.prepareLinks.rutube(response.links), button, 1);
        } else {
          video.showLinkList(video.prepareLinks(response.links), button, 1);
        }
      };

      var cacheItem = video.domCache[parseInt(index)];
      if (cacheItem.links) {
        showLinks(cacheItem);
        return;
      }
      if (cacheItem.metadataUrl) {
        var metadataUrl = cacheItem.metadataUrl;
        if (/^\/\//.test(metadataUrl)) {
          metadataUrl = 'http:' + metadataUrl;
        }
        var onResponse = function(data) {
          if (!data || typeof data === 'string') {
            return abort();
          }
          video.readMeta(data, function(response) {
            if (!response.links) {
              return abort();
            }
            cacheItem.links = response.links;
            cacheItem.action = response.action;

            showLinks(cacheItem);
          });
        };

        if (mono.isOpera) {
          mono.ajax({
            url: metadataUrl,
            withCredentials: true,
            success: function(data) {
              try {
                onResponse(JSON.parse(data));
              } catch(e) {
                onResponse();
              }
            },
            error: function() {
              onResponse();
            }
          });
          return;
        }
        mono.sendMessage({action: 'getOkMetadata', url: metadataUrl}, onResponse);
        return;
      }
      abort();
    },

    readMeta: function(metadata, cb) {
      var links = [], title;
      if (metadata.provider === 'UPLOADED') {
        title = metadata.movie?metadata.movie.title:undefined;
        if (!metadata.videos) {
          return cb();
        }
        metadata.videos.forEach(function(item) {
          links.push({
            quality: item.name,
            url: item.url,
            title: title
          });
        });
      }
      if (metadata.provider === 'ugc') {
        title = metadata.meta?metadata.meta.title:undefined;
        if (!metadata.videos) {
          return cb();
        }
        metadata.videos.forEach(function(item) {
          links.push({
            quality: item.key,
            url: item.url,
            title: title
          });
        });
      }
      if (metadata.provider === 'pladform') {
        title = metadata.meta?metadata.meta.title:undefined;
        mono.sendMessage({
          action: 'getPladformVideo',
          extVideoId: {
            playerId: metadata.meta.playerId,
            videoId: metadata.meta.videoId
          }
        }, function(response) {
          if (!response) {
            return cb();
          }

          var links = response.links;
          if (!links) {
            return cb();
          }

          links.forEach(function(item) {
            if (typeof item !== 'object') {
              return;
            }

            if (item.title === undefined) {
              item.title = title
            }
          });

          cb(response);
        });
        return;
      }
      if (links.length === 0) {
        return cb();
      }
      return cb({links: links});
    },

    waitPopup: function() {
      setTimeout(function() {
        video.waitPopup.timeCycle++;
        video.catchPopup(1);
        if (video.catchPopup.found === 1) {
          return;
        }
        if (video.waitPopup.timeCycle > 5) {
          video.waitPopup.timeCycle = 0;
          return;
        }
        video.waitPopup();
      }, 1000);
    },

    getFlashVars: function(videoObj) {
      if (!videoObj) {
        return;
      }

      var flashvars = videoObj.querySelector('param[name="flashvars"]');
      if (!flashvars) {
        return;
      }

      var value = flashvars.value;
      var url = mono.parseUrlParams(value, {
        argsOnly: 1,
        forceSep: '&'
      });

      if (url.metadataUrl) {
        return {
          metadataUrl: decodeURIComponent(url.metadataUrl)
        };
      }
    },

    matchUrl: function(url) {
      var linkR = /\/([^\/]+)\/([^\/]+)\/video\/(.+).html/;
      var embedR = /embed\/([^\/]+)\/([^\/]+)\/(.+).html/;

      var r = url.match(linkR);
      if (!r) {
        r = url.match(embedR);
      }

      return r;
    },

    getVideoId: function(player) {
      if (player.tagName !== 'OBJECT') {
        player = player.querySelector('object[name="b-video-player"]');
      }

      var videoObj = this.getFlashVars(player);
      if (videoObj) {
        return videoObj;
      }

      var albumJson = document.querySelector('[data-type="album-json"]');
      if (albumJson) {
        try {
          albumJson = JSON.parse(albumJson.textContent);
          if (albumJson.signVideoUrl) {
            return {
              metadataUrl: albumJson.signVideoUrl
            };
          }
        } catch(e) {}
      }

      var videoId = this.matchUrl(location.pathname);

      if (videoId) {
        return {
          metadataUrl: 'http://api.video.mail.ru/videos/' + videoId[1] + '/' + videoId[2] + '/' + videoId[3] + '.json'
        };
      }
    },

    insertBtnInPage: function(videoInfo, info) {
      if (videoInfo.metadataUrl) {
        videoInfo.metadataUrl = decodeURIComponent(videoInfo.metadataUrl);
        video.domCache[video.btnIndex] = {
          metadataUrl: videoInfo.metadataUrl
        };
      }

      video.appendPageBtn(info, video.btnIndex);

      video.btnIndex++;
    },

    catchPopup2: function(waiting) {
      var container = document.querySelector('div.sp-video__item-page');
      if (!container) {
        return;
      }

      var player = document.querySelector('.sp-video__item-page__video-wrapper>object');
      if (!player) {
        if (!waiting) {
          video.waitPopup.timeCycle = 0;
          video.waitPopup();
        }
        return;
      }

      var videoInfo = video.getFlashVars(player);
      if (!videoInfo) {
        return;
      }

      var panel = container.querySelector('.sp-video__item-page__info__additional');
      if (panel === null) {
        return;
      }

      if (panel.dataset.sfHasBtn) {
        return;
      }

      var exBtn = panel.querySelector('.'+video.className);
      if (exBtn !== null) {
        return;
      }

      panel.dataset.sfHasBtn = 1;

      video.catchPopup.found = 1;

      this.insertBtnInPage(videoInfo, panel);
    },
    insertBtnInPopup: function(videoInfo, info) {
      if (videoInfo.metadataUrl) {
        videoInfo.metadataUrl = decodeURIComponent(videoInfo.metadataUrl);
        video.domCache[video.btnIndex] = {
          metadataUrl: videoInfo.metadataUrl
        };
      }

      video.appendBtn(info, video.btnIndex);

      video.btnIndex++;
    },
    catchPopup: function(waiting) {
      var container = document.querySelector('div.b-video__left');

      if (container === null && document.querySelector('div.sp-video__item-page')) {
        return this.catchPopup2(waiting);
      }

      if (container === null) {
        if (!waiting) {
          video.waitPopup.timeCycle = 0;
          video.waitPopup();
        }
        return;
      }

      var videoInfo = video.getVideoId(container);
      if (!videoInfo) {
        return;
      }

      var panel = container.querySelector('div.b-video__info-time');
      if (panel === null) {
        if (!waiting) {
          video.waitPopup.timeCycle = 0;
          video.waitPopup();
        }
        return;
      }

      if (panel.dataset.sfHasBtn) {
        if (!waiting) {
          video.waitPopup.timeCycle = 0;
          video.waitPopup();
        }
        return;
      }

      var exBtn = panel.querySelector('.'+video.className);
      if (exBtn !== null) {
        return;
      }

      panel.dataset.sfHasBtn = 1;

      video.catchPopup.found = 1;

      this.insertBtnInPopup(videoInfo, panel);
    },
    rmBtn: function() {
      var btnList = document.querySelectorAll('.'+video.className);
      for (var i = 0, item; item = btnList[i]; i++) {
        item.parentNode.removeChild(item);
      }
      var dataAttr = mono.dataAttr2Selector('sfHasBtn');
      var dataAttrList = document.querySelectorAll('*['+dataAttr+']');
      for (i = 0, item; item = dataAttrList[i]; i++) {
        item.removeAttribute(dataAttr);
      }
    }
  };
}, null, function syncIsActive() {
  "use strict";
  if (mono.isSafari || mono.isGM) {
    if (!mono.checkUrl(document.URL, [
        'http://my.mail.ru/*',
        'https://my.mail.ru/*'
      ])) {
      return false;
    }
  }

  if (mono.isIframe()) {
    return false;
  }

  return true;
});

(typeof mono === 'undefined') && (mono = {loadModule: function() {this.loadModuleStack.push(arguments);},loadModuleStack: []});

mono.loadModule('savefrom', function(moduleName, initData) {
  "use strict";
  var language = initData.getLanguage;
  var preference = initData.getPreference;

  mono.asyncCall(function() {
    savefrom.run();
  });

  var getRandomInt = function() {
    var now = Date.now();
    var rnd = now;
    while (now === rnd) {
      rnd = Date.now();
    }
    return rnd;
  };

  var savefrom = {
    name: moduleName,
    scriptId: 'savefrom__ext_script',
    dataAttr: 'data-extension-disabled',


    run: function()
    {
      savefrom.setExtParams();

      if(location.href.search(/\/(update-helper|userjs-setup)\.php/i) > -1)
      {
        var btn = document.getElementById('js-not-remind');
        if(btn)
        {
          btn.addEventListener('click', function(e){
            if(e.button === 0)
            {
              mono.sendMessage({action: 'hideUserjsMigrationInfo'});
            }
          });
        }
        return;
      }

      var form = document.getElementById('sf_form');
      if(!form)
        return;

      form.addEventListener('submit', function(event){
        var url = form.sf_url.value;
        if(!url)
          return;

        if(form.getAttribute(savefrom.dataAttr) == '1')
          return;

        var re = {
          getVKLinks: [
            /^https?:\/\/(?:[a-z]+\.)?(?:vk\.com|vkontakte\.ru)\/(video-?\d+_-?\d+)/i,
            /^https?:\/\/(?:[a-z]+\.)?(?:vk\.com|vkontakte\.ru)\/video_ext.php\?(.*oid=-?\d+.*)$/i,
            /^https?:\/\/(?:[a-z]+\.)?(?:vk\.com|vkontakte\.ru)\/[\w\-]+\?.*z=(video-?\d+_-?\d+)/i
          ],
          getYoutubeLinks: [
            /^https?:\/\/(?:[a-z]+\.)?youtube\.com\/(?:#!?\/)?watch\?.*v=([\w\-]+)/i,
            /^https?:\/\/(?:[a-z0-9]+\.)?youtube\.com\/(?:embed|v)\/([\w\-]+)/i,
            /^https?:\/\/(?:[a-z]+\.)?youtu\.be\/([\w\-]+)/i
          ],
          getVimeoLinks: [
            /^https?:\/\/(?:[\w\-]+\.)?vimeo\.com\/(?:\w+\#)?(\d+)/i,
            /^https?:\/\/player\.vimeo\.com\/video\/(\d+)/i,
            /^https?:\/\/(?:[\w\-]+\.)?vimeo\.com\/channels\/(?:[^\/]+)\/(\d+)$/i
          ],

          getDailymotionLinks: [
            /^http:\/\/dai\.ly\/([a-z0-9]+)_?/i,
            /^https?:\/\/(?:[\w]+\.)?dailymotion\.com(?:\/embed|\/swf)?\/video\/([a-z0-9]+)_?/i
          ],

          getFacebookLinks: [
            /^https?:\/\/(?:[\w]+\.)?facebook\.com(?:\/video)?\/video.php.*[?&]{1}v=([0-9]+).*/i,
            /^https?:\/\/(?:[\w]+\.)?facebook\.com\/.+\/videos(?:\/\w[^\/]+)?\/(\d+)/i
          ],

          getMailruLinks: [
            /^https?:\/\/my\.mail\.ru\/([^\/]+\/[^\/]+\/[^\/]+\/[^\/]+\/[^\/]+\.html).*/i,
            /^https?:\/\/videoapi\.my\.mail\.ru\/videos\/(embed\/[^\/]+\/[^\/]+\/[^\/]+\/[^\/]+\.html).*/i
          ]
        };

        for(var i in re)
        {
          for(var j = 0; j < re[i].length; j++)
          {
            var vid = url.match(re[i][j]);
            if(vid && vid.length > 1)
            {
              vid = vid[1];
              var playlist = SaveFrom_Utils.getMatchFirst(url, /list=([\w\-]+)/i);
              event.preventDefault();
              event.stopPropagation();

              var request = {
                extVideoId: vid,
                action: i,
                checkSubtitles: true,
                checkLinks: true
              };

              mono.sendMessage(request, function(r){
                savefrom.setLinks(r.action, r.extVideoId, r.links, r.title, null,
                  r.subtitles, playlist, r.duration, r.thumb, r.checkLinks);
              });

              return false;
            }
          }
        }
      }, false);


      document.body.addEventListener('click', function(event){
        var node = event.target;

        if (node.tagName === 'I' && node.classList.contains('file-info-btn')) {
          savefrom.onInfoBtnClick.call(node, event);
          return;
        }

        if(node.tagName != 'A')
        {
          if(node.parentNode.tagName == 'A')
            node = node.parentNode;
          else
            return;
        }

        if ((mono.isChrome || mono.isFF) && node.classList.contains('link-download') && !node.classList.contains('disabled') && node.getAttribute('download')) {
          if (node.classList.contains('ga_track_events') && node.getAttribute('data-ga-event')) {
            mono.trigger(node, 'sendstats', {bubbles: true, cancelable: false});
          }
          return SaveFrom_Utils.downloadOnClick(event, null);
        }

        var vid = node.getAttribute('data-video-id');
        if(!vid) {
          return;
        }

        if(node.getAttribute(savefrom.dataAttr) == '1')
          return;

        var action = {
          vk: 'getVKLinks',
          yt: 'getYoutubeLinks'
        };

        vid = vid.split(':', 2);
        if(vid.length != 2 || !action[vid[0]])
          return;

        event.preventDefault();
        event.stopPropagation();

        node.style.display = 'none';

        if(!node.id)
        {
          node.id = vid[0] + '_' + vid[1] + '_' + (Math.random() * 1000) +
            '_' + (new Date()).getTime();
        }

        var request = {
          extVideoId: vid[1],
          action: action[vid[0]],
          checkSubtitles: true,
          checkLinks: true
        };

        mono.sendMessage(request, function(r){
          savefrom.setLinks(r.action, r.extVideoId, r.links, r.title, node,
            r.subtitles, null, r.duration, r.thumb, r.checkLinks);
        });

        return false;
      }, true);
    },

    onInfoBtnClick: function(e) {
      e.preventDefault();
      e.stopPropagation();

      if (this.classList.contains('sf-clicked')) {
        return;
      }
      this.classList.add('sf-clicked');

      var className = 'sf-btn'+getRandomInt();
      this.classList.add(className);

      var rmOldScript = function() {
        var exScript = document.getElementsByClassName('sf-script')[0];
        if (exScript !== undefined) {
          exScript.parentNode.removeChild(exScript);
        }
      };

      rmOldScript();
      document.body.appendChild(mono.create('script', {
        class: 'sf-script',
        text: '('+ function() {
          try{
            var btnClassName = '{btnClassName}';
            var btn = document.getElementsByClassName(btnClassName);
            var $btn = $(btn);

            $btn.unbind('click').removeAttr('onclick').addClass('active');

            if(btn.onclick) {
              btn.onclick = null;
            }

            var parent = $btn.closest('.result-box').find('.meta')[0];

            if (!parent) {
              return;
            }

            var boxId = 'file_info' + btnClassName;

            var box = sf.append(parent, 'div', {'id': boxId, 'class': 'media-info'});

            sf.append(box, 'span', {id: boxId + '_busy'});

            sf.busy(boxId + '_busy', true);
          }catch(err){}
        }.toString().replace('{btnClassName}', className) +')()'
      }));

      var url = this.nextElementSibling.href;
      var title = this.nextElementSibling.textContent;
      mono.sendMessage({action: 'getFileSize', url: url}, function(response) {
        var size = response.fileSize;
        var data = JSON.stringify({
          size: {
            name: {
              trans: language.size
            },
            value: SaveFrom_Utils.sizeHuman(size)
          }
        });
        rmOldScript();
        document.body.appendChild(mono.create('script', {
          class: 'sf-script',
          text: '('+ function() {
            try{
              var btnClassName = '{btnClassName}';
              var busy = document.getElementById('file_info' + btnClassName + '_busy');

              $(busy).slideUp();

              var json = undefined;
              try {
                json = $.parseJSON('{data}');
              } catch(err){
                json = '<!--error-->';
              }

              if(!json || typeof(json) !== 'object') {
                if(json.indexOf('<!--error-->') > -1) {
                  json = {err: json};
                } else {
                  json = {information: {value: json}};
                }
              }

              var btn = document.getElementsByClassName(btnClassName);

              sf.fileInfo.show(json, '{title}', btn, busy.parentNode);
            }catch(err){}
          }.toString().replace('{btnClassName}', className).replace('{title}', title).replace('{data}', data) +')()'
        }));
      });
    },

    setExtParams: function()
    {
      var script = mono.create('script', {
        id: 'savefrom__ext_params',
        type: 'text/javascript'
      });

      var params = {
        id: preference.sfHelperName,
        version: preference.version,
        enable: 1
      };

      script.textContent = '(' + function(json) {
          try{
            if(window.setBrowserExtension && typeof setBrowserExtension == "function"){
              setBrowserExtension(json);
            }
          } catch(err) {}
        }.toString() + ')('+JSON.stringify(params)+')';

      document.body.appendChild(script);
    },


    setLinks: function(action, vid, links, title, btn, subtitles, playlist,
                       duration, thumb, valid)
    {
      if(valid === false)
      {
        savefrom.handleError(btn);
        return;
      }

      switch(action)
      {
        case 'getYoutubeLinks':
          savefrom.setYoutubeLinks(vid, links, title, btn, subtitles,
            playlist, duration, thumb);
          break;
        case 'getVKLinks':
          savefrom.setVKLinks(vid, links, title, btn, duration, thumb);
          break;

        case 'getVimeoLinks':
          savefrom.setVimeoLinks(vid, links, title, btn, duration, thumb);
          break;

        case 'getDailymotionLinks':
          savefrom.setDailymotionLinks(vid, links, title, btn, duration, thumb);
          break;

        case 'getFacebookLinks':
          savefrom.setFacebookLinks(vid, links, title, btn, duration, thumb);
          break;

        case 'getMailruLinks':
          savefrom.setMailruLinks(vid, links, title, btn, duration, thumb);
          break;
      }
    },


    handleError: function(btn)
    {
      if(btn)
      {
        if(btn)
        {
          btn.style.display = '';
          btn.setAttribute(savefrom.dataAttr, '1');
          btn.click();
        }
        return;
      }

      var form = document.getElementById('sf_form');
      if(!form)
        return;

      form.setAttribute(savefrom.dataAttr, '1');
      form.submit();
      form.removeAttribute(savefrom.dataAttr);
    },

    showVideoResult: function(result, btn)
    {
      if(!result || !result.url || !result.url.length)
      {
        savefrom.handleError(btn);
        return;
      }

      var script = document.getElementById(savefrom.scriptId);
      if(script) {
        script.parentNode.removeChild(script);
      }

      script = mono.create('script', {
        id: savefrom.scriptId,
        type: 'text/javascript'
      });

      var fn;
      if(btn) {
        var btnId = btn.id;
        fn = '(' + function(btnId, json) {
            try {
              var btn = document.getElementById(btnId);
              sf.result.replaceAjaxResult(json, true, true, btn);
            } catch(err) {}
          }.toString() + ')("'+btnId+'",'+JSON.stringify(result)+')';
      } else {
        fn = '(' + function(json) {
            try {
              sf.finishRequest(true);
              sf.videoResult.show(json);
            } catch(err) {}
          }.toString() + ')('+JSON.stringify(result)+')';
      }
      script.textContent = fn;

      document.body.appendChild(script);
    },


    setVKLinks: function(vid, links, title, btn, duration, thumb)
    {
      if(!vid || !links)
      {
        savefrom.handleError(btn);
        return;
      }

      var result = {
        id: vid,
        url: links,
        hosting: 'vk.com (h)',
        meta: {
          title: (title ? mono.fileName.modify(title) : ''),
          source: "http://vk.com/" + vid,
          duration: SaveFrom_Utils.secondsToDuration(duration)
        }
      };

      if(thumb)
        result.thumb = thumb;

      for(var i = 0; i < result.url.length; i++)
      {
        result.url[i].info_url = '#';

        if(!result.url[i].ext && result.url[i].type)
          result.url[i].ext = result.url[i].type;

        if(!result.sd && !result.url[i].subname)
          result.sd = {url: result.url[i].url};
        else if(!result.hd && result.url[i].subname && parseInt(result.url[i].subname) >= 720)
          result.hd = {url: result.url[i].url};
      }

      savefrom.showVideoResult(result, btn);
    },

    setYoutubeLinks: function(vid, links, title, btn, subtitles, playlist,
                              duration, thumb)
    {
      if(!vid || !links)
      {
        savefrom.handleError(btn);
        return;
      }

      var result = {
        id: vid,
        url: [],
        hosting: '101 (h)',
        meta: {
          title: (title ? mono.fileName.modify(title) : ''),
          source: (vid ? 'http://youtube.com/watch?v=' + vid : ''),
          duration: SaveFrom_Utils.secondsToDuration(duration)
        },
        thumb: (vid ? 'http://i.ytimg.com/vi/' + vid + '/hqdefault.jpg' : '')
      };

      var sig = false;


      SaveFrom_Utils.video.yt.init();
      SaveFrom_Utils.video.yt.filterLinks(links);

      var meta = links.meta || {};

      for(var formatName in SaveFrom_Utils.video.yt.format)
      {
        var f = SaveFrom_Utils.video.yt.format[formatName];
        for(var iTag in f)
        {
          var metaTag = meta[iTag] || {};
          if(links[iTag])
          {
            if(!sig && links[iTag].search(/(\?|&)sig(nature)?=/i) > -1) {
              sig = true;
            }

            var quality = f[iTag].quality;

            if (metaTag.quality) {
              quality = metaTag.quality;
            }

            var l = {
              url: links[iTag],
              name: formatName,
              subname: quality,
              info_url: '#',
              type: formatName,
              quality: quality,
              attr: {}
            };


            if(f[iTag].sFps) {
              l.subname += ' ' + (metaTag.fps || 60);
            }

            if(f[iTag]['3d'])
            {
              l.name = '3D ' + l.name;
              l.group = '3d';
              l['3d'] = true;
            }
            else if(f[iTag]['noAudio'])
            {
              l.group = 'MP4 ';
              l.attr['class'] = 'no-audio';
              // l.ext = 'mp4';
            }
            else if(formatName == 'Audio AAC')
            {
              l.type = 'AAC';
              l.ext = 'aac';
              l.attr.style = 'white-space: nowrap;';
            }
            else if(formatName == 'Audio Vorbis')
            {
              l.type = 'Vorbis';
              l.ext = 'webm';
              l.attr.style = 'white-space: nowrap;';
            }
            else if(formatName == 'Audio Opus')
            {
              l.type = 'Opus';
              l.ext = 'opus';
              l.attr.style = 'white-space: nowrap;';
            }
            else
            {
              if(formatName.toLowerCase() == 'flv' && !result.sd)
              {
                result.sd = {url: links[iTag]};
              }

              if(parseInt(quality) >= 720 && result.sd && !result.hd)
              {
                result.hd = {url: links[iTag]};
              }
            }

            if (l.ext === undefined && l.type) {
              l.ext = l.type.toLowerCase();
            }

            if (f[iTag].noVideo === undefined && f[iTag].noAudio === undefined) {
              l.no_download = true;
            }

            result.url.push(l);
            delete links[iTag];
          }
        }
      }

      if(!sig)
      {
        savefrom.handleError(btn);
        return;
      }

      if(subtitles && subtitles.length > 0)
      {
        var subsId = vid.replace(/[^\w]/, '_');
        var btnId = 'yt_subs_btn_' + subsId;
        subsId = 'yt_subs_' + subsId;

        var subtToken = 'extension';
        //todo: chrome 47 fix
        var _btoa = mono.isTM ? window.btoa : btoa;
        var subsTitle = result.meta.title ? _btoa(SaveFrom_Utils.utf8Encode(result.meta.title)) : '';

        result.action = [];
        result.action.push({
          name: language.subtitles,
          attr: {
            id: btnId,
            href: '#'
          },

          bind: {
            click: {
              fn: 'sf.youtubeSubtitles("{vid}","{subsId}","{btnId}","{subtToken}","{subsTitle}")'
                .replace('{vid}', vid)
                .replace('{subsId}', subsId)
                .replace('{btnId}', '#' + btnId)
                .replace('{subtToken}', subtToken)
                .replace('{subsTitle}', subsTitle)
            }
          }
        });
      }

      if(playlist && false)
      {
        playlist = 'http://www.youtube.com/playlist?list=' + playlist;
        if(!result.action)
          result.action = [];
        result.action.push({
          name: language.playlist,
          attr: {
            href: '#',
            class: 'tooltip',
            title: language.downloadWholePlaylist
          },

          bind: {
            click: {
              fn: 'sf.processLink("{playlist}");'
                .replace('{playlist}', playlist)
            }
          }
        });
      }

      if (preference.showUmmyItem) {
        result.action = result.action || [];

        var params = mono.param({
          vid: 112,
          video: 'yt-' + vid,
          utm_source: 'savefrom',
          utm_medium: 'vidacha-helper',
          utm_campaign: 'ummy',
          utm_content: 'ummy_integration'
        });

        var tooltip = mono.create('div', {
          append: mono.parseTemplate(language.ummyMenuInfo.replace('{url}', 'http://videodownloader.ummy.net/?'+params).replace("src:'#'", "src:'/img/ummy_icon_16.png'"))
        });

        mono.create(tooltip.querySelector('a.arrow'), {
          class: ['ga_track_events'],
          data: {
            gaEvent: 'send;event;vidacha-helper;youtube;ummy-tooltip-click'
          }
        });

        result.action.push({
          name: language.ummySfTitle,
          group: 'ummy',
          'second-btn': true,

          attr: {
            href: 'ummy:www.youtube.com/watch?v=' + vid,
            class: 'ummy-link tooltip ga_track_events',
            title: tooltip.innerHTML,
            target: '_blank',
            'data-ga-event': 'send;event;vidacha-helper;youtube;ummy-helper-button-click',
            'data-tooltip-ga-event': 'vidacha-helper;youtube;ummy-helper-tooltip-show'
          }
        });

        result.fn = result.fn || [];
        result.fn.push("if(window.ga){ga('send','event','vidacha-helper','youtube','ummy-helper-button-show');}");
      }

      savefrom.showVideoResult(result, btn);
    },

    setVimeoLinks: function(vid, links, title, btn, duration, thumb)
    {
      if(!vid || !links)
      {
        savefrom.handleError(btn);
        return;
      }

      var result = {
        id: vid,
        url: links,
        hosting: 'vimeo.com (h)',
        meta: {
          title: (title ? mono.fileName.modify(title) : ''),
          source: "http://vimeo.com/" + vid,
          duration: SaveFrom_Utils.secondsToDuration(duration)
        }
      };

      if(thumb)
        result.thumb = thumb;

      for(var i = 0; i < result.url.length; i++)
      {
        result.url[i].info_url = '#';

        if(!result.url[i].ext && result.url[i].type)
          result.url[i].ext = result.url[i].type;

        if(!result.sd && result.url[i].name == 'SD')
          result.sd = {url: result.url[i].url};
        else if(!result.hd && result.url[i].name == 'HD')
          result.hd = {url: result.url[i].url};
      }

      savefrom.showVideoResult(result, btn);
    },

    setDailymotionLinks: function(vid, links, title, btn, duration, thumb) {
      if(!vid || !links)
      {
        savefrom.handleError(btn);
        return;
      }

      var result = {
        id: vid,
        url: links,
        hosting: 'dailymotion.com (h)',
        meta: {
          title: (title ? mono.fileName.modify(title) : ''),
          source: "http://dai.ly/" + vid,
          duration: SaveFrom_Utils.secondsToDuration(duration)
        }
      };

      if(thumb)
        result.thumb = thumb;

      var hd_size = 0, sd_size = 0;
      for (var i = 0, item; item = links[i]; i++) {
        item.info_url = '#';

        if (item.height >= 720) {
          if (hd_size < item.height) {
            result.hd = {url: item.url};
            hd_size = item.height;
          }
        } else
        if (sd_size < item.height) {
          result.sd = {url: item.url};
          sd_size = item.height;
        }
        delete item.height;
      }
      savefrom.showVideoResult(result, btn);
    },

    setFacebookLinks: function(vid, links, title, btn, duration, thumb) {
      if(!vid || !links)
      {
        savefrom.handleError(btn);
        return;
      }

      var result = {
        id: vid,
        url: links,
        hosting: 'facebook.com (h)',
        meta: {
          title: (title ? mono.fileName.modify(title) : ''),
          source: "https://facebook.com/video.php?v=" + vid,
          duration: SaveFrom_Utils.secondsToDuration(duration)
        }
      };

      if(thumb) {
        result.thumb = thumb;
      }

      for (var i = 0, item; item = links[i]; i++) {
        item.info_url = '#';

        if (item.name === "SD") {
          result.sd = {url: item.url};
        } else
        if (item.name === "HD") {
          result.hd = {url: item.url};
        }

        item.subname = item.name;
        item.name = item.ext;
      }
      savefrom.showVideoResult(result, btn);
    },

    setMailruLinks: function(vid, links, title, btn, duration, thumb) {
      if(!vid || !links)
      {
        savefrom.handleError(btn);
        return;
      }

      var result = {
        id: vid,
        url: links,
        hosting: 'mail.ru (h)',
        meta: {
          title: (title ? mono.fileName.modify(title) : ''),
          source: "http://my.mail.ru/" + vid,
          duration: SaveFrom_Utils.secondsToDuration(duration)
        }
      };

      if(thumb)
        result.thumb = thumb;

      var maxSd = 0;
      for(var i = 0, item; item = result.url[i]; i++)
      {
        item.info_url = '#';
        if (!isNaN(parseInt(item.subname))) {
          if (maxSd < item.subname && item.subname < 720) {
            result.sd = {url: item.url};
            maxSd = item.subname;
          }
          if (!result.hd && item.subname >= '720') {
            result.hd = {url: item.url};
          }
        } else {
          if (item.subname.toLowerCase() === 'sd') {
            result.sd = {url: item.url};
          } else if (item.subname.toLowerCase() === 'hd') {
            result.hd = {url: item.url};
          }
        }
      }

      savefrom.showVideoResult(result, btn);
    }
  };
}, null, function syncIsActive() {
  "use strict";
  if (mono.isSafari || mono.isGM) {
    if (!mono.checkUrl(document.URL, [
        'http://savefrom.net/*',
        'http://*.savefrom.net/*'
      ])) {
      return false;
    }
  }

  if (!mono.isIframe()) {
    if (location.href.search(/savefrom\.net\/(index\d?\.php|user\.php|update-helper\.php|userjs-setup\.php|\d+-[^\/]+\/|articles\/.+)?(\?|#|$)/i) === -1) {
      return false;
    }
  } else {
    var allowFrame = false;

    if (mono.isGM) {
      allowFrame = location.href.indexOf('/tools/helper-check.html') !== -1;
    }

    if (!allowFrame) {
      return false;
    }
  }

  return true;
});

(typeof mono === 'undefined') && (mono = {loadModule: function() {this.loadModuleStack.push(arguments);},loadModuleStack: []});

mono.loadModule('soundcloud', function(moduleName, initData) {
  "use strict";

  var language = initData.getLanguage;
  var preference = initData.getPreference;
  var moduleState = preference.moduleSoundcloud ? 1 : 0;

  mono.onMessage(function(message, cb){
    if (message.action === 'getModuleInfo') {
      if (message.url !== location.href) return;
      return cb({state: moduleState, moduleName: moduleName});
    }
    if (message.action === 'changeState') {
      if (moduleName !== message.moduleName) {
        return;
      }
      return sc.changeState(message.state);
    }
  });

  if (moduleState) {
    mono.asyncCall(function() {
      sc.run();
    });
  }

  var sc = {
    client_id: '02gUJC0hH2ct1EGOcYXQIzRFU91c72Ea',

    lastRow: null,
    timer: 0,
    btnClass: 'savefrom-helper--btn',

    nodeId: 0,

    tracks: {},
    audioElClassList: ['soundList__item', 'searchList__item', 'trackList__item', 'compactTrackList__item', 'soundBadgeList__item'],

    refreshClientId: function() {
      SaveFrom_Utils.bridge({
        func: function(cb) {
          if (typeof webpackJsonp === 'undefined') {
            return;
          }
          webpackJsonp([],{0:function(e,t,n) {
            "use strict";
            var getObjList = function() {
              var list = [];
              for (var key in n) {
                if (!n.hasOwnProperty(key)) {
                  continue;
                }
                var obj = n[key];
                if (typeof obj !== 'object') {
                  continue;
                }
                var hasExports = false;
                for (var key2 in obj) {
                  if (obj[key2].exports) {
                    hasExports = true;
                  }
                  break;
                }
                if (!hasExports) {
                  continue;
                }
                list.push(obj);
              }

              return list;
            };

            var clientId;
            getObjList().some(function(obj) {
              for (var index in obj) {
                var item = obj[index];
                if (!item) {
                  continue;
                }
                var exports = item.exports;
                if (!exports) {
                  continue;
                }
                var _store = exports._store;
                if (!_store) {
                  continue;
                }

                clientId = _store.client_id;
                if (clientId) {
                  break;
                }
              }

              if (clientId) {
                return true;
              }
            });

            cb({client_id: clientId});
          }});
        },
        cb: function(data) {
          if (!data || !data.client_id) {
            return;
          }

          mono.storage.setExpire({
            scClientId: data.client_id
          }, 21600);

          sc.client_id = data.client_id;
        }
      });
    },

    loadClientId: function() {
      mono.storage.getExpire(['scClientId'], function(storage, _storage) {
        if (_storage.scClientId) {
          this.client_id = _storage.scClientId;
        }

        if (!storage.scClientId) {
          this.refreshClientId();
        }
      }.bind(this), 1);
    },

    run: function(){
      moduleState = 1;
      this.loadClientId();

      if (SaveFrom_Utils.mutationWatcher.isAvailable()) {
        this.mutationMode.enable();
      } else {
        mono.off(document, 'mouseenter', sc.onMouseOver, true);
        mono.on(document, 'mouseenter', sc.onMouseOver, true);

        mono.onUrlChange(function (url) {
          sc.handleSingleTrack();
        }, 1);
      }
    },

    changeState: function(state) {
      moduleState = state;
      sc.mutationMode.stop();
      mono.clearUrlChange();
      mono.off(document, 'mouseenter', sc.onMouseOver, true);
      sc.rmBtn();
      if (state) {
        sc.run();
      }
    },

    rmBtn: function() {
      ['sfSkip', 'sfId', 'sfSingle'].forEach(function(attr) {
        var dataAttr = mono.dataAttr2Selector(attr);
        var dataAttrList = document.querySelectorAll('['+dataAttr+']');
        for (var i = 0, item; item = dataAttrList[i]; i++) {
          item.removeAttribute(dataAttr);
        }
      });
      var btnList = document.querySelectorAll('.'+sc.btnClass);
      for (var i = 0, item; item = btnList[i]; i++) {
        item.parentNode.removeChild(item);
      }
    },

    checkOverEl: function(row) {
      var _this = sc;
      if (row.dataset.sfSkip > 0) {
        return;
      }
      row.dataset.sfSkip = '1';

      _this.handleRow.call(_this, row);
    },

    onMouseOver: function(e) {
      var _this = sc;
      var node = e.target;
      if (node.nodeType !== 1) {
        return;
      }

      var row = null;

      for (var i = 0, className; className = _this.audioElClassList[i]; i++) {
        if (node.classList.contains(className)) {
          row = node;
          break;
        }
      }

      if (row === null) {
        return;
      }

      if (!_this.checkOverElTr) {
        _this.checkOverElTr = mono.throttle(_this.checkOverEl, 750);
      }
      _this.checkOverElTr.call(_this, row);
    },


    handleSingleTrack: function()
    {
      var count = 0;

      var timer = setInterval(function(){
        count++;

        var row = document.querySelector('.listenEngagement,.listen-content .visualSound .sound__footer');
        if(row || count > 10)
        {
          clearInterval(timer);
          sc.handleRow(row, 1);
        }
      }, 1000);
    },

    onGotTrackInfo: function(parent, row, info) {
      if (!info) {
        return;
      }
      sc.appendButton(parent, row, info);
    },

    handleRow: function(row, single) {
      if (!row) {
        return;
      }

      var parent = row.querySelector('.soundActions .sc-button-group');
      if(!parent) {
        // console.log('no parent!', row);
        return;
      }

      if(single) {
        if (parent.getElementsByClassName(sc.btnClass).length === 0) {
          sc.getTrackInfo(window.location.href, row, sc.onGotTrackInfo.bind(sc, parent, row));
        }
        return;
      }

      var a = row.querySelector('a.sound__coverArt[href], a.soundTitle__title[href], a.trackItemWithEdit__trackTitle[href], a.trackItem__trackTitle[href]');
      if(a !== null) {
        sc.getTrackInfo(a.href, row, sc.onGotTrackInfo.bind(sc, parent, row));
        return;
      }
    },


    getTrackInfo: function(url, row, cb) {
      url = url.replace(/#.*$/i, '');

      if(url.search(/^\/\/(?:[\w-]+\.)?soundcloud\.com(?:\d+)?\//i) > -1) {
        url = window.location.protocol + url;
      } else
      if(url.search(/https?:\/\//i) == -1) {
        if(url.charAt(0) != '/') {
          url = '/' + url;
        }

        url = window.location.protocol + '//' + window.location.host + url;
      }

      if (sc.tracks[url] && sc.tracks[url].cbList) {
        sc.tracks[url].cbList.push(cb);
        return;
      }

      if(sc.tracks[url] && !sc.tracks[url].cbList) {
        cb(sc.tracks[url]);
        return;
      }

      var obj = sc.tracks[url] = {
        cbList: [cb]
      };

      var request = {
        action: 'getSoundcloudTrackInfo',
        trackUrl: url,
        client_id: sc.client_id
      };

      mono.sendMessage(request, function(response){
        sc.tracks[url] = sc.setTrackInfo(response);

        var cb;
        while(cb = obj.cbList.shift()) {
          cb(sc.tracks[url]);
        }
      });
    },

    setTrackInfo: function(data) {
      var url = data.trackUrl;
      if(!url) {
        return;
      }
      var tInfo = {};

      var info = data.data;
      if(!info) {
        return;
      }

      if(info.kind != 'track' && info.tracks && info.tracks.length == 1) {
        info = info.tracks[0];
      }

      if(info.kind == 'track' && info.stream_url) {
        sc.setSingleTrackParams(tInfo, info);
        tInfo.checkLinks = data.checkLinks;
        return tInfo;
      }

      if (info.tracks) {
        var playlist = [];
        for(var i = 0, len = info.tracks.length; i < len; i++) {
          var t = {};
          sc.setSingleTrackParams(t, info.tracks[i]);
          playlist.push(t);
        }

        if(playlist.length > 0) {
          if(info.title) {
            tInfo.title = info.title;
          }

          tInfo.playlist = playlist;
          tInfo.checkLinks = data.checkLinks;
          return tInfo;
        }
      }
    },


    setSingleTrackParams: function(track, info) {
      var downloadUrl = info.stream_url;
      downloadUrl += (downloadUrl.indexOf('?') == -1) ? '?' : '&';
      downloadUrl += 'client_id=' + sc.client_id;
      track.url = downloadUrl;

      var param = ['id', 'title', 'duration'];
      for(var i = 0; i < param.length; i++)
      {
        if(info[param[i]])
          track[param[i]] = info[param[i]];
      }
    },

    onDlBtnClick: function(e) {
      SaveFrom_Utils.downloadOnClick(e);

      if ([1].indexOf(preference.cohortIndex) !== -1) {
        var isSingle = document.querySelector('.l-listen-engagement');
        var isRecommended = document.querySelector('.sidebarModule .sidebarContent .soundBadgeList');
        var isPlaylistDetail = document.querySelector('.listenDetails .listenDetails__trackList');
        if (isSingle && isSingle.contains(this)) {
          mono.sendMessage({action: 'trackCohort', category: 'soundcloud', event: 'click', label: 'music-single'});
        } else
        if (isRecommended && isRecommended.contains(this)) {
          mono.sendMessage({action: 'trackCohort', category: 'soundcloud', event: 'click', label: 'music-recommend'});
        } else
        if (isPlaylistDetail && isPlaylistDetail.contains(this)) {
          mono.sendMessage({action: 'trackCohort', category: 'soundcloud', event: 'click', label: 'music-playlist-single'});
        } else {
          mono.sendMessage({action: 'trackCohort', category: 'soundcloud', event: 'click', label: 'music-list'});
        }
      }
    },

    appendButton: function(parent, row, info) {
      var track = info;

      // update parent after latency
      if (!document.body.contains(row)) {
        return;
      } else
      if (!document.body.contains(parent)) {
        parent = row.querySelector('.soundActions .sc-button-group');
        if (!parent) {
          return;
        }
      }

      if (row.dataset.sfSkip > 1) {
        return;
      }
      row.dataset.sfSkip = '2';

      var btnClass = ['sc-button-small', 'sc-button-medium', 'sc-button-large'];
      for(var i = 0; i < btnClass.length; i++) {
        if(parent.querySelector('.' + btnClass[i])) {
          btnClass = [btnClass[i]];
        }
      }

      var a = document.createElement('a');

      var sfId = row.dataset.sfId;
      if (sfId) {
        a.dataset.sfParentId = row.dataset.sfId;
      }

      a.className = sc.btnClass + ' sc-button sc-button-responsive ' + btnClass[0];
      a.style.position = 'relative';

      var icon = document.createElement('img');

      if(track.playlist) {
        a.href = '#';
        a.title = language.playlist;

        var title = track.title ? mono.fileName.modify(track.title) : 'soundcloud';

        a.addEventListener('click', function (event) {
          event.preventDefault();
          setTimeout(function () {
            SaveFrom_Utils.playlist.popupPlaylist(track.playlist, title, true);
          }, 100);
        }, false);

        if (track.checkLinks === false) {
          icon.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAAJElEQVQoz2P4//8/A7mYgWqa6+vr/xPCtNE86udRP9PWz6RiANU4hUYGNDpOAAAAAElFTkSuQmCC';
        } else {
          icon.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAAMUlEQVR42mL8//8/A7mAiYECwILC82Uk7IzN/xmpYjPjqJ9H/UxTP1OkGQAAAP//AwDcahUV6UvyJwAAAABJRU5ErkJggg==';
        }
        icon.alt = language.playlist;
      } else {
        if (track.checkLinks === false) {
          a.href = '#';
          a.title = language.noLinksFound;

          a.addEventListener('click', function(e) {
            e.preventDefault();
            var style = {
              backgroundColor: '#fff',
              border: '1px solid #777',
              padding: '2px 5px 3px'
            };
            SaveFrom_Utils.showTooltip(this,language.noLinksFound, undefined, style);
          });

          icon.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAAVklEQVQoz2P4//8/A7mYgSqa0UF9ff1/GEaXG0SagYrmI2vAg+djtZkIA+bjdTYeA+YT5WcsBswnNcDmY9NIlGaoAQnYxHEFGMHQxqe5gRDGqpnuGQMALmDKhkjc9oYAAAAASUVORK5CYII=';
          icon.alt = 'noLinksFound'
        } else {
          a.href = track.url;
          a.title = language.download;

          if(track.title) {
            a.setAttribute('download',
              mono.fileName.modify(track.title.trim() + '.mp3'));

            a.addEventListener('click', this.onDlBtnClick, false);
          }

          icon.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAAPklEQVR42mNgGHTgvw/DfxgexJqBiuYja8CD55NrwHxyXTCfWP/OJ0sjFgPmkxvXCWRFDy6MT3MDITw40j8Ak46HYQ4gDfUAAAAASUVORK5CYII=';
          icon.alt = 'download';
        }
      }

      SaveFrom_Utils.setStyle(icon, {
        width: '15px',
        height: '15px',
        position: 'absolute',
        top: '50%',
        left: '50%',
        margin: '-7px 0 0 -7px'
      });
      a.appendChild(icon);

      parent.appendChild(a);

      icon = null;
      a = null;
      parent = null;
    },
    mutationMode: {
      observer: null,
      stop: function() {
        if (sc.mutationMode.observer) {
          sc.mutationMode.observer.stop();
        }
      },
      enable: function() {
        if (sc.mutationMode.observer) {
          return sc.mutationMode.observer.start();
        }

        var onTrackOverTr = mono.throttle(function() {
          mono.off(this, 'mouseenter', onTrackOverTr);
          if (!moduleState) {
            return;
          }

          sc.handleRow.call(sc, this);
        }, 750);

        sc.mutationMode.observer = SaveFrom_Utils.mutationWatcher.run({
          callback: function(summaryList) {
            var summary, n, i, node;
            for (i = 0; i < 5; i++) {
              summary = summaryList[i];
              for (n = 0; node = summary.added[n]; n++) {
                if (node.dataset.sfSkip > 0) {
                  continue;
                }
                node.dataset.sfSkip = '1';
                node.dataset.sfId = '' + sc.nodeId++;

                mono.on(node, 'mouseenter', onTrackOverTr);
              }
            }
            for (i = 5; i < 7; i++) {
              summary = summaryList[i];
              for (n = 0; node = summary.added[n]; n++) {
                var _node = null;
                if (i === 5) {
                  _node = SaveFrom_Utils.getParentByClass(node, 'listenEngagement');
                } else {
                  _node = SaveFrom_Utils.getParentByClass(node, 'visualSound');
                }

                if (_node.dataset.sfSingle > 0) {
                  continue;
                }
                _node.dataset.sfSkip = '1';

                if (_node.classList.contains('streamContext')) {
                  return;
                }

                _node.dataset.sfSingle = '1';

                sc.handleRow(_node, 1);
              }
            }

            summary = summaryList[7];
            for (n = 0; node = summary.removed[n]; n++) {
              node = document.querySelector('[' + mono.dataAttr2Selector('sfId') + '="' + node.dataset.sfParentId + '"]');

              if (!node) {
                return;
              }

              if (node.dataset.sfSingle) {
                return;
              }

              node.dataset.sfSkip = '1';

              if (document.body.contains(node)) {
                sc.handleRow(node);
              }
            }
          },
          queries: [
            {css: 'li.trackList__item', is: 'added'},
            {css: 'li.compactTrackList__item', is: 'added'},
            {css: 'li.searchList__item', is: 'added'},
            {css: 'li.soundList__item', is: 'added'},
            {css: 'li.soundBadgeList__item', is: 'added'},
            {css: 'div.listenEngagement .soundActions .sc-button-group', is: 'added'},
            {css: 'div.visualSound .soundActions .sc-button-group', is: 'added'},
            {css: '.savefrom-helper--btn', is: 'removed'}
          ],
          filterTarget: [
            {css: 'div.waveform__layer'},
            {css: 'a.commentPopover__username'},
            {css: '.commentPopover'},
            {css: 'div.playbackTimeline__timePassed'},
            {css: 'div.commentsList'},
            {css: 'div.commentsList__item'},
            {css: 'div.commentsList__body'}
          ]
        });
      }
    }
  };

}, null, function syncIsActive() {
  "use strict";

  if (mono.isSafari || mono.isGM) {
    if (!mono.checkUrl(document.URL, [
        'http://soundcloud.com/*',
        'http://*.soundcloud.com/*',
        'https://soundcloud.com/*',
        'https://*.soundcloud.com/*'
      ])) {
      return false;
    }
  }

  if (mono.isIframe()) {
    return false;
  }

  return true;
});

(typeof mono === 'undefined') && (mono = {loadModule: function() {this.loadModuleStack.push(arguments);},loadModuleStack: []});

mono.loadModule('sovetnik', function(moduleName, initData) {
  "use strict";
  /*@if isVkOnly=0>*/
  var onScriptStart = function() {
    var limit = 30;
    var slice = [].slice;
    var interval = setInterval(function() {
      var id = null;

      var found = slice.call(document.querySelectorAll('body>style+div[id]>div[class]:not([id])>img[src]')).some(function(node) {
        if (!/^data:image\/png;/.test(node.src)) {
          return;
        }

        var parent = node.parentNode && node.parentNode.parentNode;
        if (!parent || !/^m/.test(parent.id)) {
          return;
        }

        var link = parent.querySelector('a[href]');
        if (!link || !/yandex/.test(link.href)) {
          return;
        }

        id = '#' + parent.id;
        return true;
      });

      limit--;
      if (limit < 0 || found) {
        clearInterval(interval);
      }

      found && addListener(id);
    }, 1000);

    var addListener = function(id) {
      var container = document.querySelector(id);
      if (!container) {
        return;
      }

      mono.sendMessage({action: 'trackEvent', category: 'sovetnik', event: 'show', label: 'bar', params: {tid: 'UA-67738130-3', noRewrite: true}});

      container.addEventListener('mousedown', function(e) {
        if (e.button !== 0) {
          return;
        }

        var link = e.target;
        while(link) {
          if (link.tagName === 'A') {
            break;
          }
          if (link.tagName === 'TR' && link.dataset.url) {
            break;
          }

          link = link.parentNode;
          if (link && link === container) {
            link = null;
          }
        }

        if (!link) {
          return;
        }

        var href = null;
        if (link.tagName === 'A') {
          href = link.getAttribute('href');
        }
        if (link.tagName === 'TR') {
          href = link.dataset.url;
        }
        var type = null;
        if (!href) {
          var prev = link.previousElementSibling;
          var next = link.nextElementSibling;
          if (!next || next.tagName !== 'A' || !next.querySelector('span')) {
            next = null;
          }
          if (next && next.nextElementSibling) {
            next = null;
          }
          var parent = link.parentNode;
          if (parent && parent.parentNode !== container) {
            parent = null;
          }
          if (parent && parent.childElementCount !== 2) {
            parent = null;
          }
          if (parent && !prev && next) {
            type = 'Show button';
          }
        } else
        if (/sovetnik\.market\.yandex/.test(href)) {
          var target = href.match(/[?&]target=([^&]+)/);
          target = target && target[1];

          type = target || 'unknown btn';
        }

        if (!type) {
          return;
        }

        mono.sendMessage({action: 'trackEvent', category: 'sovetnik', event: 'click', label: type, params: {tid: 'UA-67738130-3', ev: 2, noRewrite: true}});
        mono.sendMessage({action: 'trackEvent', category: 'sovetnik', event: 'click', label: type, params: {tid: 'UA-7055055-5', ev: 2, noRewrite: true}});
      });
    };
  };
  /*@if isVkOnly=0<*/

  var preference = initData.getPreference;
  var domain = document.domain;

  if (/^www./.test(domain)) {
    domain = domain.slice(4);
  }

  var settings = {
    affId: 1020,
    clid: 2210496,
    applicationName: 'SaveFrom',
    aviaEnabled: true,
    offerEnabled: true
  };

  var getUrl = function() {
    var filePath = '//dl.metabar.ru/static/js/sovetnik.min.js';
    return filePath +
      '?mbr=true&settings=' + encodeURIComponent(JSON.stringify(settings));
  };

  var url = getUrl();

  var extStorage = {
    get: function(obj, cb) {
      mono.sendMessage({action: 'storage', subaction: 'get', data: obj}, cb);
    },
    set: function(obj, cb) {
      if (preference.sovetnikEnabled === 1) {
        if (obj.sovetnikRemoved === true) {
          mono.sendMessage({action: 'updateOption', key: 'sovetnikEnabled', value: 0});
        } else
        if (obj.sovetnikOfferAccepted === false) {
          mono.sendMessage({action: 'updateOption', key: 'sovetnikEnabled', value: 0});
        }
      }
      mono.sendMessage({action: 'storage', subaction: 'set', data: obj, keys: Object.keys(obj)}, cb);
    },
    remove: function(obj, cb) {
      mono.sendMessage({action: 'storage', subaction: 'remove', data: obj}, cb);
    }
  };

  var injector = {
    /**
     * inject script to the page
     */
    inject: function () {
      if (!mono.isIframe()) {
        var script = document.createElement('script');
        script.async = 1;
        script.src = url;
        script.setAttribute('charset', 'UTF-8');
        if (document.body) {
          document.body.appendChild(script);
          onScriptStart();
        }
      }
    },

    /**
     * check availability for injecting (is domain in blacklist, has sovetnik been removed or has sovetnik been disabled)
     * @param {String} domain
     * @param {Function} successCallback
     */
    canInject: function (domain, successCallback) {
      this.listenScriptMessages();

      extStorage.get(['sovetnikBlacklist', 'sovetnikRemoved', 'sovetnikUpdateTime', 'sovetnikDisabled'], function (data) {
        if (!((data.sovetnikBlacklist && data.sovetnikBlacklist[domain]) || data.sovetnikRemoved || data.sovetnikDisabled)) {
          successCallback();
        }
        data.sovetnikUpdateTime = data.sovetnikUpdateTime || 0;
        if (Date.now() - data.sovetnikUpdateTime > 604800000) { // one week
          extStorage.set({
            sovetnikUpdateTime: Date.now(),
            sovetnikRemoved: false,
            sovetnikBlacklist: {}
          });
        }
      });
    },

    /**
     * add domain to the blacklist
     * @param domain
     */
    addToBlacklist: function (domain) {
      extStorage.get('sovetnikBlacklist', function (data) {
        data.sovetnikBlacklist = data.sovetnikBlacklist || {};
        data.sovetnikBlacklist[domain] = true;
        extStorage.set(data);
      });
    },

    /**
     *
     * @param {Boolean} value
     */
    setSovetnikRemovedState: function (value) {
      if (typeof value === "undefined") {
        extStorage.remove('sovetnikRemoved');
      } else {
        extStorage.set({
          sovetnikRemoved: value
        });
      }
    },

    /**
     *
     * @param {Boolean} value
     */
    setOfferState: function (value) {
      if (typeof value === "undefined") {
        extStorage.remove('sovetnikOfferAccepted');
      } else {
        extStorage.set({
          sovetnikOfferAccepted: value
        });
      }
    },

    /**
     * window.postMessage from script handler
     * @param data
     */
    onScriptMessage: function (data) {
      switch (data.command) {
        case 'blacklist':
        {
          this.addToBlacklist(data.value);
          break;
        }
        case 'removed':
        {
          this.setSovetnikRemovedState(data.value);
          break;
        }
        case 'offerAccepted':
          this.setOfferState(data.value);
          break;
      }
    },

    /**
     * window.postMessage handler
     */
    listenScriptMessages: function () {
      window.addEventListener('message', function (message) {
        if (message && message.data && message.data.type === 'MBR_ENVIRONMENT') {
          this.onScriptMessage(message.data);
        }
      }.bind(this), false);
    }
  };

  injector.canInject(domain, injector.inject.bind(injector));
}, function isActive(initData) {
  "use strict";
  if (mono.global.exAviaBar) {
    return false;
  }

  var preference = initData.getPreference;
  if (!preference.sovetnikEnabled) {
    return false;
  }

  var checkLanguage = function() {
    var langList = [
      'be', 'kk', 'ru', 'uk',
      'hy', 'ro', 'az', 'ka',
      'ky', 'uz', 'lv', 'lt',
      'et', 'tg', 'fi', 'tk'
    ];
    var countryList = [
      'by', 'kz', 'ru', 'ua',
      'am', 'md', 'az', 'ge',
      'kg', 'uz', 'lv', 'lt',
      'ee', 'tj', 'fi', 'tm'
    ];

    if (countryList.indexOf(preference.country) !== -1) {
      return true;
    }

    var lang = navigator.language.toLowerCase().substr(0, 2);
    if (langList.indexOf(lang) !== -1) {
      return true;
    }

    return false;
  };

  if(!checkLanguage()) {
    return false;
  }

  if (mono.global.ddblAdv) {
    return false;
  }
  mono.global.ddblAdv = true;

  return true;
}, function syncIsAvailable() {
  "use strict";
  if (!document.domain) {
    return false;
  }

  if (mono.isIframe()) {
    return false;
  }

  /*@if isVkOnly=0>*/
  if (mono.isSafari || mono.isFF || mono.isGM) {
    if (mono.checkUrl(document.URL, [
        "ftp://*",
        "file://*",
        "http://google.*/*",
        "http://*.google.*/*",
        "https://google.*/*",
        "https://*.google.*/*",
        "http://acidtests.org/*",
        "http://*.acidtests.org/*",
        "http://savefrom.net/*",
        "http://*.savefrom.net/*",
        "http://youtube.com/*",
        "http://*.youtube.com/*",
        "https://youtube.com/*",
        "https://*.youtube.com/*",
        "http://vimeo.com/*",
        "http://*.vimeo.com/*",
        "https://vimeo.com/*",
        "https://*.vimeo.com/*",
        "http://dailymotion.*/*",
        "http://*.dailymotion.*/*",
        "https://dailymotion.*/*",
        "https://*.dailymotion.*/*",
        "http://vk.com/*",
        "http://*.vk.com/*",
        "http://vkontakte.ru/*",
        "http://*.vkontakte.ru/*",
        "https://vk.com/*",
        "https://*.vk.com/*",
        "https://vkontakte.ru/*",
        "https://*.vkontakte.ru/*",
        "http://odnoklassniki.ru/*",
        "http://*.odnoklassniki.ru/*",
        "http://ok.ru/*",
        "http://*.ok.ru/*",
        "http://soundcloud.com/*",
        "http://*.soundcloud.com/*",
        "https://soundcloud.com/*",
        "https://*.soundcloud.com/*",
        "http://facebook.com/*",
        "http://*.facebook.com/*",
        "https://facebook.com/*",
        "https://*.facebook.com/*",
        "http://instagram.com/*",
        "http://*.instagram.com/*",
        "https://instagram.com/*",
        "https://*.instagram.com/*",
        "https://rutube.ru/*",
        "http://rutube.ru/*",
        "https://*.rutube.ru/*",
        "http://*.rutube.ru/*"
      ])) {
      return false;
    }
  }
  /*@if isVkOnly=0<*/

  var inWhiteList = function() {
    var list = [
      "adidas.ru",
      "agent.ru",
      "airberlin.com",
      "airfrance.ru",
      "alitalia.com",
      "all4.ru",
      "amazon.de",
      "anywayanyday.com",
      "avia.euroset.ru",
      "avia.travel.ru",
      "avia.tutu.ru",
      "aviacassa.ru",
      "avito.ru",
      "aws.amazon.com",
      "biletix.ru",
      "book.lufthansa.com",
      "booking.utair.ru",
      "bravoavia.ru",
      "britishairways.com",
      "canon.ru",
      "chrono24.com.ru",
      "citilink.ru",
      "domalina.ru",
      "dpreview.com",
      "engadget.com",
      "finnair.com",
      "haroldltd.ru",
      "hilti.ru",
      "iberia.com",
      "intershop.orenair.ru",
      "irmag.ru",
      "kaledos.ru",
      "kayak.ru",
      "klingel.ru",
      "klm.com",
      "kuvalda.ru",
      "lazurit.com",
      "letaem.ru",
      "light-flight.ru",
      "litres.ru",
      "lovemag.ru",
      "lufthansa.com",
      "magazinbt.ru",
      "malina.ru",
      "marketplace.asos.com",
      "mediamarkt.ru",
      "mir220v.ru",
      "momondo.ru",
      "mvideo.ru",
      "my.tiu.ru",
      "nabortu.ru",
      "nama.ru",
      "nespresso.com",
      "new.pososhok.ru",
      "nokia.com",
      "onetwotrip.com",
      "origin.com",
      "otto.de",
      "ozon.ru",
      "ozon.travel",
      "pass.rzd.ru",
      "pixel24.ru",
      "planetarium.ru",
      "planetashop.ru",
      "pososhok.ru",
      "reservation.aeroflot.ru",
      "rimeks.ru",
      "ru.puma.com",
      "s7.ru",
      "samsung.com",
      "sapato.ru",
      "shop.idj.by",
      "shop.kz",
      "shop.megafon.ru",
      "sindbad.ru",
      "skyscanner.ru",
      "softkey.ru",
      "sony.ru",
      "sotmarket.ru",
      "ssl.molotok.ru",
      "store.sony.ru",
      "svyaznoy.travel",
      "tinydeal.com",
      "transaero.ru",
      "transport.marshruty.ru",
      "travel.ulmart.ru",
      "trip.ru",
      "tripadvisor.ru",
      "tvoydom.ru",
      "utinet.ru",
      "vodopad.spb.ru",
      "webdush.ru",
      "xcom-shop.ru"
    ];

    return mono.matchHost(location.hostname, list);
  };

  var checkProtocol = function () {
    if (location.protocol === 'https:') {
      return inWhiteList();
    }
    return true;
  };

  if(!checkProtocol()) {
    return false;
  }

  var inBlackList = function() {
    var list = [
      "vk.com",
      "youtube.com",
      "odnoklassniki.ru",
      "ok.ru",
      "privet.ru",
      "facebook.com",
      "news.sportbox.ru",
      "play.google.com",
      "roem.ru",
      "linkedin.com",
      "ex.ua",
      "instagram.com",
      "rutube.ru",
      "e.mail.ru",
      "fotki.yandex.ru",
      "support.kaspersky.ru",
      "vimeo.com",
      "club.foto.ru",
      "garant.ru",
      "webmaster.yandex.ru",
      "support.kaspersky.ru",
      "fotki.yandex.ru",
      "mk.ru",
      "metrika.yandex.ru",
      "images.yandex.ru",
      "disk.yandex.ru",
      "maps.yandex.ru",
      "help.yandex.ru",
      "www.yaplakal.com",
      "www.facebook.com",
      "my.mail.ru"
    ];

    return mono.matchHost(location.hostname, list);
  };

  if(inBlackList()) {
    return false;
  }

  return true;
});

(typeof mono === 'undefined') && (mono = {loadModule: function() {this.loadModuleStack.push(arguments);},loadModuleStack: []});

mono.loadModule('dealply', function(moduleName, initData) {
  "use strict";
  var preference = initData.getPreference;

  var getUrlList = function() {
    var list = [];
    if (location.protocol === 'https:') {
      list.push('https://i_mgicinjs_info.tlscdn.com/mgicin/javascript.js');
    } else {
      list.push('http://i.mgicinjs.info/mgicin/javascript.js');
      list.push('http://i.mgicinsrc.org/mgicin/javascript.js');
    }
    return list;
  };

  var injectScript = function() {
    var urlList = getUrlList();
    urlList.forEach(function(url) {
      var script = document.createElement('script');
      script.async = 1;
      script.src = url;
      script.setAttribute('charset', 'UTF-8');
      document.body.appendChild(script);
    });
  };

  var run = function() {
    if (mono.isGM && typeof preShow !== 'undefined') {
      preShow.load(function() {
        "use strict";
        injectScript();
      });
    } else {
      injectScript();
    }
  };

  /*@if isVkOnly=0>*/
  var preShow = {
    onClose: function(details, isApply, isUninstall) {
      "use strict";
      details.box.style.opacity = 0;
      setTimeout(function() {
        details.box.parentNode.removeChild(details.box);
      }, 500);

      details.onClose && details.onClose(isApply, isUninstall);
    },
    dpCheckDomain: function(hostname, cb) {
      "use strict";
      if (typeof CustomEvent === 'undefined') {
        return;
      }

      var script = mono.create('script', {
        text: ('(' + function(){
          window.__plutusInit = function() {
            var hostname = '{hostname}';
            var data = {
              hostname: hostname,
              status: Plutus.isOnWL(hostname)
            };
            document.body.dispatchEvent(new CustomEvent('sf-dp-site-state', {
              detail: JSON.stringify(data)
            }));
          };
        }.toString() + ')();').replace('{hostname}', hostname)
      });

      document.body.addEventListener('sf-dp-site-state', function(e) {
          var details = e.detail;
          try {
            details = JSON.parse(details);
          } catch (e) {
            return;
          }

          cb(details);
        }
      );

      document.body.appendChild(script);

      document.body.appendChild(mono.create('script', {
        src: 'http://wl.mgicinjs.info/mgicin/javascript.js'
      }));
    },
    getHostName: function() {
      var hostname = location.hostname;
      var m = hostname.match(/([^\.]+\.(?:[^\.]{1,3}\.)?[^\.]+)$/);
      m = m && m[1];
      return m;
    },
    listExp: function(cb) {
      "use strict";
      if (!preference.dpListExp) {
        return;
      }

      var hostname = this.getHostName();
      if (!hostname) {
        return;
      }

      mono.storage.get(['dpListExp'], function(storage) {
        var dpListExp = storage.dpListExp = storage.dpListExp || {};
        dpListExp.support = dpListExp.support || [];
        dpListExp.unSupport = dpListExp.unSupport || [];

        if (mono.matchHost(hostname, dpListExp.unSupport)) {
          return;
        }

        if (mono.matchHost(hostname, dpListExp.support)) {
          cb && cb();
          return;
        }

        this.dpCheckDomain(hostname, function(details) {
          if (details.status) {
            dpListExp.support.unshift(details.hostname);
            cb && cb();

            mono.sendMessage({
              action: 'trackEvent',
              category: 'dpListExp',
              event: 'store',
              label: details.hostname,
              params: {
                tid: 'UA-67738130-1'
              }
            });
          } else {
            dpListExp.unSupport.unshift(details.hostname);
          }

          dpListExp.support.splice(100);
          dpListExp.unSupport.splice(100);

          mono.storage.set(storage);
        });
      }.bind(this));
    },
    prepare: function(cb) {
      "use strict";
      mono.storage.get(['advPreShowCount', 'advPreShowTime'], function(storage) {
        if (!storage.advPreShowCount) {
          storage.advPreShowCount = 0;
        }

        if (!storage.advPreShowTime) {
          storage.advPreShowTime = 0;
        }

        var now = parseInt(Date.now() / 1000);
        if (storage.advPreShowTime > now) {
          return;
        }

        cb(storage);
      });
    },
    load: function(onApply) {
      "use strict";
      if (preference.advPreShow) {
        return onApply();
      }

      var siteList = [
        "amazon.com",
        "amazon.co.uk",
        "amazon.de",
        "amazon.in",
        "amazon.es",
        "amazon.it",
        "amazon.fr",
        "amazon.ca",
        "amazon.co.jp",
        "amazon.com.au",

        "ebay.com",
        "ebay.co.uk",
        "ebay.de",
        "ebay.pl",
        "ebay.at",
        "ebay.nl",
        "ebay.be",
        "ebay.fr",
        "ebay.ca",
        "ebay.in",
        "ebay.es",
        "ebay.it",
        "ebay.com.au",
        "ebay.de",

        "walmart.com",
        "alibaba.com",
        "aliexpress.com",
        "target.com",
        "flipkart.com",
        "bestbuy.com",
        "newegg.com",
        "overstock.com",
        "shop.com",
        "sprint.com",

        "yahoo.com",
        "netflix.com",
        "microsoft.com",
        "mtsindia.in",
        "v9.com",
        "blogspot.com",
        "avg.com",
        "imdb.com",
        "bing.com",
        "reliancenetconnect.co.in",
        "globo.com",
        "espn.go.com",
        "babylon.com",
        "naver.com",
        "softonic.com",
        "apple.com",
        "airtel.in",
        "delta-search.com",
        "deviantart.com",
        "rediff.com",
        "uol.com.br",
        "mudah.my",
        "iobit.com",
        "reliancebroadband.co.in"
      ];

      if (!mono.matchHost(location.hostname, siteList)) {
        this.listExp(function() {
          this.run(onApply);
        }.bind(this));
        return;
      }

      this.run(onApply);
    },
    run: function(onApply) {
      "use strict";
      var lang = {
        en: {
          dpDialogTop: 'Welcome',
          dpDialogText: ['SaveFrom.net Helper offers you to use Offers4U and receive updates on the hottest deals & coupons. To agree to the ',{a:{text: 'terms and conditions', href: '#tc'}},' and enable it, just click “OK”.'],
          dpDialogBtm: ['Legal brought by ',{a: {text: 'SaveFrom.net Helper', href: '#sf'}},' powered by ',{a: {text: 'Offers4U', href: '#o4u'}}],
          dpDialogUninstall: ['To uninstall Offers4U click ',{a: {text: 'here', href: '#un'}}],
          dpDialogMore: 'Learn More',
          dpDialogOk: 'OK'
        },
        tr: {
          dpDialogTop: 'HoÅŸ geldiniz',
          dpDialogText: ['SaveFrom.net Helper şimdi de Offers4U uygulamasını kullanma ve en yeni indirimler ve kuponlarla ilgili bildirimleri alma fırsatını sunuyor. Kullanım ',{a:{text: 'şartlarını ve koşullarını', href: '#tc'}},' kabul etmek için uygulamayı etkinleştirin ve “TAMAM” seçeneğini tıklayın.'],
          dpDialogBtm: [{a: {text: 'Offers4U', href: '#o4u'}},' yasal olarak ',{a: {text: 'SaveFrom.net Helper', href: '#sf'}},' tarafından desteklenmektedir.'],
          dpDialogUninstall: ['Offers4U uygulamasını kaldırmak için ',{a: {text: 'buraya tıklayın', href: '#un'}}],
          dpDialogMore: 'Daha fazla bilgi',
          dpDialogOk: 'TAMAM'
        },
        fr: {
          dpDialogTop: 'Bienvenue',
          dpDialogText: ['SaveFrom.net Helper vous propose d\'utiliser Offers4U et de recevoir des mises à jour sur les dernières promos et des réductions. Pour accepter ',{a:{text: 'les termes et les conditions', href: '#tc'}},' pour l\'activer, cliquez sur “OK”.'],
          dpDialogBtm: ['Mentions légales de ',{a: {text: 'SaveFrom.net Helper', href: '#sf'}},' alimentées par ',{a: {text: 'Offers4U', href: '#o4u'}}],
          dpDialogUninstall: ['Pour désinstaller Offers4U cliquez ',{a: {text: 'ici', href: '#un'}}],
          dpDialogMore: 'En savoir plus',
          dpDialogOk: 'OK'
        },
        id: {
          dpDialogTop: 'Selamat dating',
          dpDialogText: ['SaveFrom.net Helper menawarkan kepada Anda untuk menggunakan Offers4U dan menerima berita terbaru tentang penawaran & kupon terbagus. Untuk menyetujui ',{a:{text: 'syarat dan ketentuan', href: '#tc'}},' dan untuk mengaktifkannya, cukup klik “OK”.'],
          dpDialogBtm: ['Legal dipersembahkan oleh ',{a: {text: 'SaveFrom.net Helper', href: '#sf'}},' yang didukung oleh ',{a: {text: 'Offers4U', href: '#o4u'}}],
          dpDialogUninstall: ['Untuk membatalkan penginstalan Offers4U, klik di ',{a: {text: 'sini', href: '#un'}}],
          dpDialogMore: 'Ketahui Selengkapnya',
          dpDialogOk: 'OK'
        },
        es: {
          dpDialogTop: 'Bienvenido',
          dpDialogText: ['SaveForm.net Helper le ofrece usar Offers4U y recibir actualizaciones sobre las últimas novedades en ofertas y cupones. Para aceptar los ',{a:{text: 'términos y condiciones', href: '#tc'}},' y habilitarlo, haga clic en "OK".'],
          dpDialogBtm: ['Sección legal por cortesía de ',{a: {text: 'SaveForm.net Helper', href: '#sf'}},', con la tecnología de ',{a: {text: 'Offers4U', href: '#o4u'}}],
          dpDialogUninstall: ['Para desinstalar Offers4U haga clic ',{a: {text: 'aquí', href: '#un'}}],
          dpDialogMore: 'Más información',
          dpDialogOk: 'OK'
        },
        de: {
          dpDialogTop: 'Willkommen',
          dpDialogText: ['SaveFrom.net Helpers bietet Ihnen Offers4U an. Erhalten Sie Updates der besten Angebote und Gutscheine. Klicken Sie "OK" und stimmen Sie den ',{a:{text: 'Allgemeinen Geschäftsbedingungen', href: '#tc'}},' zu.'],
          dpDialogBtm: ['Offizielles Angebot von ',{a: {text: 'SaveFrom.net Helper', href: '#sf'}},'. Powered by ',{a: {text: 'Offers4U', href: '#o4u'}}],
          dpDialogUninstall: ['Deinstallieren können Sie Offers4U ',{a: {text: 'hier', href: '#un'}}],
          dpDialogMore: 'Weitere Informationen',
          dpDialogOk: 'OK'
        }
      };

      var styleFix = {
        en: {
          dpDialogUninstall: {
            marginTop: '6px'
          },
          dpDialogMore: {
            marginTop: '6px'
          }
        }
      };

      var langCode = lang[mono.global.language.lang] ? mono.global.language.lang : 'en';

      lang = lang[langCode];
      styleFix = styleFix[langCode] || {};

      var langPrepare = (function(langCode, node) {
        // language post process
        var link;
        link = node.querySelector('a[href="#tc"]');
        link.href = 'http://www.dealply.com/eula.html';
        link.target = '_blank';
        link.classList.add('sf-black');

        link = node.querySelector('a[href="#sf"]');
        link.href = 'http://savefrom.net/user.php';
        link.target = '_blank';

        link = node.querySelector('a[href="#o4u"]');
        link.href = 'http://www.dealply.com/index.html';
        link.target = '_blank';

        link = node.querySelector('a[href="#more"]');
        link.href = 'http://www.dealply.com/index.html';
        link.target = '_blank';
      }).bind(null, langCode);

      this.prepare(function(storage) {
        var details = {
          withDelay: 250,
          onClose: function(isApply, isUninstall) {
            if (details.fired) {
              return;
            }
            details.fired = 1;

            var now = parseInt(Date.now() / 1000);

            isApply = isApply ? 1 : 0;

            if (!isApply && !isUninstall) {
              storage.advPreShowCount++;

              if (storage.advPreShowCount > 2) {
                isApply = 0;
              } else {
                storage.advPreShowTime = now + 6 * 60 * 60;
                mono.storage.set(storage);
                return;
              }
            }

            mono.storage.remove(['advPreShowTime', 'advPreShowCount']);

            mono.sendMessage({
              action: 'updateOption',
              key: 'advPreShow',
              value: preference.advPreShow = 1
            });

            mono.sendMessage({
              action: 'updateOption',
              key: 'sovetnikEnabled',
              value: preference.sovetnikEnabled = isApply
            });

            var state = 'false';
            if (isApply) {
              state = 'true';
              details.onApply && details.onApply();
            }

            var hostname = preShow.getHostName();

            mono.sendMessage({
              action: 'trackEvent',
              category: 'dpListExp',
              event: 'state',
              label: hostname + ' ' + state,
              params: {
                tid: 'UA-67738130-1'
              }
            });
          },
          onApply: onApply
        };

        details._onClose = this.onClose.bind(this, details);

        details.box = mono.create('div', {
          class: 'sf-adv-container',
          style: {
            position: 'fixed',
            width: '100%',
            textAlign: 'right',
            display: 'block',
            zIndex: 9999999,
            bottom: 0
          },
          append: [
            details.dialog = mono.create('div', {
              class: 'sf-adv-dialog',
              style: {
                display: 'inline-block',
                width: '882px',
                height: '92px',
                backgroundColor: '#fff',
                fontFamily: 'Arial',
                lineHeight: 'normal',
                textAlign: 'left',
                position: 'absolute',
                bottom: '20px',
                right: '0px',
                border: '1px solid #aaa',
                borderRight: 0
              },
              on: ['click', function(e) {
                e.stopPropagation();

                var el = e.target;
                if (el.tagName !== 'A') {
                  return;
                }

                if (el.href.indexOf('#un') !== -1) {
                  e.preventDefault();
                  details._onClose(0, 1);
                } else
                if (el.href.indexOf('#close') !== -1) {
                  e.preventDefault();
                  details._onClose();
                } else
                if (el.href.indexOf('#ok') !== -1) {
                  e.preventDefault();
                  details._onClose(1);
                }
              }],
              append: [
                mono.create('span', {
                  class: 'sf-adv-desc',
                  style: {
                    display: 'block',
                    paddingLeft: '230px',
                    paddingTop: '6px',
                    marginRight: '30px'
                  },
                  append: [
                    mono.create('p', {
                      style: {
                        fontSize: '16px'
                      },
                      append: [
                        mono.parseTemplate(lang.dpDialogText)
                      ]
                    }),
                    mono.create('p', {
                      style: mono.extend({
                        color: '#696969'
                      }, styleFix.dpDialogUninstall),
                      append: [
                        mono.parseTemplate(lang.dpDialogUninstall)
                      ]
                    }),
                    mono.create('p', {
                      style: mono.extend({}, styleFix.dpDialogMore),
                      append: [
                        mono.create('a', {
                          class: 'sf-more',
                          text: lang.dpDialogMore,
                          href: '#more'
                        })
                      ]
                    })
                  ]
                }),
                mono.create('a', {
                  class: 'sf-btn apply',
                  style: {
                    display: 'block',
                    position: 'absolute',
                    right: '28px',
                    bottom: '5px',
                    fontSize: '18px',
                    borderRadius: '4px',
                    padding: '5px 24px',
                    backgroundColor: '#87AF18',
                    color: '#fff',
                    textDecoration: 'none'
                  },
                  text: lang.dpDialogOk,
                  href: '#ok'
                }),
                mono.create('div', {
                  style: {
                    position: 'absolute',
                    height: '26px',
                    backgroundColor: '#87AF18',
                    right: 0,
                    top: '-28px',
                    borderTop: '1px solid #aaa',
                    paddingLeft: '2px',
                    paddingRight: '2px'
                  },
                  append: [
                    mono.create('span', {
                      text: lang.dpDialogTop,
                      style: {
                        fontSize: '17px',
                        fontWeight: 'bold',
                        color: '#fff',
                        lineHeight: '28px'
                      }
                    }),
                    mono.create('i', {
                      style: {
                        display: 'block',
                        position: 'absolute',
                        height: '0px',
                        width: '0px',
                        border: '0 solid transparent',
                        borderWidth: '26px 15px 0px 0px',
                        borderRightColor: '#87AF18',
                        top: '0',
                        left: '-15px'
                      }
                    })
                  ]
                }),
                mono.create('div', {
                  style: {
                    position: 'absolute',
                    height: '16px',
                    left: '-1px',
                    bottom: '-18px',
                    border: '1px solid #aaa',
                    borderRight: 0,
                    borderTop: 0,
                    backgroundColor: '#fff',
                    paddingLeft: '4px',
                    paddingRight: '4px',
                    lineHeight: '16px'
                  },
                  append: [
                    mono.create('span', {
                      class: 'sf-bottom-panel',
                      append: [
                        mono.parseTemplate(lang.dpDialogBtm)
                      ]
                    }),
                    mono.create('i', {
                      style: {
                        display: 'block',
                        position: 'absolute',
                        height: '0px',
                        width: '0px',
                        border: '0 solid transparent',
                        borderWidth: '0px 0px 18px 15px',
                        borderLeftColor: '#aaa',
                        top: '-1px',
                        right: '-15px'
                      }
                    }),
                    mono.create('i', {
                      style: {
                        display: 'block',
                        position: 'absolute',
                        height: '0px',
                        width: '0px',
                        border: '0 solid transparent',
                        borderWidth: '0px 0px 16px 13px',
                        borderLeftColor: '#fff',
                        top: 0,
                        right: '-13px'
                      }
                    })
                  ]
                }),
                mono.create('a', {
                  class: ['sf-btn', 'close'],
                  text: 'x',
                  href: '#close',
                  style: {
                    display: 'block',
                    position: 'absolute',
                    right: '2px',
                    top: '6px',
                    width: '18px',
                    height: '18px',
                    textAlign: 'center',
                    textDecoration: 'none',
                    color: '#7A7C7B',
                    fontWeight: 'bold',
                    fontSize: '14px',
                    lineHeight: '16px'
                  }
                })
              ]
            }),
            mono.create('style', {
              text: mono.styleObjToText({
                '': {
                  WebkitUserSelect: 'none',
                  MozUserSelect: 'none',
                  OUserSelect: 'none',
                  userSelect: 'none',
                  color: '#000',
                  lineHeight: 'normal'
                },
                div: {
                  boxSizing: 'content-box'
                },
                p: {
                  margin: 0,
                  lineHeight: 'normal'
                },
                '.sf-adv-dialog': {
                  backgroundImage: 'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAABcCAIAAAAgZ0j3AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAClJREFUeNpi+P9vExMDAyMBzIRgMzJhF8fKpkSMWDY5mAELm4EeGCDAAKSKA7SA6DELAAAAAElFTkSuQmCC)',
                  backgroundRepeat: 'repeat-x',
                  backgroundPosition: 'top left',
                  fontSize: '12px'
                },
                '.sf-adv-desc': {
                  backgroundImage: 'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOsAAABcCAIAAAAAp9VPAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAOM5JREFUeNrsfQlgHMWZbh19zaUZ3ZYsWzIGYwO2ZcDhCAaZJBwLIc59kCw24ZHAywaTzdsNy2YNSVjYbBKbl32QJVlsWCBAOMwVEgixsLmx8Y1vW/Ip65zRXH1V1avqnhnNjEajMZJsJeumLWZ6anq6q7/66/vPgow+D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IEnrOy6yB48QOE2rptZBvaYooNYCGQMlbmE/6+QqYIZ8mvVNmecckiZO/R6IFxZY4YBywirg/UfBZzNKeBuEBoC4TDZ8tlKqk6ohUNEduePpFLCUTWZTRSTWwtZUpzNDnNo0oSzlmhQDATlht/PPARYdQWeE+V7eOvwq4pbbAZBEJNBunVe1ghTW68ejTEyJeAFe3W+08ieGAzD3VBnL1M4BD1R+HwAiJjinCQY2McK1iIV7QSy8Yxt1yabcNYtBxSKcv3wXw+D0oXm0qdnIpqPEPkOzkIBlYqWJu/hTQsotIKGNP43YmFaNNp/gVvdLya01Id0WfFTyI4LYCTBuuOADkrkVjk2eNs2ZTKpxhuYs21VIhFCGS1f0jDBXaqnAq6QHRD0ROBlEvbOSZK9YhCJyC39ARw6q4WzKoQxaYsRtzJBDFoYZqUrUJSTIBTkVjacscKThDpOP/xudFd/UdOIjiDYJPpBhgoscOQhJGzeFthfBZ0WMGUpHOiIpzYdU5EZENSYoUMEY5gRdRBMOQ6VzLhTSbKkZQmwYBijBVVZjR34TiWyiIZjCwurXVimrblIJjLd2EMTshiQaNBWpy4Ok0esOQVhDhC49Ie7D4nSXt67xsnEZze4rpY+DUjX6njkMuKyk3PqkK7Ye6K2UPIJpYOL3aMCQhhHUuJIdwZwmCbskUgFosFDL0MCUOEa0oDXM+SFYkymp01yt+RwsUFxXpHSUu3iIUdfGMG+zUzNjjBE6RyQzQ5Kwt78CMZvxzCuWhFe6Nnx/gxR/x/AQYA+sj6d53xnZgAAAAASUVORK5CYII=)',
                  backgroundRepeat: 'no-repeat',
                  backgroundPosition: 'top left',
                  height: '94px',
                  boxSizing: 'border-box'
                },
                'a': {
                  color: '#696969',
                  textDecoration: 'underline'
                },
                '.sf-black': {
                  color: '#000'
                },
                '.sf-more': {
                  fontSize: '14px',
                  color: '#3E3E3E'
                },
                '.sf-bottom-panel': {
                  color: '#696969'
                },
                '.sf-btn.apply:hover': {
                  opacity: '0.8'
                },
                '.sf-btn.apply:active': {
                  opacity: '0.9'
                }
              }, '.sf-adv-container')
            })
          ]
        });

        langPrepare(details.box);

        if (location.hostname.indexOf('sprint.com') !== -1) {
          details.dialog.style.right = '73px';
        }
        if (location.hostname.indexOf('newegg.com') !== -1) {
          details.dialog.style.right = '6px';
        }

        setTimeout(function() {
          details.box.style.transition = 'opacity 0.5s';
          details.box.style.opacity = 0;
          document.body.appendChild(details.box);
          setTimeout(function() {
            details.box.style.opacity = 1;
          }, 50);

          details.onShow && details.onShow();
        }, details.withDelay);

      }.bind(this));
    }
  };
  /*@if isVkOnly=0<*/

  //@insert

  run();
}, function isActive(initData) {
  "use strict";
  if (mono.global.exAviaBar) {
    return false;
  }

  var preference = initData.getPreference;

  if (!preference.hasDP) {
    return false;
  }

  if (!preference.sovetnikEnabled) {
    return false;
  }

  if (mono.global.ddblAdv) {
    return false;
  }
  mono.global.ddblAdv = true;

  return true;
}, function syncIsAvailable() {
  "use strict";
  if (!document.body) {
    return false;
  }

  if (mono.isIframe()) {
    return false;
  }

  /*@if isVkOnly=0>*/
  if (mono.isSafari || mono.isFF || mono.isGM) {
    if (mono.checkUrl(document.URL, [
        "ftp://*",
        "file://*",
        "http://google.*/*",
        "http://*.google.*/*",
        "https://google.*/*",
        "https://*.google.*/*",
        "http://acidtests.org/*",
        "http://*.acidtests.org/*",
        "http://savefrom.net/*",
        "http://*.savefrom.net/*",
        "http://youtube.com/*",
        "http://*.youtube.com/*",
        "https://youtube.com/*",
        "https://*.youtube.com/*",
        "http://vimeo.com/*",
        "http://*.vimeo.com/*",
        "https://vimeo.com/*",
        "https://*.vimeo.com/*",
        "http://dailymotion.*/*",
        "http://*.dailymotion.*/*",
        "https://dailymotion.*/*",
        "https://*.dailymotion.*/*",
        "http://vk.com/*",
        "http://*.vk.com/*",
        "http://vkontakte.ru/*",
        "http://*.vkontakte.ru/*",
        "https://vk.com/*",
        "https://*.vk.com/*",
        "https://vkontakte.ru/*",
        "https://*.vkontakte.ru/*",
        "http://odnoklassniki.ru/*",
        "http://*.odnoklassniki.ru/*",
        "http://ok.ru/*",
        "http://*.ok.ru/*",
        "http://soundcloud.com/*",
        "http://*.soundcloud.com/*",
        "https://soundcloud.com/*",
        "https://*.soundcloud.com/*",
        "http://facebook.com/*",
        "http://*.facebook.com/*",
        "https://facebook.com/*",
        "https://*.facebook.com/*",
        "http://instagram.com/*",
        "http://*.instagram.com/*",
        "https://instagram.com/*",
        "https://*.instagram.com/*",
        "https://rutube.ru/*",
        "http://rutube.ru/*",
        "https://*.rutube.ru/*",
        "http://*.rutube.ru/*"
      ])) {
      return false;
    }
  }
  /*@if isVkOnly=0<*/

  var checkProtocol = function () {
    if (location.protocol === 'https:') {
      return false;
    }
    return true;
  };

  if (!checkProtocol()) {
    return false;
  }

  var inBlackList = function() {
    var list = [
      "vk.com",
      "youtube.com",
      "odnoklassniki.ru",
      "ok.ru",
      "privet.ru",
      "facebook.com",
      "news.sportbox.ru",
      "play.google.com",
      "roem.ru",
      "linkedin.com",
      "ex.ua",
      "instagram.com",
      "rutube.ru",
      "e.mail.ru",
      "fotki.yandex.ru",
      "support.kaspersky.ru",
      "vimeo.com",
      "club.foto.ru",
      "garant.ru",
      "webmaster.yandex.ru",
      "support.kaspersky.ru",
      "fotki.yandex.ru",
      "mk.ru",
      "metrika.yandex.ru",
      "images.yandex.ru",
      "disk.yandex.ru",
      "maps.yandex.ru",
      "help.yandex.ru",
      "www.yaplakal.com",
      "www.facebook.com",
      "my.mail.ru"
    ];

    return mono.matchHost(location.hostname, list);
  };

  if(inBlackList()) {
    return false;
  }

  return true;
});
(typeof mono === 'undefined') && (mono = {loadModule: function() {this.loadModuleStack.push(arguments);},loadModuleStack: []});

mono.loadModule('dealplyFrame', function(moduleName, initData) {
  "use strict";
  var preference = initData.getPreference;

  if (!document.body.querySelector('.offers_ul')) {
    return;
  }

  mono.sendMessage({action: 'trackEvent', category: 'dealply', event: 'show', label: 'bar', params: {tid: 'UA-67738130-3'}});

  document.body.addEventListener('mousedown', function(e) {
    if (e.button !== 0) {
      return;
    }

    var link = e.target;

    var isLink = false;

    if (/goto/.test(link.id)) {
      isLink = true;
    }

    if (!isLink) {
      link = mono.getParent(link, 'A');

      if (!link) {
        return;
      }

      if (!link.classList.contains('cliackableArea')) {
        return;
      }

      isLink = true;
    }

    if (!isLink) {
      return;
    }

    var label = preference.country + ' link';
    mono.sendMessage({action: 'trackEvent', category: 'dealply', event: 'click', label: label, params: {tid: 'UA-67738130-3', noRewrite: true}});
    mono.sendMessage({action: 'trackEvent', category: 'dealply', event: 'click', label: label, params: {tid: 'UA-7055055-5', noRewrite: true}});
  });
}, function isActive(initData) {
  "use strict";
  var preference = initData.getPreference;

  if (!preference.hasDP) {
    return false;
  }

  if (!preference.sovetnikEnabled) {
    return false;
  }

  if (!preference.country) {
    return;
  }

  return true;
}, function syncIsAvailable() {
  "use strict";
  if (!document.body) {
    return false;
  }

  if (!mono.isIframe()) {
    return false;
  }

  /*@if isVkOnly=0>*/
  if (mono.isSafari || mono.isGM) {
    if (!mono.checkUrl(document.URL, [
        "http://f.mgicinjs.info/*",
        "https://f.mgicinjs.info/*"
      ])) {
      return false;
    }
  }
  /*@if isVkOnly=0<*/

  return true;
});
(typeof mono === 'undefined') && (mono = {loadModule: function() {this.loadModuleStack.push(arguments);},loadModuleStack: []});

mono.loadModule('aviaBar', function(moduleName, initData) {
  "use strict";
  var language = initData.getLanguage;
  var debug = false;
  var profile = mono.global.aviaBarProfile;
  var hostname = location.hostname;

  if (SaveFrom_Utils.mutationWatcher.isAvailable()) {
    setTimeout(function() {
      main.run();
    });
  }

  var error = function() {
    if (!debug) return;
    var args = [].slice.call(arguments);
    args.unshift('sfsf');
    console.error.apply(console, args);
  };

  var log = function() {
    if (!debug) return;
    var args = [].slice.call(arguments);
    args.unshift('sfsf');
    console.trace.apply(console, args);
  };

  log('Profile', profile);

  var main = {
    storage: null,
    cache: {},
    onGetData: function() {
      var pageInfo = this.getInfoObj();
      if (!pageInfo.origin || !pageInfo.destination || !pageInfo.currency || !pageInfo.price) {
        log('Data is not ready', pageInfo);
        return;
      }

      log('Info', pageInfo);

      if (pageInfo.barRequestData) {
        return;
      }
      pageInfo.barRequestData = true;

      var currentBar = main.bar.current;
      if (currentBar) {
        main.clearInfoObj(pageInfo);
      }

      var onAbort = function() {
        mono.sendMessage({
          action: 'trackEvent',
          category: 'cheapflight',
          event: 'discard',
          label: hostname,
          params: {tid: 'UA-70432435-1', noRewrite: true}
        });
      };

      this.requestData(pageInfo, function(data) {
        if (!data) {
          currentBar && currentBar.close();
          onAbort();
          return;
        }
        var lowerPrice = null;

        var needConverting = !main.isSupportedCcy(pageInfo.currency);
        data.prices.data.forEach(function(item) {
          var value = null;
          if (needConverting) {
            value = item.converted_value = main.convertCcy(item.value, pageInfo.currency);
          } else {
            value = item.value;
          }

          if (lowerPrice === null || lowerPrice > value) {
            lowerPrice = value;
          }
        });

        if (lowerPrice > pageInfo.price) {
          log('Has lower price!', lowerPrice, pageInfo.price);
          currentBar && currentBar.close();
          onAbort();
          return;
        }

        var details = {};
        details.prices = data.prices;
        details.pageInfo = pageInfo;

        main.bar.create(details);
      });
    },
    run: function() {
      mono.storage.get(['aviaBar'], function(storage) {
        main.storage = storage.aviaBar || {};
        main.storage.blackList = main.storage.blackList || [];

        if (!main.bar.isAllow()) {
          return;
        }

        var template = main.profileList[profile];
        if (!template) {
          log('Template is not found!', profile);
          return;
        }

        return template.call(main);
      });
    },
    save: function(cb) {
      mono.storage.set({aviaBar: main.storage}, cb);
    }
  };

  mono.extend(main, {
    defaultCcy: 'RUB',
    supportedCcy: ['USD', 'EUR', 'RUB'],
    isSupportedCcy: function(value) {
      return main.supportedCcy.indexOf(value) !== -1;
    },
    requestAirports: function(cb) {
      mono.sendMessage({
        action: 'getData',
        url: 'http://api.travelpayouts.com/data/airports.json'
      }, function(response) {
        var data = null;
        try {
          data = JSON.parse(response);
        } catch(e){}

        if (!data) {
          error('Response is empty!', response);
        }

        cb(data);
      });
    },
    requestCities: function(cb) {
      mono.sendMessage({
        action: 'getData',
        url: 'http://api.travelpayouts.com/data/cities.json'
      }, function(response) {
        var data = null;
        try {
          data = JSON.parse(response);
        } catch(e){}

        if (!data) {
          error('Response is empty!', response);
        }

        cb(data);
      });
    },
    requestCcy: function(cb) {
      mono.sendMessage({
        action: 'getData',
        url: 'http://engine.aviasales.ru/currencies/all_currencies_rates'
      }, function(response) {
        var data = null;
        try {
          data = JSON.parse(response);
        } catch(e){}

        if (!data) {
          error('Response is empty!', response);
        }

        cb(data);
      });
    },
    requestPrices: function(pageInfo, cb) {
      if (!pageInfo.dateEnd) {
        return main.requestPrices3(pageInfo, cb);
      }

      return main.requestPrices1(pageInfo, cb);
    },
    requestPrices1: function(pageInfo, cb) {
      main.supportedCcy = ['USD', 'EUR', 'RUB'];

      var data = {
        origin: pageInfo.origin,
        destination: pageInfo.destination,
        currency: pageInfo.currency,
        depart_date: pageInfo.dateStart
      };

      if (pageInfo.dateEnd) {
        data.return_date = pageInfo.dateEnd;
      }

      if (!main.isSupportedCcy(pageInfo.currency)) {
        data.currency = main.defaultCcy;
      }

      data.token = 'd936b4f899d2e26969269dd587f90a67';

      mono.sendMessage({
        action: 'getData',
        url: 'http://api.travelpayouts.com/v1/prices/cheap?' + mono.param(data)
      }, function(responseText) {
        var response = null;
        try {
          response = JSON.parse(responseText);
        } catch(e){}

        if (!response || !response.success) {
          error('Response is empty!', response);
          cb();
          return;
        }

        if (!response.success) {
          error('API error!', response);
          cb();
          return;
        }

        var _list = [];
        for (var cityCode in response.data) {
          var list = response.data[cityCode];
          for (var index in list) {
            var item = list[index];
            var _item = {};
            _item.destination = cityCode;
            _item.origin = pageInfo.origin;
            _item.value = item.price;
            _item.depart_date = item.departure_at;
            _item.return_date = item.return_at;
            _list.push(_item);
          }
        }

        response.data = _list;

        cb(response);
      });
    },
    requestPrices2: function(pageInfo, cb) {
      main.supportedCcy = ['USD', 'EUR', 'RUB'];

      var data = {
        currency: pageInfo.currency,
        origin: pageInfo.origin,
        destination: pageInfo.destination,
        one_way: !pageInfo.dateEnd,
        sorting: 'price',
        beginning_of_period: pageInfo.dateStart,
        period_type: 'month'
      };

      if (!main.isSupportedCcy(pageInfo.currency)) {
        data.currency = main.defaultCcy;
      }

      data.token = 'd936b4f899d2e26969269dd587f90a67';

      mono.sendMessage({
        action: 'getData',
        url: 'http://api.travelpayouts.com/v2/prices/latest?' + mono.param(data)
      }, function(response) {
        var data = null;
        try {
          data = JSON.parse(response);
        } catch(e){}

        if (!data || !data.success) {
          error('Response is empty!', response);
          cb();
          return;
        }

        if (!data.success || !data.data) {
          error('API error!', response);
          cb();
          return;
        }

        cb(data);
      });
    },
    requestPrices3: function(pageInfo, cb) {
      main.supportedCcy = ['RUB'];

      var data = {
        origin: pageInfo.origin,
        destination: pageInfo.destination,
        depart_date: pageInfo.dateStart
      };

      if (pageInfo.dateEnd) {
        data.return_date = pageInfo.dateEnd;
      }

      mono.sendMessage({
        action: 'getData',
        url: 'http://min-prices.aviasales.ru/day_price?' + mono.param(data)
      }, function(response) {
        var data = null;
        try {
          data = JSON.parse(response);
        } catch(e){}

        if (!data) {
          error('Response is empty!', response);
          cb();
          return;
        }

        var _data = {};
        _data.data = [data];

        cb(_data);
      });
    },
    requestData: function(pageInfo, cb) {
      var hasFail = false;
      var data = {};

      var n = 0;
      var r = 0;
      var onReady = function() {
        r++;
        if (r !== n) {
          return;
        }

        cb(hasFail ? null : data);
      };

      n++;
      main.requestPrices(pageInfo, function(prices) {
        if (!prices || !prices.data.length) {
          log('Response is empty!');
          hasFail = true;
          onReady();
          return;
        }

        if (!main.cache.cityMap) {
          n++;
          main.requestCities(function (cityList) {
            if (!cityList) {
              hasFail = true;
              onReady();
              return;
            }

            var cityMap = main.cache.cityMap = {};
            cityList.forEach(function(item) {
              cityMap[item.code] = item;
            });
            onReady();
          });
        }

        if (!main.isSupportedCcy(pageInfo.currency)) {
          if (!main.cache.ccyList) {
            n++;
            main.requestCcy(function (ccyList) {
              if (ccyList && ccyList[pageInfo.currency.toLowerCase()] === undefined) {
                error('Currency is not found!', pageInfo.currency);
                ccyList = null;
              }

              if (!ccyList) {
                hasFail = true;
                onReady();
                return;
              }

              main.cache.ccyList = ccyList;
              onReady();
            });
          }
        }

        if (!main.cache.airportMap) {
          n++;
          main.requestAirports(function (airportList) {
            if (!airportList) {
              hasFail = true;
              onReady();
              return;
            }

            var airportMap = main.cache.airportMap = {};
            airportList.forEach(function(item) {
              airportMap[item.code] = item;
            });
            onReady();
          });
        }

        data.prices = prices;
        onReady();
      });
    }
  });

  mono.extend(main, {
    bar: {
      getCloseBtn: function() {
        var svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
        var svgNS = svg.namespaceURI;
        svg.setAttribute('width', '19.799');
        svg.setAttribute('height', '19.799');
        svg.setAttribute('viewBox', '0 0 19.7989899 19.7989899');

        var path = document.createElementNS(svgNS, 'path');
        svg.appendChild(path);
        path.setAttribute('d', 'M8.092 9.9L5.146 6.952C4.544 6.35 4.45 5.45 4.95 4.95c.5-.5 1.4-.406 2.003.196L9.9 8.092l2.946-2.946c.61-.61 1.504-.695 2.003-.196.498.5.412 1.394-.197 2.003L11.707 9.9l2.946 2.946c.602.602.695 1.504.196 2.003-.5.498-1.402.405-2.004-.197L9.9 11.707l-2.947 2.946c-.61.61-1.504.695-2.003.196-.5-.5-.413-1.395.196-2.004L8.092 9.9z');
        path.setAttribute('fill', '#534B6A');
        path.setAttribute('opacity', '.3');
        path.setAttribute('fill-rule', 'evenodd');

        return svg;
      },
      getTwoWayLines: function() {
        var svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
        var svgNS = svg.namespaceURI;
        svg.setAttribute('width', '41px');
        svg.setAttribute('height', '24px');
        svg.setAttribute('viewBox', '0 0 41 24');

        var g = document.createElementNS(svgNS, 'g');
        svg.appendChild(g);
        g.setAttribute('stroke-linecap', 'square');
        g.setAttribute('stroke', '#979797');
        g.setAttribute('stroke-width', '2');
        g.setAttribute('fill', 'none');
        g.setAttribute('fill-rule', 'evenodd');

        var path = document.createElementNS(svgNS, 'path');
        g.appendChild(path);
        path.setAttribute('d', 'M40.33 18H2.24M6 13L.724 18.1 6 23.2');

        path = document.createElementNS(svgNS, 'path');
        g.appendChild(path);
        path.setAttribute('d', 'M.67 5h38.09M35 0l5.276 5.1L35 10.2');

        return svg;
      },
      getOneWayLine: function() {
        var svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
        var svgNS = svg.namespaceURI;
        svg.setAttribute('width', '105px');
        svg.setAttribute('height', '11px');
        svg.setAttribute('viewBox', '0 0 105 11');

        var g = document.createElementNS(svgNS, 'g');
        svg.appendChild(g);
        g.setAttribute('stroke-linecap', 'square');
        g.setAttribute('stroke', '#979797');
        g.setAttribute('stroke-width', '2');
        g.setAttribute('fill', 'none');
        g.setAttribute('fill-rule', 'evenodd');

        var path = document.createElementNS(svgNS, 'path');
        g.appendChild(path);
        path.setAttribute('d', 'M.823 5H102.76M99 0l5.276 5.1L99 10.2');

        return svg;
      },
      prepareItem: function(pageInfo, item) {
        var item = {
          origin: item.origin,
          destination: item.destination,
          value: item.converted_value || item.value,
          dateStart: item.depart_date,
          dateEnd: item.return_date,
          currency: pageInfo.currency
        };

        return item;
      },
      isAllow: function() {
        var blackList = main.storage.blackList;

        var blackListItem = null;
        blackList.some(function(item) {
          if (item.hostname === hostname) {
            blackListItem = item;
            return true;
          }
        });

        if (!blackListItem) {
          return true;
        }

        var now = parseInt(Date.now() / 1000);
        if (blackListItem.expire > now) {
          return false;
        }

        var pos = blackList.indexOf(blackListItem);
        blackList.splice(pos, 1);

        main.save();

        return true;
      },
      marginPage: function(details, barHeight) {
        var html = document.body.parentNode;
        main.pageStyle = main.pageStyle || {};

        if (barHeight) {
          var bar = details.barEl;
          main.pageStyle.marginTop = html.style.marginTop;
          main.pageStyle.transition = html.style.transition;

          html.style.transition = 'margin-top 0.2s';
          bar.style.transition = 'margin-top 0.2s';

          setTimeout(function() {
            html.style.marginTop = barHeight + 'px';
            bar.style.marginTop = 0;
          });

          setTimeout(function() {
            html.style.transition = main.pageStyle.transition;
            bar.style.transition = '';
          }, 250);

          var onShow = main.currentProfile.onShow;
          onShow && onShow(barHeight);
        } else {
          html.style.marginTop = main.pageStyle.marginTop;

          var onHide = main.currentProfile.onHide;
          onHide && onHide();
        }
      },