1(function (window, document, $, store) { 2 3 var FONTSIZE_TRANSITION_CLASS = 'font-transition', 4 FONTSIZE_STORAGE_KEY = 'fontSizeAdjustment', 5 FONTSIZE_STEP_SIZE = 4, 6 FONTSIZE_MIN_SIZE = 18, 7 FONTSIZE_MAX_SIZE = 38, 8 FONTSIZE_MENU_ZOOM = 26 9 ; 10 11 function FontSize() { 12 this.$container = $('#text-size-adjustments'); 13 this.$increasebtn = $('.text-size-button.text-size-increase'); 14 this.$decreasebtn = $('.text-size-button.text-size-decrease'); 15 this.$container.on('click', '.text-size-button', $.proxy(this.handleButtonClick, this)); 16 } 17 18 FontSize.prototype.handleButtonClick = function(e) { 19 var $toggle = $(e.currentTarget); 20 var fontSizeAction = $toggle.attr('data-action'); 21 var currentFontSize = $('body').css('font-size'); 22 currentFontSize = parseInt(currentFontSize,10); 23 24 this.$increasebtn.removeAttr('disabled'); 25 this.$decreasebtn.removeAttr('disabled'); 26 27 if (fontSizeAction == 'decrease' && currentFontSize > FONTSIZE_MIN_SIZE) { 28 currentFontSize -= FONTSIZE_STEP_SIZE; 29 } 30 if (fontSizeAction == 'increase' && currentFontSize < FONTSIZE_MAX_SIZE) { 31 currentFontSize += FONTSIZE_STEP_SIZE; 32 } 33 34 if (currentFontSize <= FONTSIZE_MIN_SIZE) { 35 currentFontSize = FONTSIZE_MIN_SIZE; 36 $('.text-size-decrease').attr('disabled','disabled'); 37 } 38 if (currentFontSize >= FONTSIZE_MAX_SIZE) { 39 currentFontSize = FONTSIZE_MAX_SIZE; 40 $('.text-size-increase').attr('disabled','disabled'); 41 } 42 43 if (currentFontSize >= FONTSIZE_MENU_ZOOM) { 44 $('#wb-bar, .header-logo, .header-topbar-inner, .service-finder-panel').addClass('zoomed-text'); 45 } 46 else { 47 $('.zoomed-text').removeClass('zoomed-text'); 48 } 49 50 this.setBodyFontSize(currentFontSize); 51 store.set(FONTSIZE_STORAGE_KEY, currentFontSize); 52 }; 53 54 FontSize.prototype.setBodyFontSize = function (fontSize) { 55 $('body').css('font-size',fontSize+'px'); 56 setTimeout(function(){ $(window).trigger('resize'); }); 57 }; 58 59 FontSize.prototype.addFontSizeTransition = function () { 60 $(function() { 61 $('body').addClass(FONTSIZE_TRANSITION_CLASS); 62 }); 63 }; 64 65 var fontSize = new FontSize(); 66 fontSize.addFontSizeTransition(); 67 68})(this, this.document, this.jQuery, this.store);
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.