function patch() {

      var nav_interval,
          picker_interval;

      // === run the navigator module opening mod ===
      if (config.navigator_context.active) {
        navigatorMenuPatch();

        if (config.navigator_context.hide_pencil) {
          navigatorPencilPatch();
        }
      }

      // === enhance the picker width ===
      if (config.picker_width.active) {

        // as we are dynamically resizing the header pickers we can remove the
        // medium width restriction introduced in later versions of UI16
        $('.navpage-pickers').removeClass('hidden-md');

        // set the picker width once the page has loaded
        setTimeout(function () {
          pickerWidthPatch();

          // use an interval to double check the picker width every second
          // for the same load time specified by the user (double chance)
          picker_interval = setInterval(function () {
            pickerWidthPatch();
          }, 1000);
          setTimeout(function () {
            clearInterval(picker_interval);
          }, config.picker_width.load_timeout);

        }, config.picker_width.load_timeout);

        // resizing the window will resize the pickers
        angular.element(window).on('resize', function () {
          pickerWidthPatch();
        });

        $('input#sysparm_search').focus(function () {
          //$j('.navpage-header-content .user-name').hide();
          pickerWidthPatch(config.picker_width.max_search_width);
        });
        $('input#sysparm_search').blur(function () {
          setTimeout(function () {
            //$j('.navpage-header-content .user-name').show();
            pickerWidthPatch();
          }, 500); // the length of time it takes for blur to occur
        });
      }

      // === make the picker icons clickable ===
      if (config.picker_icon.active) {
        pickerIconPatch();
      }

      // === augment the user menu ===
      if (config.profile_menu.active) {
        profileMenuPatch();
      }
    }
/**
     * The main patch function that executes everything.
     *
     * @return {undefined}
     */
The main patch function that executes everything.
@return {undefined}
The main patch function that executes everything . @return { undefined }
function patch() {
      var nav_interval,
          picker_interval;
      if (config.navigator_context.active) {
        navigatorMenuPatch();
        if (config.navigator_context.hide_pencil) {
          navigatorPencilPatch();
        }
      }
      if (config.picker_width.active) {
        $('.navpage-pickers').removeClass('hidden-md');
        setTimeout(function () {
          pickerWidthPatch();
          picker_interval = setInterval(function () {
            pickerWidthPatch();
          }, 1000);
          setTimeout(function () {
            clearInterval(picker_interval);
          }, config.picker_width.load_timeout);
        }, config.picker_width.load_timeout);
        angular.element(window).on('resize', function () {
          pickerWidthPatch();
        });
        $('input#sysparm_search').focus(function () {
          pickerWidthPatch(config.picker_width.max_search_width);
        });
        $('input#sysparm_search').blur(function () {
          setTimeout(function () {
            pickerWidthPatch();
          }, 500); 
        });
      }
      if (config.picker_icon.active) {
        pickerIconPatch();
      }
      if (config.profile_menu.active) {
        profileMenuPatch();
      }
    }
function patch ( ) { var nav_interval , picker_interval ; if ( config . navigator_context . active ) { navigatorMenuPatch ( ) ; if ( config . navigator_context . hide_pencil ) { navigatorPencilPatch ( ) ; } } if ( config . picker_width . active ) { $ ( '.navpage-pickers' ) . removeClass ( 'hidden-md' ) ; setTimeout ( function ( ) { pickerWidthPatch ( ) ; picker_interval = setInterval ( function ( ) { pickerWidthPatch ( ) ; } , 1000 ) ; setTimeout ( function ( ) { clearInterval ( picker_interval ) ; } , config . picker_width . load_timeout ) ; } , config . picker_width . load_timeout ) ; angular . element ( window ) . on ( 'resize' , function ( ) { pickerWidthPatch ( ) ; } ) ; $ ( 'input#sysparm_search' ) . focus ( function ( ) { pickerWidthPatch ( config . picker_width . max_search_width ) ; } ) ; $ ( 'input#sysparm_search' ) . blur ( function ( ) { setTimeout ( function ( ) { pickerWidthPatch ( ) ; } , 500 ) ; } ) ; } if ( config . picker_icon . active ) { pickerIconPatch ( ) ; } if ( config . profile_menu . active ) { profileMenuPatch ( ) ; } }
The main patch function that executes everything.
The main patch function that executes everything .
// === run the navigator module opening mod === // === enhance the picker width === // as we are dynamically resizing the header pickers we can remove the // medium width restriction introduced in later versions of UI16 // set the picker width once the page has loaded // use an interval to double check the picker width every second // for the same load time specified by the user (double chance) // resizing the window will resize the pickers //$j('.navpage-header-content .user-name').hide(); //$j('.navpage-header-content .user-name').show(); // the length of time it takes for blur to occur // === make the picker icons clickable === // === augment the user menu ===