Skip to content
GhostPointerXPublic
forked from zaidsamii/WebCut

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Β 
Β 

Latest commit

Β 

History

29 Commits

Folders and files

Repository files navigation

WebCut logo

WebCut

Capture a page. Keep a clean snapshot.

A Chrome extension that saves a webpage, or any selected component, as a clean, downloadable HTML snapshot.


Chrome Extension Manifest V3 Version License: MIT


🎬 Demo Β β€’Β  ✨ Features Β β€’Β  πŸš€ Get started Β β€’Β  πŸ“– How to use Β β€’Β  πŸ”’ Privacy Β β€’Β  🧰 Development


πŸ’‘ What is WebCut?

WebCut captures the rendered appearance of a webpage, or of a component you select, and saves it as an HTML file.

Capture a full page, pick a specific section, preview the result, and download it. Saved captures stay in Chrome's local storage. WebCut has no backend and never uploads your captures.

Important

WebCut saves a rendered snapshot. It does not export a website's original source code or preserve the page's interactive behavior.


🎬 Demo

Watch the WebCut demo

▢️ Click the thumbnail to watch the full demo on YouTube


πŸ“Ί Setup video

New to loading unpacked extensions? Watch the step-by-step setup walkthrough.

Watch the WebCut setup guide

▢️ Click the thumbnail to watch the setup guide on YouTube

πŸŽ₯ Watch Demo πŸ› οΈ Watch Setup Guide

✨ Features

πŸ“Έ Capture πŸ—‚οΈ Manage πŸ›‘οΈ Local by design
β€’ Capture a full page with overlapping scroll steps

β€’ Select a component by hovering and navigating the page

β€’ Collect accessible CSS and supported media
β€’ Search captures by title or URL

β€’ Organize captures into folders

β€’ Preview, download, or delete captures
β€’ Store captures in Chrome local storage

β€’ No account, backend, or upload flow

β€’ Previews shown in a sandboxed frame

Also included

  • πŸ–ΌοΈ Inline supported images, canvas content, fonts, and CSS resources within configured limits
  • 🧹 Scripts and inline event handlers are removed from saved HTML
  • πŸ“· Optional screenshot saved with each capture
  • πŸ“‘ Open saved items in Chrome's side panel or in-page drawer
  • πŸ•’ Recent captures grouped by Today, Yesterday, and Earlier

πŸš€ Get started

WebCut runs in Chrome as an unpacked extension. No build step is required.

Step Action
1 Clone or download this repository
2 In Chrome, open chrome://extensions
3 Turn on Developer mode
4 Click Load unpacked
5 Select the webcut/ folder in this repository
6 Open a regular webpage and click the WebCut extension icon

Tip

Stuck on any step? Watch the setup video.


πŸ“– How to use

πŸ–₯️ Capture a full page

  1. Open the webpage you want to capture.
  2. Click the WebCut extension icon.
  3. Choose Clone Full Page.
  4. Preview the snapshot, then choose Download HTML to save it.

🎯 Capture a component

  1. Choose Clone Component.
  2. Hover over the page to target an element.
  3. Use ↑ / ↓ (Arrow Up / Arrow Down) to change the selection.
  4. Click the component or press Enter to capture it.
  5. Preview or download the snapshot.

πŸ“š Manage saved captures

Open Saved Items from the popup or toolbar to search, preview, download, delete, and organize captures.

Note

Folders can be created, renamed, and deleted. Deleting a folder keeps the captures inside it.


πŸ”’ Privacy first

  • Captures, screenshots, settings, and folders are stored in chrome.storage.local.
  • WebCut does not upload captures to a server.
  • During capture, WebCut may fetch HTTP or HTTPS resources found on the page to include supported assets. Requests omit credentials and use size and timeout limits.
  • The optional hostUrl setting is stored, but is not connected to a service.

⚠️ What to expect

WebCut creates a static snapshot, not a working copy of the original website. Page scripts, event handlers, and interactive behavior are not preserved.

Some content may be missing or look different when a site uses:

  • protected or cross-origin resources
  • unusual browser APIs
  • cross-origin frames
  • browser-specific rendering

Protected media may remain linked to its original URL, and some stylesheets may not be available to capture.

Warning

Chrome browser pages (chrome://) and Chrome Web Store pages cannot be captured.


🧰 Development

Prerequisites

  • Node.js 24.20.0
  • npm (included with Node.js)
  • Git (to clone the repository)

Note

The repository pins Node.js 24.20.0 in .nvmrc, package.json, and the Dockerfile.

Installation

git clone https://github.com/zaidsamii/WebCut.git
cd WebCut
npm ci

Running the extension

WebCut is a Chrome extension, so it runs by loading the repository's webcut/ directory as an unpacked extension (see Get started). There is no local web server or separate application process to start.

Commands

Command Description
npm test Run the test suite to verify the project works correctly
npm run check Check the JavaScript files for syntax errors

🐳 Rebuild check in Docker

The Dockerfile uses the pinned Node.js runtime, installs from package-lock.json, checks JavaScript syntax during the image build, and runs the test suite when the container starts:

docker build -t webcut .
docker run --rm webcut

Development notes

  • The project has no runtime or development npm dependencies.
  • Tests run directly with Node.js and do not require Google Chrome.
  • Use the Node.js version specified in .nvmrc for the most consistent results.

πŸ” Permissions

WebCut requests the following Chrome extension permissions for capture, storage, and preview.

Permission Purpose
storage Stores captures, screenshots, settings, and folders locally
unlimitedStorage Supports larger collections of locally saved captures
sidePanel Opens and displays saved items in Chrome's side panel
scripting Injects or executes scripts when required to start capture on a tab
activeTab Provides access to the tab selected by the user
<all_urls> Allows the extension to work across webpages and retrieve supported resources during capture

Note

These permissions enable the extension's functionality. Actual data handling depends on the implementation of the capture and storage features.


πŸ“ Project structure

.
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ run-tests.js          # Node.js test runner
β”‚   └── check-syntax.js       # JavaScript syntax checker
└── webcut/
    β”œβ”€β”€ shared/               # Shared capture, selection, and UI logic
    β”œβ”€β”€ test/                 # Node.js tests and manual capture fixtures
    β”œβ”€β”€ background.js         # Messaging, storage, resource fetching, and screenshots
    β”œβ”€β”€ content.js            # Toolbar, selection, capture, and in-page drawer
    β”œβ”€β”€ popup.*               # Extension popup interface
    β”œβ”€β”€ sidepanel.*           # Saved captures and folder management
    └── preview-frame.*       # Sandboxed HTML preview
Directory overview
  • scripts/: utilities for running tests and checking JavaScript syntax.
  • webcut/shared/: reusable logic shared across capture and user-interface components.
  • webcut/test/: tests and fixtures for validating capture functionality.
  • webcut/background.js: background operations, including messaging, storage, resource fetching, and screenshots.
  • webcut/content.js: in-page toolbar, selection tools, capture functionality, and drawer.
  • webcut/popup.*: extension popup files.
  • webcut/sidepanel.*: saved-capture interface and folder management files.
  • webcut/preview-frame.*: sandboxed HTML preview interface.

πŸ“„ License

WebCut is released under the MIT License. You are free to use, modify, and distribute this software in accordance with its terms.


If WebCut helps you, consider giving the repo a ⭐

Made with ❀️ by zaidsamii

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages