Gear

INFORCE APL Weapon Light in FDE: Exclusively From 2 VETS ARMS

Reading Time: 0:44 min

Currently, I am running a grey Inforce APL weapon light on my Gen4 Glock 17. Without going into a full review, which is coming shortly, this light is lite, easy…

View post

HK P30 Table Top Review

Reading Time: 0:7 min

View post

SIRT Training Pistol Initial Thoughts

Reading Time: 2:4 min

I’ve been crying about getting a SIRT pistol for a while now.  Thanks to the good people at F3 Tactical I was able to get my hands on one. The top…

View post

I Fondle My Double Action / Single Action Handguns More

Reading Time: 1:22 min

Recently, I bought an HK p30. Even though they hate me and think I suck I love HK. Don’t let HK fool you, kind of like Cassie and Diddy’s relationship,…

View post

New Range/Course Shoes… Nike Zoom Meriwether

Reading Time: 1:38 min

As an Urban Gun Enthusiast I am unapologetically a city boy. I eat way too much fast food, have more gadgets than sense , and my only car is a…

View post

Smith & Wesson Introduces New M&P Pro Series C.O.R.E. Pistols

Reading Time: 1:20 min

Just in time for the “Obama Is Going to Take Our Guns and turn them into license plates” era, Smith and  Wesson introduces the M&P Pro Series C.O.R.E. Pistols. I…

View post
<script>
  /*Source: https://github.com/Krzysztof-Antosik/Two-direction-Sticky-Sidebar*/
  
  // Verificar el ancho de pantalla al cargar y redimensionar
  function checkScreenWidth() {
    if (window.innerWidth <= 767) {
      // Si la pantalla es menor o igual a 676px, no ejecutar el código
      return;
    }

    const stickyElement = document.querySelector('.fb-sidebar__aside');
    const startPosition = stickyElement.getBoundingClientRect().top;

    let endScroll = window.innerHeight - stickyElement.offsetHeight - 500;
    let currPos = window.scrollY;
    let screenHeight = window.innerHeight;
    let stickyElementHeight = stickyElement.offsetHeight;
    let topGap = 40;
    let bottomGap = 40;

    setTimeout(() => {
      if (stickyElement.hasAttribute('data-top-gap')) {
        const dataTopGap = stickyElement.getAttribute('data-top-gap');
        topGap = dataTopGap === 'auto' ? startPosition : parseInt(dataTopGap);
      }

      if (stickyElement.hasAttribute('data-bottom-gap')) {
        bottomGap = parseInt(stickyElement.getAttribute('data-bottom-gap'));
      }
    }, 100);

    stickyElement.style.position = 'sticky';
    stickyElement.style.top = `${topGap}px`;
    stickyElement.style.height = 'fit-content';

    function positionStickySidebar() {
      endScroll = window.innerHeight - stickyElement.offsetHeight - bottomGap;
      const stickyElementTop = parseInt(stickyElement.style.top.replace('px', ''));

      if (stickyElementHeight + topGap + bottomGap > screenHeight) {
        if (window.scrollY < currPos) {
          if (stickyElementTop < topGap) {
            stickyElement.style.top = `${stickyElementTop + currPos - window.scrollY}px`;
          } else if (stickyElementTop >= topGap && stickyElementTop !== topGap) {
            stickyElement.style.top = `${topGap}px`;
          }
        } else {
          if (stickyElementTop > endScroll) {
            stickyElement.style.top = `${stickyElementTop + currPos - window.scrollY}px`;
          } else if (stickyElementTop < endScroll && stickyElementTop !== endScroll) {
            stickyElement.style.top = `${endScroll}px`;
          }
        }
      } else {
        stickyElement.style.top = `${topGap}px`;
      }
      currPos = window.scrollY;
    }

    function stickyElementToMe() {
      stickyElement.style.top = `${topGap}px`;
    }

    function updateSticky() {
      screenHeight = window.innerHeight;
      stickyElementHeight = stickyElement.offsetHeight;
      positionStickySidebar();
    }

    setTimeout(() => {
      window.addEventListener('resize', () => {
        currPos = window.scrollY;
        updateSticky();
      });

      document.addEventListener('scroll', updateSticky, {
        capture: true,
        passive: true
      });
    }, 1000);
  }

  // Verificar el ancho de pantalla al cargar y redimensionar
  window.addEventListener('load', checkScreenWidth);
  window.addEventListener('resize', checkScreenWidth);
</script>