jan_dembowski

cuelinksv1.js beautified

Nov 24th, 2016
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (installationSource === undefined || installationSource === null) {
  2.     var installationSource = 'js'
  3. };
  4.  
  5. function loadScript(_0x3210x3, _0x3210x4) {
  6.     var _0x3210x5 = document['getElementsByTagName']('head')[0];
  7.     var _0x3210x6 = document['createElement']('script');
  8.     _0x3210x6['type'] = 'text/javascript';
  9.     _0x3210x6['src'] = _0x3210x3;
  10.     _0x3210x6['onreadystatechange'] = _0x3210x4;
  11.     _0x3210x6['onload'] = _0x3210x4;
  12.     _0x3210x5['appendChild'](_0x3210x6)
  13. }
  14.  
  15. function parse_url(_0x3210x8, _0x3210x9) {
  16.     var _0x3210xa = ['source', 'scheme', 'authority', 'userInfo', 'user', 'pass', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'fragment'],
  17.         _0x3210xb = (this['php_js'] && this['php_js']['ini']) || {},
  18.         _0x3210xc = (_0x3210xb['phpjs.parse_url.mode'] && _0x3210xb['phpjs.parse_url.mode']['local_value']) || 'php',
  19.         _0x3210xd = {
  20.             php: /^(?:([^:\/?#]+):)?(?:\/\/()(?:(?:()(?:([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?()(?:(()(?:(?:[^?#\/]*\/)*)()(?:[^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
  21.             strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
  22.             loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/\/?)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
  23.         };
  24.     var _0x3210xe = _0x3210xd[_0x3210xc]['exec'](_0x3210x8),
  25.         _0x3210xf = {},
  26.         _0x3210x10 = 14;
  27.     while (_0x3210x10--) {
  28.         if (_0x3210xe[_0x3210x10]) {
  29.             _0x3210xf[_0x3210xa[_0x3210x10]] = _0x3210xe[_0x3210x10]
  30.         }
  31.     };
  32.     if (_0x3210x9) {
  33.         return _0x3210xf[_0x3210x9['replace']('PHP_URL_', '')['toLowerCase']()]
  34.     };
  35.     if (_0x3210xc !== 'php') {
  36.         var _0x3210x11 = (_0x3210xb['phpjs.parse_url.queryKey'] && _0x3210xb['phpjs.parse_url.queryKey']['local_value']) || 'queryKey';
  37.         _0x3210xd = /(?:^|&)([^&=]*)=?([^&]*)/g;
  38.         _0x3210xf[_0x3210x11] = {};
  39.         _0x3210xf[_0x3210xa[12]]['replace'](_0x3210xd, function(_0x3210x12, _0x3210x13, _0x3210x14) {
  40.             if (_0x3210x13) {
  41.                 _0x3210xf[_0x3210x11][_0x3210x13] = _0x3210x14
  42.             }
  43.         })
  44.     };
  45.     delete _0x3210xf['source'];
  46.     return _0x3210xf
  47. }
  48.  
  49. function cuelinksUrl() {
  50.     var _0x3210x16 = parse_url(this['href']);
  51.     var _0x3210x17 = this;
  52.     if (location['hostname'] != _0x3210x16['host'] && _0x3210x16['host'] != undefined && _0x3210x16['host'] != 'linksredirect.com' && _0x3210x16['host'] != 'track.in.omgpm.com' && _0x3210x16['host'] != 'www.s2d6.com' && _0x3210x16['host'] != 'affiliates.tyroodr.com' && _0x3210x16['host'] != 'affiliates.vcommission.com' && _0x3210x16['host'] != 'plus.google.com') {
  53.         if (this['getAttribute']('data-cue')) {
  54.             _0x3210x17['href'] = 'https://linksredirect.com?pub_id=' + pubID + '&subid=' + this['getAttribute']('data-cue') + '&source=' + installationSource + '&url=' + escape(this['href'])
  55.         } else {
  56.             if (typeof subID != 'undefined') {
  57.                 _0x3210x17['href'] = 'https://linksredirect.com?pub_id=' + pubID + '&subid=' + subID + '&source=' + installationSource + '&url=' + escape(this['href'])
  58.             } else {
  59.                 _0x3210x17['href'] = 'https://linksredirect.com?pub_id=' + pubID + '&source=' + installationSource + '&url=' + escape(this['href'])
  60.             }
  61.         }
  62.     }
  63. }
  64.  
  65. function cuewordsUrl() {
  66.     var _0x3210x16 = parse_url(this['href']);
  67.     var _0x3210x17 = this;
  68.     if (location['hostname'] != _0x3210x16['host'] && _0x3210x16['host'] != undefined && _0x3210x16['host'] != 'linksredirect.com' && _0x3210x16['host'] != 'cw.linksredirect.com') {
  69.         if (this['getAttribute']('data-cue')) {
  70.             _0x3210x17['href'] = 'https://linksredirect.com/links?pub_id=' + pubID + '&subid=' + this['getAttribute']('data-cue') + '&source=' + installationSource + '_cuewords' + '&url=' + escape(this['href'])
  71.         } else {
  72.             _0x3210x17['href'] = 'https://linksredirect.com/links?pub_id=' + pubID + '&source=' + installationSource + '_cuewords' + '&url=' + escape(this['href'])
  73.         }
  74.     }
  75. }
  76.  
  77. function addEvent(_0x3210x1a, _0x3210x1b, _0x3210x1c) {
  78.     if (_0x3210x1a['attachEvent']) {
  79.         _0x3210x1a['e' + _0x3210x1b + _0x3210x1c] = _0x3210x1c;
  80.         _0x3210x1a[_0x3210x1b + _0x3210x1c] = function() {
  81.             _0x3210x1a['e' + _0x3210x1b + _0x3210x1c](window['event'])
  82.         };
  83.         _0x3210x1a['attachEvent']('on' + _0x3210x1b, _0x3210x1a[_0x3210x1b + _0x3210x1c])
  84.     } else {
  85.         _0x3210x1a['addEventListener'](_0x3210x1b, _0x3210x1c, false)
  86.     }
  87. }
  88.  
  89. function mergeJSON(_0x3210x1e, _0x3210x1f) {
  90.     var _0x3210x20 = Object['create'](_0x3210x1f);
  91.     for (var _0x3210x21 in _0x3210x1e) {
  92.         if (_0x3210x20['hasOwnProperty'](_0x3210x21)) {
  93.             if (_0x3210x1e[_0x3210x21] != null && _0x3210x1e[_0x3210x21]['constructor'] == Object) {
  94.                 _0x3210x20[_0x3210x21] = mergeJSON(_0x3210x1e[_0x3210x21], _0x3210x20[_0x3210x21])
  95.             }
  96.         } else {
  97.             _0x3210x20[_0x3210x21] = _0x3210x1e[_0x3210x21]
  98.         }
  99.     };
  100.     return _0x3210x20
  101. }
  102.  
  103. function createCORSRequest(_0x3210x23, _0x3210x3) {
  104.     var _0x3210x24 = new XMLHttpRequest();
  105.     if ('withCredentials' in _0x3210x24) {
  106.         _0x3210x24['open'](_0x3210x23, _0x3210x3, true)
  107.     } else {
  108.         if (typeof XDomainRequest != 'undefined') {
  109.             _0x3210x24 = new XDomainRequest();
  110.             _0x3210x24['open'](_0x3210x23, _0x3210x3)
  111.         } else {
  112.             _0x3210x24 = null
  113.         }
  114.     };
  115.     return _0x3210x24
  116. }
  117. var cueLinks;
  118. var cueWords;
  119. var cueDensity;
  120. var cuewordLinkColor;
  121. var ignoreTags;
  122. var ignoreTagsRegex;
  123. var Settingsfn = function() {
  124.     var _0x3210x3 = 'https://cdn0.cuelinks.com/api/v1/users/' + pubID + '.json';
  125.     var _0x3210x24 = createCORSRequest('GET', _0x3210x3);
  126.     if (!_0x3210x24) {
  127.         throw new Error('CORS not supported')
  128.     };
  129.     _0x3210x24['onload'] = function() {
  130.         text = _0x3210x24['responseText'];
  131.         var _0x3210x2c = JSON['parse'](text);
  132.         cueWords = _0x3210x2c['cuewords_enabled'];
  133.         cueLinks = _0x3210x2c['cuelinks_enabled'];
  134.         cueDensity = _0x3210x2c['cuewords_density'];
  135.         cuewordLinkColor = _0x3210x2c['cuewords_link_color'];
  136.         ignoreTags = _0x3210x2c['cuewords_ignore_tags'];
  137.         if (ignoreTags != 'null') {
  138.             ignoreTagsRegex = new RegExp('^(?:script|style|h1|h2|h3|h4|h5|h6|a|textarea|select|input|' + ignoreTags + '),'
  139.                 i ')}else {ignoreTagsRegex=  new RegExp(' ^ ( ? : script | style | h1 | h2 | h3 | h4 | h5 | h6 | a | textarea | select | input), 'i')
  140.         };
  141.         Processfn()
  142.     };
  143.     _0x3210x24['send']()
  144. };
  145. Settingsfn();
  146. var Processfn = function() {
  147.         if (cueLinks) {
  148.             var _0x3210x2e = document['getElementsByTagName']('a');
  149.             for (var _0x3210x10 = 0; _0x3210x10 < _0x3210x2e['length']; ++_0x3210x10) {
  150.                 addEvent(_0x3210x2e[_0x3210x10], 'click', cuelinksUrl);
  151.                 addEvent(_0x3210x2e[_0x3210x10], 'mousedown', cuelinksUrl)
  152.             };
  153.             var _0x3210x2f = document['getElementsByTagName']('area');
  154.             for (var _0x3210x10 = 0; _0x3210x10 < _0x3210x2f['length']; ++_0x3210x10) {
  155.                 addEvent(_0x3210x2f[_0x3210x10], 'click', cuelinksUrl);
  156.                 addEvent(_0x3210x2f[_0x3210x10], 'mousedown', cuelinksUrl)
  157.             }
  158.         };
  159.         if (cueWords) {
  160.             var _0x3210x30 = function() {
  161.                 var _0x3210x3 = 'https://yoda.cuelinks.com/content/?publisher_id=' + pubID + '&url=' + document['URL'];
  162.                 var _0x3210x24 = createCORSRequest('GET', _0x3210x3);
  163.                 if (!_0x3210x24) {
  164.                     throw new Error('CORS not supported')
  165.                 };
  166.                 _0x3210x24['onload'] = function() {
  167.                     text = _0x3210x24['responseText'];
  168.                     var _0x3210x31 = {};
  169.                     var _0x3210x32 = text['split']('\x0A');
  170.                     for (_0x3210x10 = 0; _0x3210x10 < _0x3210x32['length']; _0x3210x10++) {
  171.                         _0x3210x31 = mergeJSON(_0x3210x31, JSON['parse'](_0x3210x32[_0x3210x10]))
  172.                     };
  173.                     var _0x3210x33 = 0;
  174.                     obj = document['getElementsByTagName']('body')[0];
  175.                     for (r in _0x3210x31) {
  176.                         var _0x3210x34 = _0x3210x31[r];
  177.                         var _0x3210x35 = _0x3210x31['wc_id'];
  178.                         for (var _0x3210x36 in _0x3210x34) {
  179.                             keyword = _0x3210x36;
  180.                             _0x3210x3 = _0x3210x34[_0x3210x36]['url'];
  181.                             id = _0x3210x34[_0x3210x36]['id'];
  182.                             if (_0x3210x33 < cueDensity) {
  183.                                 findAndReplaceDOMText(obj, {
  184.                                     find: new RegExp('\b(?!</a>)(' + keyword + '\b)', 'i'),
  185.                                     replace: function(_0x3210x37, _0x3210x38) {
  186.                                         _0x3210x33 = _0x3210x33 + 1;
  187.                                         var _0x3210x39 = document['createElement']('a');
  188.                                         _0x3210x39['setAttribute']('href', _0x3210x3);
  189.                                         _0x3210x39['appendChild'](document['createTextNode'](_0x3210x37['text']));
  190.                                         _0x3210x39['setAttribute']('target', '_blank');
  191.                                         _0x3210x39['setAttribute']('rel', 'nofollow');
  192.                                         _0x3210x39['setAttribute']('data-cue', 'cw_' + id + '_' + _0x3210x35);
  193.                                         _0x3210x39['setAttribute']('title', 'Link Added by CueLinks');
  194.                                         if (cuewordLinkColor != 'null') {
  195.                                             _0x3210x39['setAttribute']('style', 'color: ' + cuewordLinkColor)
  196.                                         };
  197.                                         addEvent(_0x3210x39, 'click', cuewordsUrl);
  198.                                         addEvent(_0x3210x39, 'mousedown', cuewordsUrl);
  199.                                         return _0x3210x39
  200.                                     },
  201.                                     filterElements: function(_0x3210x3a) {
  202.                                         return !ignoreTagsRegex['test'](_0x3210x3a['nodeName'])
  203.                                     }
  204.                                 })
  205.                             }
  206.                         }
  207.                     }
  208.                 };
  209.                 _0x3210x24['send']()
  210.             };
  211.             loadScript('//cdn0.cuelinks.com/js/findAndReplaceDOMText.js', _0x3210x30)
  212.         }
  213.     },
  214.     'i')
  215. }
  216. else {
  217.     ignoreTagsRegex = new RegExp(_0xb954[80], 'i')
  218. };
  219. Processfn()
  220. };
  221. _0x3210x24['send']()
  222. };
  223. Settingsfn();
  224. var Processfn = function() {
  225.         if (cueLinks) {
  226.             var _0x3210x2e = document['getElementsByTagName']('a');
  227.             for (var _0x3210x10 = 0; _0x3210x10 < _0x3210x2e['length']; ++_0x3210x10) {
  228.                 addEvent(_0x3210x2e[_0x3210x10], 'click', cuelinksUrl);
  229.                 addEvent(_0x3210x2e[_0x3210x10], 'mousedown', cuelinksUrl)
  230.             };
  231.             var _0x3210x2f = document['getElementsByTagName']('area');
  232.             for (var _0x3210x10 = 0; _0x3210x10 < _0x3210x2f['length']; ++_0x3210x10) {
  233.                 addEvent(_0x3210x2f[_0x3210x10], 'click', cuelinksUrl);
  234.                 addEvent(_0x3210x2f[_0x3210x10], 'mousedown', cuelinksUrl)
  235.             }
  236.         };
  237.         if (cueWords) {
  238.             var _0x3210x30 = function() {
  239.                 var _0x3210x3 = 'https://yoda.cuelinks.com/content/?publisher_id=' + pubID + '&url=' + document['URL'];
  240.                 var _0x3210x24 = createCORSRequest('GET', _0x3210x3);
  241.                 if (!_0x3210x24) {
  242.                     throw new Error('CORS not supported')
  243.                 };
  244.                 _0x3210x24['onload'] = function() {
  245.                     text = _0x3210x24['responseText'];
  246.                     var _0x3210x31 = {};
  247.                     var _0x3210x32 = text['split']('\x0A');
  248.                     for (_0x3210x10 = 0; _0x3210x10 < _0x3210x32['length']; _0x3210x10++) {
  249.                         _0x3210x31 = mergeJSON(_0x3210x31, JSON['parse'](_0x3210x32[_0x3210x10]))
  250.                     };
  251.                     var _0x3210x33 = 0;
  252.                     obj = document['getElementsByTagName']('body')[0];
  253.                     for (r in _0x3210x31) {
  254.                         var _0x3210x34 = _0x3210x31[r];
  255.                         var _0x3210x35 = _0x3210x31['wc_id'];
  256.                         for (var _0x3210x36 in _0x3210x34) {
  257.                             keyword = _0x3210x36;
  258.                             _0x3210x3 = _0x3210x34[_0x3210x36]['url'];
  259.                             id = _0x3210x34[_0x3210x36]['id'];
  260.                             if (_0x3210x33 < cueDensity) {
  261.                                 findAndReplaceDOMText(obj, {
  262.                                     find: new RegExp('\b(?!</a>)(' + keyword + '\b)', 'i'),
  263.                                     replace: function(_0x3210x37, _0x3210x38) {
  264.                                         _0x3210x33 = _0x3210x33 + 1;
  265.                                         var _0x3210x39 = document['createElement']('a');
  266.                                         _0x3210x39['setAttribute']('href', _0x3210x3);
  267.                                         _0x3210x39['appendChild'](document['createTextNode'](_0x3210x37['text']));
  268.                                         _0x3210x39['setAttribute']('target', '_blank');
  269.                                         _0x3210x39['setAttribute']('rel', 'nofollow');
  270.                                         _0x3210x39['setAttribute']('data-cue', 'cw_' + id + '_' + _0x3210x35);
  271.                                         _0x3210x39['setAttribute']('title', 'Link Added by CueLinks');
  272.                                         if (cuewordLinkColor != 'null') {
  273.                                             _0x3210x39['setAttribute']('style', 'color: ' + cuewordLinkColor)
  274.                                         };
  275.                                         addEvent(_0x3210x39, 'click', cuewordsUrl);
  276.                                         addEvent(_0x3210x39, 'mousedown', cuewordsUrl);
  277.                                         return _0x3210x39
  278.                                     },
  279.                                     filterElements: function(_0x3210x3a) {
  280.                                         return !ignoreTagsRegex['test'](_0x3210x3a['nodeName'])
  281.                                     }
  282.                                 })
  283.                             }
  284.                         }
  285.                     }
  286.                 };
  287.                 _0x3210x24['send']()
  288.             };
  289.             loadScript('//cdn0.cuelinks.com/js/findAndReplaceDOMText.js', _0x3210x30)
  290.         }
  291.     },
  292.     'i')
  293. };
  294. Processfn()
  295. };
  296. _0x3210x24['send']()
  297. };
  298. Settingsfn();
  299. var Processfn = function() {
  300.         if (cueLinks) {
  301.             var _0x3210x2e = document['getElementsByTagName']('a');
  302.             for (var _0x3210x10 = 0; _0x3210x10 < _0x3210x2e['length']; ++_0x3210x10) {
  303.                 addEvent(_0x3210x2e[_0x3210x10], 'click', cuelinksUrl);
  304.                 addEvent(_0x3210x2e[_0x3210x10], 'mousedown', cuelinksUrl)
  305.             };
  306.             var _0x3210x2f = document['getElementsByTagName']('area');
  307.             for (var _0x3210x10 = 0; _0x3210x10 < _0x3210x2f['length']; ++_0x3210x10) {
  308.                 addEvent(_0x3210x2f[_0x3210x10], 'click', cuelinksUrl);
  309.                 addEvent(_0x3210x2f[_0x3210x10], 'mousedown', cuelinksUrl)
  310.             }
  311.         };
  312.         if (cueWords) {
  313.             var _0x3210x30 = function() {
  314.                 var _0x3210x3 = 'https://yoda.cuelinks.com/content/?publisher_id=' + pubID + '&url=' + document['URL'];
  315.                 var _0x3210x24 = createCORSRequest('GET', _0x3210x3);
  316.                 if (!_0x3210x24) {
  317.                     throw new Error('CORS not supported')
  318.                 };
  319.                 _0x3210x24['onload'] = function() {
  320.                     text = _0x3210x24['responseText'];
  321.                     var _0x3210x31 = {};
  322.                     var _0x3210x32 = text['split']('\x0A');
  323.                     for (_0x3210x10 = 0; _0x3210x10 < _0x3210x32['length']; _0x3210x10++) {
  324.                         _0x3210x31 = mergeJSON(_0x3210x31, JSON['parse'](_0x3210x32[_0x3210x10]))
  325.                     };
  326.                     var _0x3210x33 = 0;
  327.                     obj = document['getElementsByTagName']('body')[0];
  328.                     for (r in _0x3210x31) {
  329.                         var _0x3210x34 = _0x3210x31[r];
  330.                         var _0x3210x35 = _0x3210x31['wc_id'];
  331.                         for (var _0x3210x36 in _0x3210x34) {
  332.                             keyword = _0x3210x36;
  333.                             _0x3210x3 = _0x3210x34[_0x3210x36]['url'];
  334.                             id = _0x3210x34[_0x3210x36]['id'];
  335.                             if (_0x3210x33 < cueDensity) {
  336.                                 findAndReplaceDOMText(obj, {
  337.                                     find: new RegExp('\b(?!</a>)(' + keyword + '\b)', 'i'),
  338.                                     replace: function(_0x3210x37, _0x3210x38) {
  339.                                         _0x3210x33 = _0x3210x33 + 1;
  340.                                         var _0x3210x39 = document['createElement']('a');
  341.                                         _0x3210x39['setAttribute']('href', _0x3210x3);
  342.                                         _0x3210x39['appendChild'](document['createTextNode'](_0x3210x37['text']));
  343.                                         _0x3210x39['setAttribute']('target', '_blank');
  344.                                         _0x3210x39['setAttribute']('rel', 'nofollow');
  345.                                         _0x3210x39['setAttribute']('data-cue', 'cw_' + id + '_' + _0x3210x35);
  346.                                         _0x3210x39['setAttribute']('title', 'Link Added by CueLinks');
  347.                                         if (cuewordLinkColor != 'null') {
  348.                                             _0x3210x39['setAttribute']('style', 'color: ' + cuewordLinkColor)
  349.                                         };
  350.                                         addEvent(_0x3210x39, 'click', cuewordsUrl);
  351.                                         addEvent(_0x3210x39, 'mousedown', cuewordsUrl);
  352.                                         return _0x3210x39
  353.                                     },
  354.                                     filterElements: function(_0x3210x3a) {
  355.                                         return !ignoreTagsRegex['test'](_0x3210x3a['nodeName'])
  356.                                     }
  357.                                 })
  358.                             }
  359.                         }
  360.                     }
  361.                 };
  362.                 _0x3210x24['send']()
  363.             };
  364.             loadScript('//cdn0.cuelinks.com/js/findAndReplaceDOMText.js', _0x3210x30)
  365.         }
  366.     },
  367.     'i')
  368. }
  369. else {
  370.     ignoreTagsRegex = new RegExp('^(?:script|style|h1|h2|h3|h4|h5|h6|a|textarea|select|input),'
  371.             i ')};Processfn()};_0x3210x24['
  372.             send ']()};Settingsfn();var Processfn=function(){if(cueLinks){var _0x3210x2e=document['
  373.             getElementsByTagName ']('
  374.             a ');for(var _0x3210x10=0;_0x3210x10< _0x3210x2e['
  375.             length '];++_0x3210x10){addEvent(_0x3210x2e[_0x3210x10],'
  376.             click ',cuelinksUrl);addEvent(_0x3210x2e[_0x3210x10],'
  377.             mousedown ',cuelinksUrl)};var _0x3210x2f=document['
  378.             getElementsByTagName ']('
  379.             area ');for(var _0x3210x10=0;_0x3210x10< _0x3210x2f['
  380.             length '];++_0x3210x10){addEvent(_0x3210x2f[_0x3210x10],'
  381.             click ',cuelinksUrl);addEvent(_0x3210x2f[_0x3210x10],'
  382.             mousedown ',cuelinksUrl)}};if(cueWords){var _0x3210x30=function(){var _0x3210x3='
  383.             https: //yoda.cuelinks.com/content/?publisher_id='+ pubID+ '&url='+ document['URL'];var _0x3210x24=createCORSRequest('GET',_0x3210x3);if(!_0x3210x24){throw  new Error('CORS not supported')};_0x3210x24['onload']= function(){text= _0x3210x24['responseText'];var _0x3210x31={};var _0x3210x32=text['split']('\x0A');for(_0x3210x10= 0;_0x3210x10< _0x3210x32['length'];_0x3210x10++){_0x3210x31= mergeJSON(_0x3210x31,JSON['parse'](_0x3210x32[_0x3210x10]))};var _0x3210x33=0;obj= document['getElementsByTagName']('body')[0];for(r in _0x3210x31){var _0x3210x34=_0x3210x31[r];var _0x3210x35=_0x3210x31['wc_id'];for(var _0x3210x36 in _0x3210x34){keyword= _0x3210x36;_0x3210x3= _0x3210x34[_0x3210x36]['url'];id= _0x3210x34[_0x3210x36]['id'];if(_0x3210x33< cueDensity){findAndReplaceDOMText(obj,{find: new RegExp('\b(?!</a>)('+ keyword+ '\b)','i'),replace:function(_0x3210x37,_0x3210x38){_0x3210x33= _0x3210x33+ 1;var _0x3210x39=document['createElement']('a');_0x3210x39['setAttribute']('href',_0x3210x3);_0x3210x39['appendChild'](document['createTextNode'](_0x3210x37['text']));_0x3210x39['setAttribute']('target','_blank');_0x3210x39['setAttribute']('rel','nofollow');_0x3210x39['setAttribute']('data-cue','cw_'+ id+ '_'+ _0x3210x35);_0x3210x39['setAttribute']('title','Link Added by CueLinks');if(cuewordLinkColor!= 'null'){_0x3210x39['setAttribute']('style','color: '+ cuewordLinkColor)};addEvent(_0x3210x39,'click',cuewordsUrl);addEvent(_0x3210x39,'mousedown',cuewordsUrl);return _0x3210x39},filterElements:function(_0x3210x3a){return !ignoreTagsRegex['test'](_0x3210x3a['nodeName'])}})}}}};_0x3210x24['send']()};loadScript('//cdn0.cuelinks.com/js/findAndReplaceDOMText.js',_0x3210x30)}},'i')};Processfn()};_0x3210x24['send']()};Settingsfn();var Processfn=function(){if(cueLinks){var _0x3210x2e=document['getElementsByTagName']('a');for(var _0x3210x10=0;_0x3210x10< _0x3210x2e['length'];++_0x3210x10){addEvent(_0x3210x2e[_0x3210x10],'click',cuelinksUrl);addEvent(_0x3210x2e[_0x3210x10],'mousedown',cuelinksUrl)};var _0x3210x2f=document['getElementsByTagName']('area');for(var _0x3210x10=0;_0x3210x10< _0x3210x2f['length'];++_0x3210x10){addEvent(_0x3210x2f[_0x3210x10],'click',cuelinksUrl);addEvent(_0x3210x2f[_0x3210x10],'mousedown',cuelinksUrl)}};if(cueWords){var _0x3210x30=function(){var _0x3210x3='https://yoda.cuelinks.com/content/?publisher_id='+ pubID+ '&url='+ document['URL'];var _0x3210x24=createCORSRequest('GET',_0x3210x3);if(!_0x3210x24){throw  new Error('CORS not supported')};_0x3210x24['onload']= function(){text= _0x3210x24['responseText'];var _0x3210x31={};var _0x3210x32=text['split']('\x0A');for(_0x3210x10= 0;_0x3210x10< _0x3210x32['length'];_0x3210x10++){_0x3210x31= mergeJSON(_0x3210x31,JSON['parse'](_0x3210x32[_0x3210x10]))};var _0x3210x33=0;obj= document['getElementsByTagName']('body')[0];for(r in _0x3210x31){var _0x3210x34=_0x3210x31[r];var _0x3210x35=_0x3210x31['wc_id'];for(var _0x3210x36 in _0x3210x34){keyword= _0x3210x36;_0x3210x3= _0x3210x34[_0x3210x36]['url'];id= _0x3210x34[_0x3210x36]['id'];if(_0x3210x33< cueDensity){findAndReplaceDOMText(obj,{find: new RegExp('\b(?!</a>)('+ keyword+ '\b)','i'),replace:function(_0x3210x37,_0x3210x38){_0x3210x33= _0x3210x33+ 1;var _0x3210x39=document['createElement']('a');_0x3210x39['setAttribute']('href',_0x3210x3);_0x3210x39['appendChild'](document['createTextNode'](_0x3210x37['text']));_0x3210x39['setAttribute']('target','_blank');_0x3210x39['setAttribute']('rel','nofollow');_0x3210x39['setAttribute']('data-cue','cw_'+ id+ '_'+ _0x3210x35);_0x3210x39['setAttribute']('title','Link Added by CueLinks');if(cuewordLinkColor!= 'null'){_0x3210x39['setAttribute']('style','color: '+ cuewordLinkColor)};addEvent(_0x3210x39,'click',cuewordsUrl);addEvent(_0x3210x39,'mousedown',cuewordsUrl);return _0x3210x39},filterElements:function(_0x3210x3a){return !ignoreTagsRegex['test'](_0x3210x3a['nodeName'])}})}}}};_0x3210x24['send']()};loadScript('//cdn0.cuelinks.com/js/findAndReplaceDOMText.js',_0x3210x30)}}
Advertisement
Add Comment
Please, Sign In to add comment