1/*! 2 * Button visually impaired v1.0.8 3 */ 4(function($){ 5 $.bvi = function(options) { 6 var default_setting = $.extend({ 7 'bvi_target': '.bvi-open', 8 'bvi_theme': 'white', 9 'bvi_font': 'arial', 10 'bvi_font_size': 16, 11 'bvi_letter_spacing': 'normal', 12 'bvi_line_height': 'normal', 13 'bvi_images': true, 14 'bvi_reload': false, 15 'bvi_fixed': true, 16 'bvi_voice': true, 17 'bvi_flash_iframe': true, 18 'bvi_hide': false 19 }, options); 20 21 console.log('Button visually impaired v1.0.8'); 22 23 var versionIE = detectIE(); 24 var selector = default_setting.bvi_target; 25 var check_bvi_theme, 26 check_bvi_font, 27 check_bvi_letter_spacing, 28 check_bvi_line_height, 29 check_bvi_font_size, 30 check_bvi_images, 31 check_bvi_fixed, 32 check_bvi_voice, 33 check_bvi_flash_iframe, 34 check_bvi_hide, 35 checkError; 36 37 function detectIE() { 38 var ua = window.navigator.userAgent; 39 var msie = ua.indexOf('MSIE '); 40 if (msie > 0) { 41 return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10); 42 } 43 44 var trident = ua.indexOf('Trident/'); 45 if (trident > 0) { 46 var rv = ua.indexOf('rv:'); 47 return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10); 48 } 49 50 var edge = ua.indexOf('Edge/'); 51 if (edge > 0) { 52 return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10); 53 } 54 55 return false; 56 } 57 58 function bvi_voice_check() { 59 if(Cookies.get('bvi-voice') === 'true'){ 60 $('.bvi-link').show(); 61 } else { 62 $('.bvi-link').hide(); 63 } 64 } 65 66 function bvi_panel_voice(text) { 67 if(Cookies.get('bvi-voice') === 'true'){ 68 if(responsiveVoice.voiceSupport()) { 69 responsiveVoice.setDefaultVoice("Russian Female"); 70 responsiveVoice.cancel(); 71 responsiveVoice.speak(text); 72 } 73 } else { 74 responsiveVoice.cancel(); 75 } 76 } 77 78 function bvi_voice() { 79 if(responsiveVoice.voiceSupport() || versionIE >= 11 || versionIE >= 10 || versionIE >= 9) { 80 responsiveVoice.setDefaultVoice("Russian Female"); 81 var bvi_voice = $(".bvi-voice"); 82 bvi_voice.each(function(index){ 83 var bvi_voice_text_id = 'bvi-voice-text-id-' + index; 84 $(this).wrapInner('<div class="bvi-voice-text ' + bvi_voice_text_id + '"></div>'); 85 $(this).prepend('<div class="bvi bvi-link" data-bvi-voice-class=".'+ bvi_voice_text_id +'"><div class="bvi-btn-group">' + 86 '<a href="#" class="bvi-play bvi-btn bvi-btn-outline-dark bvi-btn-sm">ÐоÑпÑоизвеÑÑи</a>' + 87 '<a href="#" class="bvi-stop bvi-btn bvi-btn-outline-dark bvi-btn-sm">СÑоп</i></a>' + 88 '</div></div>'); 89 }); 90 $('.bvi-play').click(function() { 91 var bvi_voice_class = $(this).parent().parent().data('bvi-voice-class'); 92 var bvi_voice_text = $(bvi_voice_class).text(); 93 if(bvi_voice_class) { 94 if(Cookies.get('bvi-voice') === 'true'){ 95 responsiveVoice.speak(bvi_voice_text); 96 } 97 } else { 98 responsiveVoice.cancel(); 99 } 100 return false; 101 }); 102 $('.bvi-stop').click(function () { 103 responsiveVoice.cancel(); 104 return false; 105 }); 106 } else { 107 $('.bvi-btn-voice').hide(); 108 set('data-bvi-voice', 'bvi-voice', false); 109 console.log('ÐÐ°Ñ Ð±ÑаÑÐ·ÐµÑ Ð½Ðµ поддеÑÐ¶Ð¸Ð²Ð°ÐµÑ ÑинÑез ÑеÑи.') 110 } 111 } 112 113 function bvi_click() { 114 $("#bvi-panel-close, .bvi-panel-close").click(function() { 115 if (Cookies.get("bvi-reload") === 'true') { 116 document.location.reload(true); 117 } 118 $('.bvi-img-off').remove(); 119 $("img").each(function() { 120 $(this).show(); 121 $(this).removeClass('grayscale'); 122 }); 123 Cookies.remove("bvi-panel-active", {path: "/"}); 124 Cookies.remove("bvi-font-size", {path: "/" }); 125 Cookies.remove("bvi-theme", {path: "/"}); 126 Cookies.remove("bvi-images", {path: "/"}); 127 Cookies.remove("bvi-line-height", {path: "/"}); 128 Cookies.remove("bvi-letter-spacing", {path: "/"}); 129 Cookies.remove("bvi-voice", {path: "/"}); 130 Cookies.remove("bvi-font-family", {path: "/"}); 131 Cookies.remove("bvi-panel-hide", {path: "/"}); 132 Cookies.remove("bvi-flash-iframe", {path: "/"}); 133 Cookies.remove("bvi-reload", {path: "/"}); 134 if(responsiveVoice.voiceSupport()) { 135 responsiveVoice.cancel(); 136 } 137 active(); 138 bvi_panel_voice('ÐбÑÑÐ½Ð°Ñ Ð²ÐµÑÑÐ¸Ñ ÑайÑа'); 139 return false;
140 }); 141 142 $('#bvi-panel-hide').click(function() { 143 $('.bvi-panel').toggle(0); 144 $('.bvi-eye-link').toggle(0); 145 set('data-bvi-panel-hide', 'bvi-panel-hide', true); 146 bvi_panel_voice('ÐÐ°Ð½ÐµÐ»Ñ ÑкÑÑÑа'); 147 return false; 148 }); 149 150 $('#bvi-panel-show').click(function() { 151 $('.bvi-panel').toggle(0); 152 $('.bvi-eye-link').toggle(0); 153 set('data-bvi-panel-hide', 'bvi-panel-hide', false); 154 bvi_panel_voice('ÐÐ°Ð½ÐµÐ»Ñ Ð¾ÑкÑÑÑа'); 155 return false; 156 }); 157 158 $('#bvi-setting').click(function() { 159 $('.bvi-setting-menu').toggle(0); 160 $(this).toggleClass("active"); 161 bvi_panel_voice('ÐополниÑелÑнÑе наÑÑÑойки'); 162 return false; 163 }); 164 165 $('#bvi-setting-close').click(function() { 166 $('.bvi-setting-menu').toggle(0); 167 $('#bvi-setting').toggleClass("active"); 168 bvi_panel_voice('ÐополниÑелÑнÑе наÑÑÑойки закÑÑÑÑ'); 169 return false; 170 }); 171 172 $('#bvi-font-size-less').click(function () { 173 size = parseFloat(Cookies.get("bvi-font-size")) - 1; 174 $(this).addClass('active').siblings().removeClass('active'); 175 if (size != 0) { 176 set('data-bvi-size', 'bvi-font-size', size); 177 bvi_panel_voice('Ð Ð°Ð·Ð¼ÐµÑ ÑÑиÑÑа ÑменÑÑен'); 178 } 179 return false; 180 }); 181 182 $('#bvi-font-size-more').click(function () { 183 size = parseFloat(Cookies.get("bvi-font-size")) + 1; 184 $(this).addClass('active').siblings().removeClass('active'); 185 if (size != 40) { 186 set('data-bvi-size', 'bvi-font-size', size); 187 bvi_panel_voice('Ð Ð°Ð·Ð¼ÐµÑ ÑÑиÑÑа ÑвелиÑен'); 188 } 189 return false; 190 }); 191 192 $("#bvi-theme-white").click(function() { 193 $(this).addClass('active').siblings().removeClass('active'); 194 set('data-bvi-theme', 'bvi-theme', 'white'); 195 bvi_panel_voice('Ð¦Ð²ÐµÑ ÑайÑа ÑеÑнÑм по беломÑ'); 196 return false; 197 }); 198 199 $("#bvi-theme-black").click(function() { 200 $(this).addClass('active').siblings().removeClass('active'); 201 set('data-bvi-theme', 'bvi-theme', 'black'); 202 bvi_panel_voice('Ð¦Ð²ÐµÑ ÑайÑа белÑм по ÑеÑномÑ'); 203 return false; 204 }); 205 206 $("#bvi-theme-blue").click(function() { 207 $(this).addClass('active').siblings().removeClass('active'); 208 set('data-bvi-theme', 'bvi-theme', 'blue'); 209 bvi_panel_voice('Ð¦Ð²ÐµÑ ÑайÑа ÑÑмно-Ñиним по голÑбомÑ'); 210 return false; 211 }); 212 213 $("#bvi-theme-brown").click(function() { 214 $(this).addClass('active').siblings().removeClass('active'); 215 set('data-bvi-theme', 'bvi-theme', 'brown'); 216 bvi_panel_voice('Ð¦Ð²ÐµÑ ÑайÑа коÑиÑневÑм по бежевомÑ'); 217 return false; 218 }); 219 220 $("#bvi-theme-green").click(function() { 221 $(this).addClass('active').siblings().removeClass('active'); 222 set('data-bvi-theme', 'bvi-theme', 'green'); 223 bvi_panel_voice('Ð¦Ð²ÐµÑ ÑайÑа зеленÑм по ÑÑмно-коÑиÑневомÑ'); 224 return false; 225 }); 226 227 $('#bvi-images-true').click(function () { 228 $(this).addClass('active').siblings().removeClass('active'); 229 set('data-bvi-images', 'bvi-images', true); 230 bvi_panel_voice('ÐзобÑÐ°Ð¶ÐµÐ½Ð¸Ñ Ð²ÐºÐ»ÑÑенÑ'); 231 return false;
232 }); 233 234 $('#bvi-images-false').click(function () { 235 $(this).addClass('active').siblings().removeClass('active'); 236 set('data-bvi-images', 'bvi-images', false); 237 bvi_panel_voice('ÐзобÑÐ°Ð¶ÐµÐ½Ð¸Ñ Ð²ÑклÑÑенÑ'); 238 return false; 239 }); 240 241 $('#bvi-images-grayscale').click(function () { 242 $(this).addClass('active').siblings().removeClass('active'); 243 set('data-bvi-images', 'bvi-images', 'grayscale'); 244 bvi_panel_voice('ÐзобÑÐ°Ð¶ÐµÐ½Ð¸Ñ ÑÑÑно-белÑе'); 245 return false; 246 }); 247 248 $("#bvi-line-height-normal").click(function() { 249 $(this).addClass('active').siblings().removeClass('active'); 250 set('data-bvi-line-height', 'bvi-line-height', 'normal'); 251 bvi_panel_voice('ÐеждÑÑÑÑоÑнÑй инÑеÑвал cÑандаÑÑнÑй'); 252 return false; 253 }); 254 255 $("#bvi-line-height-average").click(function() { 256 $(this).addClass('active').siblings().removeClass('active'); 257 set('data-bvi-line-height', 'bvi-line-height', 'average'); 258 bvi_panel_voice('ÐеждÑÑÑÑоÑнÑй инÑеÑвал ÑÑедний'); 259 return false; 260 }); 261 262 $("#bvi-line-height-big").click(function() { 263 $(this).addClass('active').siblings().removeClass('active'); 264 set('data-bvi-line-height', 'bvi-line-height', 'big'); 265 bvi_panel_voice('ÐеждÑÑÑÑоÑнÑй инÑеÑвал болÑÑой'); 266 return false; 267 }); 268 269 $("#bvi-letter-spacing-normal").click(function() { 270 $(this).addClass('active').siblings().removeClass('active'); 271 set('data-bvi-letter-spacing', 'bvi-letter-spacing', 'normal'); 272 bvi_panel_voice('ÐежбÑквеннÑй инÑеÑвал одинаÑнÑй'); 273 return false; 274 }); 275 276 $("#bvi-letter-spacing-average").click(function() { 277 $(this).addClass('active').siblings().removeClass('active'); 278 set('data-bvi-letter-spacing', 'bvi-letter-spacing', 'average'); 279 bvi_panel_voice('ÐежбÑквеннÑй инÑеÑвал полÑÑоÑнÑй'); 280 return false; 281 }); 282 283 $("#bvi-letter-spacing-big").click(function() { 284 $(this).addClass('active').siblings().removeClass('active'); 285 set('data-bvi-letter-spacing', 'bvi-letter-spacing', 'big'); 286 bvi_panel_voice('ÐежбÑквеннÑй инÑеÑвал двойной'); 287 return false; 288 }); 289 290 $("#bvi-font-family-arial").click(function() { 291 $(this).addClass('active').siblings().removeClass('active'); 292 set('data-bvi-font-family', 'bvi-font-family', 'arial'); 293 bvi_panel_voice('ШÑиÑÑ Ð±ÐµÐ· заÑеÑек'); 294 return false; 295 }); 296 297 $("#bvi-font-family-times").click(function() { 298 $(this).addClass('active').siblings().removeClass('active'); 299 set('data-bvi-font-family', 'bvi-font-family', 'times'); 300 bvi_panel_voice('ШÑиÑÑ Ñ Ð·Ð°ÑеÑками'); 301 return false; 302 }); 303
304 $("#bvi-flash-iframe-true").click(function () { 305 $(this).addClass('active').siblings().removeClass('active'); 306 set('data-bvi-flash-iframe', 'bvi-flash-iframe', true); 307 bvi_panel_voice('ÐклÑÑиÑÑ ÑÑейм'); 308 return false; 309 }); 310 311 $("#bvi-flash-iframe-false").click(function () { 312 $(this).addClass('active').siblings().removeClass('active'); 313 set('data-bvi-flash-iframe', 'bvi-flash-iframe', false); 314 bvi_panel_voice('ÐÑклÑÑиÑÑ ÑÑейм'); 315 return false; 316 }); 317 318 $("#bvi-voice-true").click(function () { 319 $(this).addClass('active').siblings().removeClass('active'); 320 set('data-bvi-voice', 'bvi-voice', true); 321 bvi_panel_voice('СинÑез ÑеÑи вклÑÑÑн'); 322 bvi_voice_check(); 323 return false; 324 }); 325 326 $("#bvi-voice-false").click(function () { 327 $(this).addClass('active').siblings().removeClass('active'); 328 set('data-bvi-voice', 'bvi-voice', false); 329 bvi_panel_voice('СинÑез ÑеÑи вÑклÑÑÑн'); 330 bvi_voice_check(); 331 return false; 332 }); 333 334 $("#bvi-settings-default").click(function() { 335 $('#bvi-theme-' + Cookies.get("bvi-theme")).removeClass('active'); 336 $('#bvi-images-' + Cookies.get("bvi-images")).removeClass('active'); 337 $('#bvi-line-height-' + Cookies.get("bvi-line-height")).removeClass('active'); 338 $('#bvi-letter-spacing-' + Cookies.get("bvi-letter-spacing")).removeClass('active'); 339 $('#bvi-font-family-' + Cookies.get("bvi-font-family")).removeClass('active'); 340 $('#bvi-flash-iframe-' + Cookies.get("bvi-flash-iframe")).removeClass('active'); 341 $('#bvi-voice-' + Cookies.get("bvi-voice")).removeClass('active'); 342 343 $('#bvi-theme-' + default_setting.bvi_theme).addClass('active'); 344 $('#bvi-images-' + default_setting.bvi_images).addClass('active'); 345 $('#bvi-line-height-' + default_setting.bvi_line_height).addClass('active'); 346 $('#bvi-letter-spacing-' + default_setting.bvi_letter_spacing).addClass('active'); 347 $('#bvi-font-family-' + default_setting.bvi_font).addClass('active'); 348 $('#bvi-flash-iframe-' + default_setting.bvi_flash_iframe).addClass('active'); 349 $('#bvi-voice-' + default_setting.bvi_voice).addClass('active'); 350 351 set('data-bvi-size', 'bvi-font-size', default_setting.bvi_font_size); 352 set('data-bvi-theme', 'bvi-theme', default_setting.bvi_theme); 353 set('data-bvi-images', 'bvi-images', default_setting.bvi_images); 354 set('data-bvi-line-height', 'bvi-line-height', default_setting.bvi_line_height); 355 set('data-bvi-letter-spacing', 'bvi-letter-spacing', default_setting.bvi_letter_spacing); 356 set('data-bvi-font-family', 'bvi-font-family', default_setting.bvi_font); 357 set('data-bvi-flash-iframe', 'bvi-flash-iframe', default_setting.bvi_flash_iframe); 358 set('data-bvi-voice', 'bvi-voice', default_setting.bvi_voice); 359 bvi_panel_voice('ÐаÑÑÑойки по ÑмолÑаниÑ'); 360 return false; 361 }); 362 } 363 364 function set(data, set_cookies, set_cookies_data) { 365 Cookies.set(set_cookies, set_cookies_data, {path: "/", expires: 1}); 366 $(".bvi-body").attr(data, Cookies.get(set_cookies)); 367 get_image(); 368 } 369 370 function set_active_link() { 371 $('#bvi-theme-' + Cookies.get("bvi-theme")).addClass('active'); 372 $('#bvi-images-' + Cookies.get("bvi-images")).addClass('active'); 373 $('#bvi-line-height-' + Cookies.get("bvi-line-height")).addClass('active'); 374 $('#bvi-letter-spacing-' + Cookies.get("bvi-letter-spacing")).addClass('active'); 375 $('#bvi-font-family-' + Cookies.get("bvi-font-family")).addClass('active'); 376 $('#bvi-flash-iframe-' + Cookies.get("bvi-flash-iframe")).addClass('active'); 377 $('#bvi-voice-' + Cookies.get("bvi-voice")).addClass('active'); 378 } 379 380 function get() { 381 if (typeof Cookies.get("bvi-font-size") === 'undefined' 382 || typeof Cookies.get("bvi-theme") === 'undefined' 383 || typeof Cookies.get("bvi-images") === 'undefined' 384 || typeof Cookies.get("bvi-line-height") === 'undefined' 385 || typeof Cookies.get("bvi-letter-spacing") === 'undefined' 386 || typeof Cookies.get("bvi-voice") === 'undefined' 387 || typeof Cookies.get("bvi-font-family") === 'undefined' 388 || typeof Cookies.get("bvi-panel-hide") === 'undefined' 389 || typeof Cookies.get("bvi-flash-iframe") === 'undefined' 390 || typeof Cookies.get("bvi-reload") === 'undefined' 391 || typeof Cookies.get("bvi-fixed") === 'undefined' 392 ){ 393 Cookies.set("bvi-font-size", default_setting.bvi_font_size, {path: "/", expires: 1}); 394 Cookies.set("bvi-theme", default_setting.bvi_theme, {path: "/", expires: 1}); 395 Cookies.set("bvi-images", default_setting.bvi_images, {path: "/", expires: 1}); 396 Cookies.set("bvi-line-height", default_setting.bvi_line_height, {path: "/", expires: 1}); 397 Cookies.set("bvi-letter-spacing", default_setting.bvi_letter_spacing, {path: "/", expires: 1}); 398 Cookies.set("bvi-voice", default_setting.bvi_voice, {path: "/", expires: 1}); 399 Cookies.set("bvi-font-family", default_setting.bvi_font, {path: "/", expires: 1}); 400 Cookies.set("bvi-panel-hide", default_setting.bvi_hide, {path: "/", expires: 1}); 401 Cookies.set("bvi-flash-iframe", default_setting.bvi_flash_iframe, {path: "/", expires: 1}); 402 Cookies.set("bvi-reload", default_setting.bvi_reload, {path: "/", expires: 1});
403 Cookies.set("bvi-fixed", default_setting.bvi_fixed, {path: "/", expires: 1}); 404 } 405 406 $('.bvi-body').attr({ 407 'data-bvi-panel-hide' : Cookies.get("bvi-panel-hide"), 408 'data-bvi-size' : Cookies.get("bvi-font-size"), 409 'data-bvi-theme' : Cookies.get("bvi-theme"), 410 'data-bvi-images' : Cookies.get("bvi-images"), 411 'data-bvi-line-height' : Cookies.get("bvi-line-height"), 412 'data-bvi-letter-spacing' : Cookies.get("bvi-letter-spacing"), 413 'data-bvi-font-family' : Cookies.get("bvi-font-family"), 414 'data-bvi-flash-iframe' : Cookies.get("bvi-flash-iframe"), 415 'data-bvi-reload' : Cookies.get("bvi-reload"), 416 'data-bvi-voice' : Cookies.get("bvi-voice"), 417 'data-bvi-fixed' : Cookies.get("bvi-fixed") 418 419 }); 420 421 var bvi_panel = Cookies.get("bvi-panel-hide"); 422 423 if(bvi_panel === 'false' || typeof bvi_panel === 'undefined') { 424 $('.bvi-panel').show(); 425 $('.bvi-eye-link').hide(); 426 } else { 427 $('.bvi-panel').hide(); 428 $('.bvi-eye-link').show("slow"); 429 } 430 } 431 432 function get_image() { 433 var bvi_images; 434 bvi_images = Cookies.get("bvi-images"); 435 436 if (bvi_images === 'true') { 437 $("img").each(function() { 438 $(this).removeClass('grayscale'); 439 $(this).show(); 440 $('.bvi-img-off').remove(); 441 if(versionIE == 11 || versionIE == 10 || versionIE == 9) { 442 var databviimgorign = $(this).attr('data-bvi-img-orign') || this.src; 443 this.src = databviimgorign; 444 } 445 }); 446 } 447 448 if (bvi_images === 'false') { 449 $(".bvi-img-off").remove(); 450 $("img").each(function() { 451 $(this).removeClass('grayscale'); 452 $(this).hide(); 453 var alt = this.alt || 'ÐÐµÑ Ð¾Ð¿Ð¸ÑÐ°Ð½Ð¸Ñ Ðº изобÑажениÑ'; 454 var imgClass = $(this).attr("class") || ''; 455 var imgId = $(this).attr("id") || ''; 456 $(this).after($('<div class="bvi-img-off '+imgClass+'" id="'+imgId+'" style="width: ' + $(this).width() + "px; height: " + $(this).height() + 'px">').html(alt)); 457 }); 458 } 459 460 if (bvi_images === 'grayscale') { 461 $("img").each(function() { 462 $(this).show(); 463 $(this).addClass('grayscale'); 464 $('.bvi-img-off').remove(); 465 if(versionIE == 11 || versionIE == 10 || versionIE == 9) { 466 $(this).attr('data-bvi-img-orign', this.src); 467 var src = grayscale(this.src); 468 this.src = src; 469 } 470 }); 471 } 472 } 473 474 function grayscale(src){ 475 var canvas = document.createElement('canvas'); 476 var ctx = canvas.getContext('2d'); 477 var imgObj = new Image(); 478 //imgObj.crossOrigin = 'anonymous'; 479 imgObj.src = src; 480 canvas.width = imgObj.width; 481 canvas.height = imgObj.height; 482 ctx.drawImage(imgObj, 0, 0); 483 var imgPixels = ctx.getImageData(0, 0, canvas.width, canvas.height); 484 for(var y = 0; y < imgPixels.height; y++){ 485 for(var x = 0; x < imgPixels.width; x++){ 486 var i = (y * 4) * imgPixels.width + x * 4; 487 var avg = (imgPixels.data[i] + imgPixels.data[i + 1] + imgPixels.data[i + 2]) / 3; 488 imgPixels.data[i] = avg; 489 imgPixels.data[i + 1] = avg; 490 imgPixels.data[i + 2] = avg; 491 } 492 } 493 ctx.putImageData(imgPixels, 0, 0, 0, 0, imgPixels.width, imgPixels.height); 494 495 return canvas.toDataURL(); 496 } 497 498 function active() { 499 if(versionIE == 8 || versionIE == 7 || versionIE == 6 || versionIE == 5) { 500 console.log('ÐÑаÑÐ·ÐµÑ Ð½Ðµ поддеÑживаеÑÑÑ.'); 501 } else { 502 if (Cookies.get('bvi-panel-active') === 'true') { 503 $(selector).hide().after($('<a href="#" class="bvi-panel-close" title="ÐбÑÑÐ½Ð°Ñ Ð²ÐµÑÑÐ¸Ñ ÑайÑа">ÐбÑÑÐ½Ð°Ñ Ð²ÐµÑÑÐ¸Ñ ÑайÑа</a>')); 504 panel(); 505 bvi_voice(); 506 bvi_voice_check(); 507 bvi_click(); 508 set_active_link(); 509 } else { 510 bvi_voice(); 511 $(selector).show(); 512 $('.bvi-panel-close').remove(); 513 $(".bvi").remove(); 514 $('body > .bvi-body').contents().unwrap(); 515 $('.bvi-voice-text').contents().unwrap(); 516 } 517 } 518 } 519 520 function panel() { 521 $('head').append('<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">'); 522 $('body').wrapInner('<div class="bvi-body"></div>'); 523 $('body').prepend('<div class="bvi bvi-panel"></a>\n' + 524 ' <div class="bvi-container bvi-my-auto">\n' + 525 ' <div class="bvi-row">\n' + 526 ' <div class="bvi-col-sm-3 bvi-col-md-6 bvi-col-lg-2 bvi-p-0">\n' + 527 ' <div class="bvi-text-center">\n' + 528 ' <div class="bvi-title bvi-mb-2">Ð Ð°Ð·Ð¼ÐµÑ ÑÑиÑÑа</div>\n' + 529 ' <div class="bvi-btn-group">\n' + 530 ' <a href="#" id="bvi-font-size-less" class="bvi-btn bvi-btn-outline-dark bg" title="УменÑÑиÑÑ ÑÐ°Ð·Ð¼ÐµÑ ÑÑиÑÑа"><i class="bvi-icon bvi-font"></i><i class="bvi-icon bvi-minus"></i></a>\n' + 531 ' <a href="#" id="bvi-font-size-more" class="bvi-btn bvi-btn-outline-dark" title="УвелиÑиÑÑ ÑÐ°Ð·Ð¼ÐµÑ ÑÑиÑÑа"><i class="bvi-icon bvi-font"></i><i class="bvi-icon bvi-plus"></i></a>\n' + 532 ' </div>\n' + 533 ' </div>\n' + 534 ' </div>\n' + 535 ' <div class="bvi-col-sm-5 bvi-col-md-6 bvi-col-lg-3 bvi-p-0">\n' + 536 ' <div class="bvi-text-center">\n' + 537 ' <div class="bvi-title bvi-mb-2">ЦвеÑа ÑайÑа</div>\n' + 538 ' <div class="bvi-btn-group">\n' + 539 ' <a href="#" id="bvi-theme-white" class="bvi-btn bvi-btn-link bvi-border bvi-border-dark" title="ЧеÑнÑм по беломÑ" style="color: black; background-color: white !important;"><i class="bvi-icon bvi-font"></i></a>\n' + 540 ' <a href="#" id="bvi-theme-black" class="bvi-btn bvi-btn-link" title="ÐелÑм по ÑеÑномÑ" style="color: white !important; background-color: black !important;"><i class="bvi-icon bvi-font"></i></a>\n' + 541 ' <a href="#" id="bvi-theme-blue" class="bvi-btn bvi-btn-link bvi-border bvi-border-dark" title="Темно-Ñиним по голÑбомÑ" style="color: #063462 !important; background-color: #9DD1FF !important;"><i class="bvi-icon bvi-font"></i></a>\n' + 542 ' <a href="#" id="bvi-theme-brown" class="bvi-btn bvi-btn-dark bvi-border bvi-border-dark" title="ÐоÑиÑневÑм по бежевомÑ" style="color: #4D4B43 !important; background-color: #F7F3D6 !important;"><i class="bvi-icon bvi-font"></i></a>\n' + 543 ' <a href="#" id="bvi-theme-green" class="bvi-btn bvi-btn-dark bvi-border bvi-border-dark" title="ÐеленÑм по Ñемно-коÑиÑневомÑ" style="color: #A9E44D !important; background-color: #3B2716 !important;"><i class="bvi-icon bvi-font"></i></a>\n' + 544 ' </div>\n' + 545 ' </div>\n' + 546 ' </div>\n' + 547 ' <div class="bvi-col-sm-4 bvi-col-md-6 bvi-col-lg-2 bvi-p-0">\n' + 548 ' <div class="bvi-text-center">\n' + 549 ' <div class="bvi-title bvi-mb-2">ÐзобÑажениÑ</div>\n' + 550 ' <div class="bvi-btn-group">\n' + 551 ' <a href="#" id="bvi-images-true" class="bvi-btn bvi-btn-outline-dark" title="ÐзобÑÐ°Ð¶ÐµÐ½Ð¸Ñ Ð²ÐºÐ»ÑÑенÑ"><i class="bvi-icon bvi-circle"></i></a>\n' + 552 ' <a href="#" id="bvi-images-false" class="bvi-btn bvi-btn-outline-dark" title="ÐзобÑÐ°Ð¶ÐµÐ½Ð¸Ñ Ð²ÑклÑÑенÑ"><i class="bvi-icon bvi-circle-notch"></i></a>\n' + 553 ' <a href="#" id="bvi-images-grayscale" class="bvi-btn bvi-btn-outline-dark" title="ÐзобÑÐ°Ð¶ÐµÐ½Ð¸Ñ ÑеÑно-белÑе"><i class="bvi-icon bvi-adjust"></i></a>\n' + 554 ' </div>\n' + 555 ' </div>\n' + 556 ' </div>\n' + 557 ' <div class="bvi-col-sm-12 bvi-col-md-6 bvi-col-lg-5 bvi-p-0">\n' + 558 ' <div class="bvi-text-center">\n' + 559 ' <div class="bvi-title bvi-mb-2">ÐополниÑелÑно</div>\n' + 560 ' <div class="bvi-btn-group bvi-btn-voice">\n' + 561 ' <a href="#" id="bvi-voice-true" class="bvi-btn bvi-btn-outline-dark" title=""><i class="bvi-icon bvi-volume-up"></i></a>\n' + 562 ' <a href="#" id="bvi-voice-false" class="bvi-btn bvi-btn-outline-dark"><i class="bvi-icon bvi-volume-off"></i></a>\n' + 563 ' </div>\n' + 564 ' <div class="bvi-btn-group">\n' + 565 ' <a href="#" id="bvi-setting" class="bvi-btn bvi-btn-outline-dark" title="ÐаÑÑÑойки"><i class="bvi-icon bvi-cogs bvi-mr-1"></i> ÐаÑÑÑойки</a>\n' + 566 ' <a href="#" id="bvi-panel-close" class="bvi-btn bvi-btn-outline-dark" title="ÐбÑÑÐ½Ð°Ñ Ð²ÐµÑÑÐ¸Ñ ÑайÑа"><i class="bvi-icon bvi-low-vision"></i></a>\n' + 567 ' <a href="#" id="bvi-panel-hide" class="bvi-btn bvi-btn-outline-dark" title="СкÑÑÑÑ Ð¿Ð°Ð½ÐµÐ»Ñ"><i class="bvi-icon bvi-chevron-circle-up"></i></a>\n' + 568 ' </div>\n' + 569 ' </div>\n' + 570 ' </div>\n' + 571 ' </div>\n' + 572 ' <div class="bvi-row bvi-setting-menu">\n' + 573 ' <div class="bvi-col">\n' + 574 ' <hr class="bvi-hr mt-1">\n' + 575 ' <div class="bvi-row">\n' + 576 ' <div class="bvi-col bvi-p-0">\n' + 577 ' <div class="bvi-text-center">\n' + 578 ' <div class="bvi-title bvi-mb-2">ÐеждÑÑÑÑоÑнÑй инÑеÑвал</div>\n' + 579 ' <div class="bvi-btn-group">\n' + 580 ' <a href="#" id="bvi-line-height-normal" class="bvi-btn bvi-btn-outline-dark" title="ÐеждÑÑÑÑоÑнÑй инÑеÑвал ÑÑандаÑÑнÑй">СÑандаÑÑнÑй</a>\n' + 581 ' <a href="#" id="bvi-line-height-average" class="bvi-btn bvi-btn-outline-dark" title="ÐеждÑÑÑÑоÑнÑй инÑеÑвал ÑÑедний">СÑедний</a>\n' + 582 ' <a href="#" id="bvi-line-height-big" class="bvi-btn bvi-btn-outline-dark" title="ÐеждÑÑÑÑоÑнÑй инÑеÑвал болÑÑой">ÐолÑÑой</a>\n' + 583 ' </div>\n' + 584 ' </div>\n' + 585 ' </div>\n' + 586 ' <div class="bvi-col bvi-p-0">\n' + 587 ' <div class="bvi-text-center">\n' + 588 ' <div class="bvi-title bvi-mb-2">ÐежбÑквеннÑй инÑеÑвал</div>\n' + 589 ' <div class="bvi-btn-group">\n' + 590 ' <a href="#" id="bvi-letter-spacing-normal" class="bvi-btn bvi-btn-outline-dark" title="ÐежбÑквеннÑй инÑеÑвал одинаÑнÑй">ÐдинаÑнÑй</a>\n' + 591 ' <a href="#" id="bvi-letter-spacing-average" class="bvi-btn bvi-btn-outline-dark" title="ÐежбÑквеннÑй инÑеÑвал полÑÑоÑнÑй">ÐолÑÑоÑнÑй</a>\n' + 592 ' <a href="#" id="bvi-letter-spacing-big" class="bvi-btn bvi-btn-outline-dark" title="ÐежбÑквеннÑй инÑеÑвал двойной">Ðвойной</a>\n' + 593 ' </div>\n' + 594 ' </div>\n' + 595 ' </div>\n' + 596 ' <div class="bvi-col bvi-p-0">\n' + 597 ' <div class="bvi-text-center">\n' + 598 ' <div class="bvi-title bvi-mb-2">ШÑиÑÑ</div>\n' + 599 ' <div class="bvi-btn-group">\n' + 600 ' <a href="#" id="bvi-font-family-arial" class="bvi-btn bvi-btn-outline-dark" title="ШÑиÑÑ Ð±ÐµÐ· заÑеÑек">Ðез заÑеÑек</a>\n' + 601 ' <a href="#" id="bvi-font-family-times" class="bvi-btn bvi-btn-outline-dark" title="ШÑиÑÑ Ñ Ð·Ð°ÑеÑками">С заÑеÑками</a>\n' + 602 ' </div>\n' + 603 ' </div>\n' + 604 ' </div>\n' + 605 ' </div>\n' + 606 ' <div class="bvi-row">\n' + 607 ' <div class="bvi-col bvi-p-0">\n' + 608 ' <div class="bvi-text-left bvi-mt-3">\n' + 609 ' <div class="bvi-btn-group">\n' + 610 ' <a href="#" id="bvi-flash-iframe-true" class="bvi-btn bvi-btn-outline-dark bvi-btn-sm" title="ÐклÑÑиÑÑ Ð¤Ñейм"><i class="bvi-icon bvi-bolt"></i> ÐклÑÑиÑÑ Ð¤Ñейм</a>\n' + 611 ' <a href="#" id="bvi-flash-iframe-false" class="bvi-btn bvi-btn-outline-dark bvi-btn-sm" title="ÐклÑÑиÑÑ Ð¤Ñейм"><i class="bvi-icon bvi-bolt"></i> ÐÑклÑÑиÑÑ Ð¤Ñейм</a>\n' + 612 ' </div>\n' + 613 ' </div>\n' + 614 ' </div>\n' + 615 ' <div class="bvi-col bvi-p-0">\n' + 616 ' <div class="bvi-text-right bvi-mt-3">\n' + 617 ' <a href="#" id="bvi-settings-default" class="bvi-btn bvi-btn-outline-dark bvi-btn-sm" title="ÐеÑнÑÑÑ ÑÑандаÑÑнÑе наÑÑÑойки"><i class="bvi-icon bvi-sync-alt"></i> ÐаÑÑÑойки по ÑмолÑаниÑ</a>\n' + 618 ' <a href="#" id="bvi-setting-close" class="bvi-btn bvi-btn-dark bvi-btn-sm" title="ÐакÑÑÑÑ Ð¿Ð°Ð½ÐµÐ»Ñ">ÐакÑÑÑÑ <i class="bvi-icon bvi-times-circle"></i> </a>\n' + 619 ' </div>\n' + 620 ' </div>\n' + 621 ' </div>\n' + 622 '
622 <div class="bvi-row">\n' + 623 ' <div class="bvi-col bvi-p-0">\n' + 624 ' <div class="bvi-text-center bvi-copy bvi-mt-2">\n' + 625 ' <a href="http://alina-design.com/" target="_blank" title="alina-design.com">alina-design.com</a>\n' + 626 ' </div>\n' + 627 ' </div>\n' + 628 ' </div>\n' + 629 ' </div>\n' + 630 ' </div>\n' + 631 ' </div>\n' + 632 '</div>\n' + 633 '<div class="bvi">\n' + 634 ' <a href="#" id="bvi-panel-show" class="bvi-btn bvi-btn-danger shadow-sm bvi-eye-link" style="display: none"><i class="bvi-icon bvi-eye bvi-2x"></i></a>\n' + 635 '</div>'); 636 637 var scroll = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop; 638 639 if (scroll > 99) { 640 if (Cookies.get("bvi-fixed") == 'true') { 641 $(".bvi-panel").addClass("bvi-fixed-top"); 642 } 643 } 644 $(window).scroll(function () { 645 if ($(this).scrollTop() >= 99) { 646 if (Cookies.get("bvi-fixed") == 'true') { 647 $(".bvi-panel").addClass('bvi-fixed-top'); 648 } 649 } else { 650 $(".bvi-panel").removeClass("bvi-fixed-top"); 651 } 652 }); 653 654 get(); 655 get_image(); 656 } 657 658 if (default_setting.bvi_theme == 'white' || 659 default_setting.bvi_theme == 'black' || 660 default_setting.bvi_theme == 'blue' || 661 default_setting.bvi_theme == 'brown' || 662 default_setting.bvi_theme == 'green') { 663 check_bvi_theme = true; 664 } else { 665 check_bvi_theme = false; 666 checkError = ['bvi_theme']; 667 } 668 669 if (default_setting.bvi_font == 'times' || default_setting.bvi_font == 'arial'){ 670 check_bvi_font = true; 671 } else { 672 check_bvi_font = false; 673 checkError = ['bvi_font']; 674 } 675 676 if (default_setting.bvi_letter_spacing == 'normal' || default_setting.bvi_letter_spacing == 'average' || default_setting.bvi_letter_spacing == 'big'){ 677 check_bvi_letter_spacing = true; 678 } else { 679 check_bvi_letter_spacing = false; 680 checkError = ['bvi_letter_spacing']; 681 } 682 683 if (default_setting.bvi_line_height == 'normal' || default_setting.bvi_line_height == 'average' || default_setting.bvi_line_height == 'big'){ 684 check_bvi_line_height = true; 685 } else { 686 check_bvi_line_height = false; 687 checkError = ['bvi_line_height']; 688 } 689 690 if (default_setting.bvi_font_size == 0) { 691 check_bvi_font_size = false; 692 checkError = ['bvi_font_size']; 693 } else if(default_setting.bvi_font_size <= 40){ 694 check_bvi_font_size = true; 695 } else { 696 check_bvi_font_size = false; 697 checkError = ['bvi_font_size']; 698 } 699 700 if(default_setting.bvi_images === false || default_setting.bvi_images === true || default_setting.bvi_images === 'grayscale') { 701 check_bvi_images = true; 702 } else { 703 check_bvi_images = false; 704 checkError = ['bvi_images']; 705 } 706 707 if(default_setting.bvi_fixed === false || default_setting.bvi_fixed === true ) { 708 check_bvi_fixed = true; 709 } else { 710 check_bvi_fixed = false; 711 checkError = ['bvi_fixed']; 712 } 713 714 if(default_setting.bvi_voice === false || default_setting.bvi_voice === true ) { 715 check_bvi_voice = true; 716 } else { 717 check_bvi_voice = false; 718 checkError = ['bvi_voice']; 719 } 720 721 if(default_setting.bvi_flash_iframe === false || default_setting.bvi_flash_iframe === true ) { 722 check_bvi_flash_iframe = true; 723 } else { 724 check_bvi_flash_iframe = false;
725 checkError = ['bvi_flash_iframe']; 726 } 727 728 if(default_setting.bvi_hide === false || default_setting.bvi_hide === true ) { 729 check_bvi_hide = true; 730 } else { 731 check_bvi_hide = false; 732 checkError = ['bvi_hide']; 733 } 734 735 if(check_bvi_theme === true && 736 check_bvi_font === true && 737 check_bvi_letter_spacing === true && 738 check_bvi_line_height === true && 739 check_bvi_font_size === true && 740 check_bvi_images === true && 741 check_bvi_fixed === true && 742 check_bvi_flash_iframe === true && 743 check_bvi_voice === true && 744 check_bvi_hide === true){ 745 if ($(selector).length) { 746 $(selector).click(function () { 747 Cookies.set('bvi-panel-active', true, {path: "/", expires: 1}); 748 active(); 749 bvi_panel_voice('ÐеÑÑÐ¸Ñ ÑайÑа Ð´Ð»Ñ ÑлабовидÑÑÐ¸Ñ '); 750 return false; 751 }); 752 } else { 753 console.log('ÐепÑавилÑнÑй паÑамеÑÑ: bvi_target'); 754 } 755 active(); 756 } else { 757 console.log('ERROR BVI v1.0.7 - ÐепÑавилÑнÑй паÑамеÑÑ: ' + checkError); 758 } 759 }; 760})(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.