2A News

Mistaken Identity Leads to Fatal Shooting by Gun Shop Employee

Reading Time: 1:56 min

In retrospect, gun shop employees are likely not the best targets for a violent criminal mob—especially when they were not even the people the group intended to confront. A worker…

View post

Florida Man Shoots Home Invasion Suspect Found in Apartment

Reading Time: 1:54 min

Just because a dangerous situation is typical, it doesn’t mean that’s how encounters with criminals will always play out. Sometimes, these critical incidents pop up when least expected, which means…

View post

Spanberger Signs Gun Control Bills, DOJ Promises War

Reading Time: 2:4 min

Virginia Gov. Abigail Spanberger (D) fulfilled her campaign pledge to Second Amendment opponents when she signed a slew of new gun control bills into law. That action, however, is hardly…

View post

Colorado’s Anti-2A Forces Now Targeting Gun Barrels

Reading Time: 2:6 min

Anyone skeptical of “slippery slope” arguments as they relate to the Second Amendment need look no further than Colorado to see how quickly a state can slide into the abyss.…

View post

Virginia State Police Try to Quell Firearm Confiscation Fears

Reading Time: 2:2 min

Alarming rumors continue to swirl online over alleged schemes by new Virginia Gov. Abigail Spanberger’s (D) gun control regime. Many believe the pending ban on so-called “assault weapons” will lead…

View post

RI Lawmaker Endorses ‘Police Power’ to Confiscate AR-15s

Reading Time: 1:55 min

Rhode Island’s anti-gunners last year successfully pushed through a ban on popular sporting rifles, including the ubiquitous AR-15. To make the move more acceptable, lawmakers “grandfathered” citizens who already owned…

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>