Right to Carry

Lawmaker Proposes Ban on State Magazine Capacity Restrictions

Reading Time: 1:53 min

The patchwork quilt of state laws governing the legal capacity of a firearm magazine has caught the attention of at least one Washington lawmaker, who proposed a fitting solution. Rep.…

View post

NC Legislators to Attempt to Override Stein’s Veto of Constitutional Carry

Reading Time: 1:54 min

North Carolina lawmakers have a regular rite during which they convene to attempt to override controversial gubernatorial vetoes. On July 29, this year’s edition will feature a rancorous debate over…

View post

New Laws Chill Gun Rights for Colorado Residents

Reading Time: 2:7 min

Colorado’s traditions of being a sportsman’s paradise are being sorely tested as the state enacts yet more laws restricting gun rights. When it took effect this month, House Bill 24-1174…

View post

FPC Asks for Summary Judgment in Interstate Handgun Sales Ban Lawsuit

Reading Time: 1:57 min

Federal laws banning licensed gun dealers from selling their handguns to purchasers in other states have always been controversial. A person does not need to be a constitutional scholar to…

View post

DOJ Announces Proposal to Resume Gun Rights Restoration After Three-Decade Freeze

Reading Time: 3:28 min

The Department of Justice (DOJ) has taken a bold step toward upholding the Second Amendment with its recent announcement to propose the restoration of gun rights for certain individuals previously…

View post

NSSF Joins Forces with ATF and DOJ to Halt Illegal Firearm Purchases

Reading Time: 2:4 min

No one is more dedicated to promoting firearm safety than the gun industry, and the National Shooting Sports Foundation (NSSF) puts this mission into action. The industry trade association partnered…

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>