Skip to content

Instantly share code, notes, and snippets.

@bitmvr
Last active November 3, 2025 15:57
Show Gist options
  • Select an option

  • Save bitmvr/c5aa443222bc3c79d53fcc20d6d1c474 to your computer and use it in GitHub Desktop.

Select an option

Save bitmvr/c5aa443222bc3c79d53fcc20d6d1c474 to your computer and use it in GitHub Desktop.
Reddit Bookmarklet Privacy Tool: Clear Recent from Local Storage and DOM
javascript: (() => {
const keys = Object.keys(localStorage).filter(k => k.startsWith('recent-'));
keys.forEach(k => localStorage.removeItem(k));
const el = document.querySelector('reddit-recent-pages');
if (el) el.remove();
console.log(`Removed ${keys.length} localStorage item(s) with "recent-"`);
console.log(el ? 'Removed <reddit-recent-pages> from DOM' : 'No <reddit-recent-pages> found');
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment