2A News

Report: DOJ Prepares to Fight Anti-2A State Laws

Reading Time: 3:32 min

It’s a good day for gun owners when the Department of Justice (DOJ) is on the Second Amendment’s side, and a new report offered encouraging news about the battle to…

View post

Canada’s ‘Buyback’ Ends With a Whimper, Now Comes Confiscation

Reading Time: 1:52 min

The March 31 deadline imposed by Canadian anti-gunners for gun owners to tell the government about what firearms they own in preparation for confiscation sailed by last week. And the…

View post

SCOTUS Rejects Challenge to Illinois’ Public Transit Carry Ban

Reading Time: 1:54 min

In a setback for opponents of arbitrary carry restrictions, the U.S. Supreme Court on Monday turned away Schoenthal v. Raoul. This left a lower court ruling in place that upheld…

View post

Beshear Vetoes 2 Bills That Would Enhance Kentuckians’’ 2A Rights

Reading Time: 1:52 min

The Kentucky Legislature did its part when it sent two strong pro-Second Amendment bills to Gov. Andy Beshear’s (D) desk for his signature. That’s where the laudable effort hit a…

View post

Washington State Concealed Carry Licenses Plummet

Reading Time: 1:56 min

Citizens periodically vote in a broad array of elections, and these results are widely reported for all to see. But there’s another form of voting, a much more powerful statement,…

View post

FPC’s ‘Freedom Index’ Rates Only 2 States as ‘Perfect’ on 2A Rights

Reading Time: 1:51 min

The Firearms Policy Coalition (FPC) presented a fascinating report card to the nation last week. The Second Amendment organization’s inaugural Freedom Index ranked the 50 states on how much their…

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>