Last active
May 5, 2025 16:46
-
-
Save semanticentity/796077fd21e3f7ac1dcea953322d4a31 to your computer and use it in GitHub Desktop.
LEWM: Loom, Except Without Money
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(async function(){ | |
if(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia){ | |
alert("Screen recording not supported"); | |
return; | |
} | |
var filename = prompt("Make sure you are in a tab other than the one you are recording.\nEnter filename (no extension):","lewm-recording"); | |
if(!filename) filename = "lewm-recording"; | |
alert("Select a TAB and check 'Share tab audio' in the popup. For audio, do NOT chose full screen or window."); | |
try{ | |
var stream = await navigator.mediaDevices.getDisplayMedia({ | |
video: true, | |
audio: true | |
}); | |
var chunks = []; | |
var recorder = new MediaRecorder(stream, { | |
mimeType: "video/webm;codecs=vp9" | |
}); | |
recorder.ondataavailable = function(e){ | |
if(e.data.size > 0) chunks.push(e.data); | |
}; | |
recorder.onstop = function(){ | |
var blob = new Blob(chunks, {type:"video/webm"}); | |
var url = URL.createObjectURL(blob); | |
var a = document.createElement("a"); | |
a.href = url; | |
a.download = filename + ".webm"; | |
a.click(); | |
document.body.removeChild(stopBtn); | |
}; | |
var stopBtn = document.createElement("button"); | |
stopBtn.textContent = "Stop Recording"; | |
stopBtn.style.position = "fixed"; | |
stopBtn.style.top = "10px"; | |
stopBtn.style.right = "10px"; | |
stopBtn.style.zIndex = 2147483647; | |
stopBtn.style.padding = "10px"; | |
stopBtn.style.background = "#f00"; | |
stopBtn.style.color = "#fff"; | |
stopBtn.style.fontSize = "16px"; | |
stopBtn.style.border = "none"; | |
stopBtn.style.borderRadius = "4px"; | |
stopBtn.style.boxShadow = "0 2px 4px rgba(0,0,0,0.3)"; | |
stopBtn.onclick = function(){ | |
stopBtn.style.top = "-1000px"; | |
stopBtn.style.left = "-1000px"; | |
setTimeout(function(){ | |
recorder.stop(); | |
stream.getTracks().forEach(function(track){ track.stop(); }); | |
}, 100); | |
}; | |
document.body.appendChild(stopBtn); | |
recorder.start(); | |
} catch(err){ | |
alert("Error: " + err); | |
} | |
})(); |
javascript:(async function(){if(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia){alert("Screen recording not supported");return;}var filename=prompt("Make sure you are in a tab other than the one you are recording.\nEnter filename (no extension):","lewm-recording");if(!filename)filename="lewm-recording";alert("Select a TAB and check 'Share tab audio' in the popup. For audio, do NOT chose full screen or window.");try{var stream=await navigator.mediaDevices.getDisplayMedia({video:true,audio:true});var chunks=[];var recorder=new MediaRecorder(stream,{mimeType:"video/webm;codecs=vp9"});recorder.ondataavailable=function(e){if(e.data.size>0)chunks.push(e.data);};recorder.onstop=function(){var blob=new Blob(chunks,{type:"video/webm"});var url=URL.createObjectURL(blob);var a=document.createElement("a");a.href=url;a.download=filename+".webm";a.click();document.body.removeChild(stopBtn);};var stopBtn=document.createElement("button");stopBtn.textContent="Stop Recording";stopBtn.style.position="fixed";stopBtn.style.top="10px";stopBtn.style.right="10px";stopBtn.style.zIndex=2147483647;stopBtn.style.padding="10px";stopBtn.style.background="#f00";stopBtn.style.color="#fff";stopBtn.style.fontSize="16px";stopBtn.style.border="none";stopBtn.style.borderRadius="4px";stopBtn.style.boxShadow="0 2px 4px rgba(0,0,0,0.3)";stopBtn.onclick=function(){stopBtn.style.top="-1000px";stopBtn.style.left="-1000px";setTimeout(function(){recorder.stop();stream.getTracks().forEach(function(track){track.stop();});},100);};document.body.appendChild(stopBtn);recorder.start();}catch(err){alert("Error: "+err);}})();
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Setup
Usage
Open or switch to a different tab from the one you want to record
Click the LEWM bookmark from your bookmarks bar
Enter the output filename when prompted
In the screen picker, select a tab and check Share tab audio
When finished, click Stop Recording in the top-right corner
Your recording will download automatically as a
.webm
fileHow it works
LEWM uses
getDisplayMedia
to request a video/audio stream from a selected tab.MediaRecorder
gathers the data in chunks. When recording stops, it collects the datainto a single
.webm
blob and triggers a download. A temporary button lets you stoprecording and cleans up after.
Replicate Loom Features (Manually)
LEWM doesn't share, host, or transcode your video. For that, use your own tools or cloud storage.
LEWM gives you the core: local video + audio capture. The rest is DIY using free tools.
Share videos via link
.webm
file to Google Drive, Dropbox, or OneDriveSpeed up video playback
Auto-captions + edits
LEWM FAQ
Q: Does this work on mobile?
A: No. But neither does editing video on a phone, so you're fine.
Q: Can it export to MP4?
A: Only if your browser is a time traveler. Convert with
ffmpeg
or let YouTube handle it.Q: Where does the video go?
A: Nowhere. It stays on your machine. LEWM records, saves, and disappears like a polite ghost.