1(function () { 2 3 $(document) 4 .on('click', '.special-settings a', function (event) { 5 event.preventDefault(); 6 setSpecialVersion($(this).data()); 7 }) 8 .on('click', '[data-aa-off]', function (event) { 9 event.preventDefault(); 10 unsetSpecialVersion(); 11 }) 12 .on('click', '[data-aa-on]', function (event) { 13 event.preventDefault(); 14 setDefaultsSpecialVersion(); 15 }); 16 17 // Ð âР°РÑСÑСÐÐ ÑÐ Â°Ð ÂµÐ Ñ Ð¡âСÑÐ Ð Ð ÑСâ Ð ÑСРСÐÐ ÑРµСâ Ð ÐРµСÐСÐÐ ÑÐ Ñ 18 jQuery(document).ready(function($) { 19 setSpecialVersion(); 20 }); 21 22 /** 23 * Ð ÐСÐСâР°РРРÑÐ ÐÐ ÑР° Ð ÑР°СÐР°РÑРµСâСÐÐ ÑÐ Ð Ð ÑСâÐ ÑР±СÐажеРРРÑСРСÐÐ ÑРµСâ Ð ÐРµСÐСÐÐ ÑÐ Ñ 24 * @param {object} data Ð ÑР±СÐРµРÑСâ СРРÒР°РРРРСâ¹Ð ÑÐ Ñ Ð ÒР»СРСâÐ ÑСÐÐ ÑÐ ÑСÐÐ ÑÐ ÐР°РРРÑСРРÑР°СÐР°РÑРµСâСÐÐ ÑÐ Ð 25 */ 26 function setSpecialVersion(data) { 27 var 28 // Ð ÑÐ ÑР»СÑСâ¡Ð Â°Ð ÂµÐ Ñ Ð Ñ Ð¡ÐÐ ÑСâ¦Ð¡ÐР°РРСÐÐ ÂµÐ Ñ Ð¡âРµРÑСÑСâ°Ð µРµ Р·РРР°Сâ¡Ð µРРРÑРµ РРСÑР¶РРРÑÐ â Ð ÑСÑÐ ÑÐ Ñ; 29 $html = $('html'), 30 // Ð ÑÐ ÑР»СÑСâ¡Ð Â°Ð ÂµÐ Ñ Ð¡âРµРÑСÑСâ°Ð µРµ Р·РРР°Сâ¡Ð µРРРÑРµ Р°СâСÐÐ ÑР±СÑСâР° class Ð Ñ html. 31 htmlCurrentClass = $html.prop('class'), 32 // Ð ÐÐ ÒалСÐÐ ÂµÐ Ñ Ð¡ÐСâР°СÐСâ¹Ð µ Ð ÑлаСÐСÐÐ¡â¹ Ð¡Ñ html, Ð ÑСÐСâР°РÐР»СÐÐ ÂµÐ Ñ Ð¡âÐ ÑР»СÐÐ ÑÐ Ñ Ð¡â¡Ð¡ÑР¶РÑРµ Ð ÑлаСÐСÐСâ¹, СÐСâÐ Ñ Ð ÐажРРРÑ, 33 // Сâ.Ð Ñ. Ð ÑлаСÐСÐС⹠РÒÐ ÑР±Р°РÐР»СÐÐ ÂµÐ Ñ Ð Ð Ð Âµ СâÐ ÑР»СÐÐ ÑÐ Ñ Ð ÑСâ¹. 34 clearSpecialClasses = htmlCurrentClass.replace(/special-([a-z,A-Z,-]+)/g, ''), 35 // Ð ÑСÐÐ ÑÐ Â·Ð Ð Ð Â°Ð Ñ Ð ÐÐ ÑР»СÐСâ¡Ð µРРРРРÑÐ â СÐÐ ÑРµСâ Ð ÐРµСÐСÐÐ ÑÐ Ñ, Ð ÑРРР¶Рµ СÐÐ ÑРµСâ Ð ÑалСÐРРСâ¹Ð â Ð ÑлаСÐСÐ, Ð ÑÐ ÑСâÐ ÑСÐСâ¹Ð â Ð ÒÐ ÑР±Р°РÐÐ ÑСâСÐÐ¡Ð Ð Ñ html 36 $aaVersion = { 37 'aaVersion': 'on' 38 }, 39 // Ð ÑРµСÐРµРÑРµРРРРР°СРРÑÐ ÑÐ Ò Ð Ð Ð ÑÐ ÐСâ¹Ð µ Ð ÑлаСÐСÐСâ¹. 40 htmlClass = ''; 41 42 // Ð â¢Ð¡ÐÐ Â»Ð Ñ Ð ÑРµСÐРµРÒР°РРС⹠РÒР°РРРРСâ¹Ð µ 43 if (data) { 44 // Ð ÑР±СÐРµРÒÐ ÑРРСÐÐ ÂµÐ Ñ Ð¡ÐСÑСâ°Ð µСÐСâÐ ÐСÑСÐСâ°Ð ÑРµ Ð ÑСÑÐ ÑÐ Ñ Ð¡Ð Ð Ð Ð ÑÐ ÐСâ¹Ð ÑÐ Ñ Ð ÒР°РРРРСâ¹Ð ÑÐ Ñ Ð ÑР· СÐСÐСâ¹Ð »РÑÐ Ñ. 45 var $newCookies = $.extend(Cookies.getJSON('aaSet'), data, $aaVersion); 46 // Ð âР°РÑÐ ÑСÐСâ¹Ð ÐÐ Â°Ð ÂµÐ Ñ Ð Ð Ð ÑÐ ÐСÑСРРÑСÑÐ ÑÐ¡Ñ 47 Cookies.set('aaSet', $newCookies, { 48 expires: 365, 49 path: '/', 50 secure: false 51 }); 52 } 53 54 // Ð ÐÐ ÒалСÐÐ ÂµÐ Ñ Ð Ð Ð ÂµÐ Ð Ð¡ÑР¶РРСâ¹Ð µ Ð ÑлаСÐСÐС⹠a-current. 55 $('.a-current').removeClass('a-current'); 56 // Ð â¢Ð¡ÐÐ Â»Ð Ñ Ð ÂµÐ¡ÐСâСРРÑСÑÐ ÑР° вÐâ СÐабРÑСâаеРÑ. 57 if (Cookies.getJSON('aaSet')) { 58 // Ð ÑСÐÐ ÑР±РµРÑÐ Â°Ð ÂµÐ Ñ Ð ÑÐ Ñ Ð ÑР°СÐСÐСâ¹Ð ÐÐ¡Ñ Ð ÑР· РРР°Сâ¬Ð µРâ Ð ÑСÑÐ ÑÐ Ñ 59 $.each(Cookies.getJSON('aaSet'), function (key, val) { 60 // Р¤РÑСÐÐ ÑÐ ÑСÐСÑÐ ÂµÐ Ñ Ð¡ÐСâСÐÐ ÑÐ ÑÐ¡Ñ Ð¡Ð Ð ÑлаСÐСÐР°РÑÐ Ñ, Ð ÒÐ ÑР±Р°РÐР»СÐРµРÑСâ¹Ð ÑÐ Ñ Ð Ñ html 61 htmlClass += ' special-' + key + '-' + val; 62 if (key) { 63 var selector = ('.' + key + '-' + val + ''); 64 // Ð âÐ ÑР±Р°РÐР»СÐÐ ÂµÐ Ñ Ð Ð Ð¡ÑР¶РРСâ¹Ð µ Ð ÑлаСÐСÐС⹠a-current Ð Ð Ð ÑР°РРелСÐ. 65 $(selector).addClass('a-current'); 66 }; 67 }); 68 69 $html 70 // Ð âР°РÑРµРРСÐÐ ÂµÐ Ñ Ð¡âРµРÑСÑСâ°Ð ÑÐ â Р°СâСÐÐ ÑР±СÑСâ РРР° Ð ÑСâ¡Ð ÑСâ°Ð µРРРРСâ¹Ð â Ð ÑСâ Р»РÑСâ¬Ð Ð Ð ÑС⦠РÑлаСÐСÐÐ ÑÐ Ð. 71 .prop('class', clearSpecialClasses) 72 // Ð âÐ ÑР±Р°РÐР»СÐÐ ÂµÐ Ñ Ð ÐÐ Ð Ð ÑÐ ÐСРСÐСâÐ ÑСÐÐ ÑÐ ÑСÐÐ ÑÐ ÐР°РРРРСâ¹Ð µ Ð ÑлаСÐСÐСâ¹. 73 .addClass(htmlClass); 74 75 // Ð ÑРµСÐРµСÐСâ¡Ð ÑСâÐ Â°Ð ÂµÐ Ñ Ð ÐСâ¹Ð¡ÐÐ ÑСâÐ¡Ñ Ð Â±Ð Â»Ð ÑÐ ÑÐ ÑÐ Ð (Ð ÒР»СРРÑÐ ÑСÐСÐРµРÑСâÐ Ð Ð ÑСÐСâÐ Ñ Ð ÑСâÐ ÑР±СÐажеРРРÑСÐ) 76 $.fn.matchHeight._update(); 77 } 78 79 80 return false;
81 } 82 83 /** 84 * Ð ÑСâÐ ÑР»СÐСâ¡Ð µРРРÑРµ СÐÐ ÑРµСâ Ð ÑалСÐÐ Ð Ð ÑÐ â Ð ÐРµСÐСÐÐ ÑÐ Ñ Ð¡ÐР°РâСâР°. 85 */ 86 function unsetSpecialVersion() { 87 var 88 // Ð ÑÐ ÑР»СÑСâ¡Ð Â°Ð ÂµÐ Ñ Ð Â·Ð Ð Ð Â°Ð¡â¡Ð µРРРÑРµ Ð ÑлаСÐСÐР° СâРµРÑР° html. 89 htmlCurrentClass = $('html').prop('class'), 90 // Ð ÑСâ¡Ð ÑСâ°Ð Â°Ð ÂµÐ Ñ Ð ÑСâ Ð ÑлаСÐСÐÐ ÑРРСÐÐ ÑРµСâ Ð ÐРµСÐСÐÐ ÑÐ Ñ 91 clearSpecialClasses = htmlCurrentClass.replace(/special-([a-z,A-Z,-]+)/g, ''); 92 // Ð âР°РÑРµРРСÐÐ ÂµÐ Ñ Ð¡âРµРÑСÑСâ°Ð ÑÐ â Р°СâСÐÐ ÑР±СÑСâ РРР° Ð ÑСâ¡Ð ÑСâ°Ð µРРРРСâ¹Ð â Ð ÑСâ Р»РÑСâ¬Ð Ð Ð ÑС⦠РÑлаСÐСÐÐ ÑÐ Ð. 93 $('html').prop('class', clearSpecialClasses); 94 // Ð ÐÐ ÒалСÐÐ ÂµÐ Ñ Ð ÑСÑÐ ÑÐ Ñ 95 Cookies.remove('aaSet', { 96 path: '/' 97 }); 98 } 99 100 /** 101 * Ð ÐСÐСâР°РРРÑÐ ÐÐ ÑР° Ð ÒРµСâÐ ÑР»СâРРСâ¹Ð¡â¦ Р·РРР°Сâ¡Ð µРРРÑÐ â Ð ÒР»СРСÐÐ ÑРµСâ Ð ÐРµСÐСÐÐ ÑÐ Ñ. 102 * @param {object} params Ð ÑР±СÐРµРÑСâ СРРÒР°РРРРСâ¹Ð ÑÐ Ñ Ð ÒР»СРСâÐ ÑСÐÐ ÑÐ ÑСÐÐ ÑÐ ÐР°РРРÑСРРÑР°СÐР°РÑРµСâСÐÐ ÑÐ Ð. 103 */ 104 function setDefaultsSpecialVersion(params) { 105 // Ð âР°РÒР°СâÐ Ñ Ð Â·Ð Ð Ð Â°Ð¡â¡Ð µРРРÑСРРÑÐ Ñ Ð¡ÑÐ ÑÐ ÑР»Сâ¡Ð °РРРÑСР106 var $specialDefaults = { 107 'aaVersion': 'on', 108 'aaColor': 'black', 109 'aaFontsize': 'small', 110 'aaFont': 'tahoma', 111 'aaKerning': 'normal', 112 'aaImage': 'on' 113 }; 114 115 // Ð ÑР±СÐРµРÒÐ ÑРРСÐÐ ÂµÐ Ñ Ð Â·Ð Ð Ð Â°Ð¡â¡Ð µРРРÑСРРÑÐ Ñ Ð¡ÑÐ ÑÐ ÑР»Сâ¡Ð °РРРÑСРСРРÑРµСÐРµРÒР°РРРРСâ¹Ð ÑÐ Ñ Ð ÒР°РРРРСâ¹Ð ÑÐ Ñ. 116 var $setDefaulParams = $.extend($specialDefaults, params); 117 118 // Ð âСâ¹Ð ·Сâ¹Ð ÐÐ Â°Ð ÂµÐ Ñ setSpecialVersion, Ð ÑÐ ÒРµ Ð Ñ Ð ÑСÐÐ ÑÐ ÑСÐСâ¦Ð ÑÐ ÒÐ ÑСâ Ð ÐРµСÐСРРÑСÐÐ ÑСâ РµСÐСÐ. 119 setSpecialVersion($setDefaulParams); 120 } 121 122})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.