1(function ($) { 2 3 $.fn.bemMod = function (name, value) { 4 5 this.each(function () { 6 var this_cls_raw = this.className, 7 this_base_cls = this.className.split(/\s+/)[0]; 8 9 if (this_base_cls !== '') { 10 console.group(this_base_cls); 11 12 var $this = $(this); 13 14 var mod_cls = this_base_cls + '_' + name; 15 if (value === false) { // Удаление модиÑикаÑоÑа 16 mod_cls += '_' + value; 17 } 18 else if (value === true) { // Ðобавление ÑокÑаÑÑнного модиÑикаÑоÑа 19 if (this_cls_raw.indexOf(mod_cls) === -1) { 20 this_cls_raw += ' ' + mod_cls; 21 this.className = this_cls_raw; 22 } 23 } 24 else if (value !== undefined) { // Ðобавление полного модиÑикаÑоÑа 25 26 } 27 else { // ÐозвÑÐ°Ñ Ð·Ð½Ð°ÑÐµÐ½Ð¸Ñ Ð¼Ð¾Ð´Ð¸ÑикаÑоÑа 28 29 } 30 31 console.log(this); 32 console.log(name); 33 console.log(value); 34 console.log(this_base_cls); 35 36 console.groupEnd(this_base_cls); 37 } 38 39 }); 40 41 return this; 42 43 }; 44 45})(jQuery);
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.