Skip to content

Instantly share code, notes, and snippets.

@pwright
Created November 17, 2025 14:05
Show Gist options
  • Select an option

  • Save pwright/49ae5effda5fb4912370600a27b11ef6 to your computer and use it in GitHub Desktop.

Select an option

Save pwright/49ae5effda5fb4912370600a27b11ef6 to your computer and use it in GitHub Desktop.
javascript:(function(){try{var rawLink=document.querySelector('a[href*="/raw/"]');if(!rawLink){alert('Raw link not found on this page.');return;}var u=new URL(rawLink.href);var parts=u.pathname.split('/').filter(Boolean);if(parts.length<4){window.open(rawLink.href,'_blank');return;}var user=parts[0];var gistId=parts[1];var filename=parts.slice(4).join('/');var latest='https://gist.githubusercontent.com/'+user+'/'+gistId+'/raw/'+filename;console.log('Latest raw URL:',latest);if(navigator.clipboard&&navigator.clipboard.writeText){navigator.clipboard.writeText(latest).then(function(){alert('Copied latest raw URL:\n'+latest);},function(){window.prompt('Latest raw URL (copy manually):',latest);});}else{window.prompt('Latest raw URL (copy manually):',latest);}}catch(e){console.error(e);alert('Failed: '+e);}})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment