Skip to content

Latest commit

 

History

History
114 lines (89 loc) · 6.21 KB

File metadata and controls

114 lines (89 loc) · 6.21 KB

FEATURES

This document is the canonical inventory of shipped Rollcutter capabilities. It describes the behavior that is intended to work in the current tree.

Playback censoring

  • Applies client-side censor segments on Crunchyroll watch pages.
  • Supports these segment modes: none, blur, skip, solid_color, silence, image, freeze_start, freeze_end, and frame.
  • Resolves active segments from local drafts plus fetched remote rules.
  • Uses fail-soft playback behavior so extension errors do not intentionally stop playback.
  • Keeps playback censoring toggleable from the extension action context menu without disabling the editor.

Rule loading and persistence

  • Derives a per-episode streamId from the Crunchyroll page URL.
  • Fetches remote rules through the MV3 background worker.
  • Caches fetched per-stream rules for five minutes.
  • Stores local drafts and editor state in chrome.storage.local.
  • Supports undo and redo for editor changes.
  • Skips local-only draft IDs during upload.

In-page editor workflow

  • Keyboard-driven overlay editor with SELECTION and EDITING modes.
  • Toggle editor with the physical backquote key, PageUp, or the manifest command.
  • Mirrored shortcuts for major playback and editing actions.
  • Segment creation from the keyboard while the editor is shown or hidden.
  • Focus returns to the player on page load and when the panel hides.
  • When the panel is visible, the editor actively reclaims focus after extension actions, user focus changes, or player focus drift while unhandled keys can still pass through to the player.
  • Inline detail pane with numbered visible fields.
  • Field navigation through ArrowUp / ArrowDown and numeric shortcuts.
  • Inline confirmations for destructive image-data replacement or deletion.
  • Preview of the selected segment with preroll and postroll.
  • Immediate playback refresh when entering or leaving editing mode.

Playback controls and preview behavior

  • Global seek shortcuts for ±1 second, ±60 seconds, ±10 seconds, and ±1 frame.
  • Hidden-panel playback shortcuts remain owned by the extension so focused player controls do not steal them.
  • When the panel is hidden, j / k / l / ; keep seeking playback directly, while the older selected-segment shift behavior remains on the mirrored left-hand shortcuts.
  • Preview can relay to the playback iframe when the top page is not the real player surface.
  • Preview can use the injected player-managed seek path for large backward rewinds outside buffered media.
  • Paused cold previews settle once the player-managed seek lands.
  • Preview transport no longer steals focus from the editor while committing native timeline seeks.
  • Selection-mode preview of skip segments still honors skip behavior, while editing-mode preview remains permissive for the segment being edited.

Editing controls

  • Start and end time editing by seconds and by frames.
  • Held start/end second edits apply immediately on first keydown, then wait for the previous seek target to settle before repeating again.
  • Held start/end frame edits cap repeated movement to about one second of media time per real second of holding instead of following raw browser repeat indefinitely.
  • Frame-mode reference-time editing.
  • Frame-mode reference-time editing still uses held-key acceleration for both second and frame stepping.
  • Mode cycling with forward and reverse direction.
  • Blur radius and blur lead-in/lead-out editing.
  • Solid-color preset cycling.
  • Metadata field editing for category, severity, and confidence.
  • Severity and confidence still accelerate while held.
  • Field popup editing through Space.

Frame-aware behavior

  • Uses displayed-frame metadata from requestVideoFrameCallback when Chromium exposes it.
  • Falls back to a 24fps heuristic when displayed-frame metadata is unavailable, and never steps by less than 1/24s per keypress.
  • Uses displayed-frame-aligned anchors for frame stepping and frame-mode reference times when possible.
  • Keeps frame-mode anchored-segment resolution separate from interval-based segment resolution.

Cross-frame and fullscreen behavior

  • Supports playback control relay between the top page and playback iframe.
  • Mirrors editor state into fullscreen playback frames.
  • Preserves toggle and keyboard behavior when the player lives inside an iframe.
  • Reparents the editor or mirror under the fullscreen host when needed.
  • Requests and relays player time state from the playback frame to the top page.

Popup and options surfaces

  • Popup shows the detected stream ID and the current enabled/disabled state.
  • Popup can toggle censoring for the active tab.
  • Options page stores API base URL and optional API key.
  • Options page requests host permission for the configured API origin before saving.
  • Options page can export or import stored local rules by global, series, or episode scope.
  • Options page supports inline JSON5 bundle editing and clearer per-episode audio/item badges.

Import, export, upload, and download

  • Export current segments to JSON.
  • Import JSON segment files.
  • Import JSON or JSON5 local-rule bundles from the options page.
  • Upload finalized segments to the configured API.
  • Download segments from the configured API and replace or merge.
  • Supports embedded image data and remote image URLs for image mode.

Validation and safety

  • Validates sender origin for background/content messaging.
  • Validates fetched and uploaded segment payload shapes.
  • Checks extension validity before delayed Chrome API usage.
  • Keeps supported-host assumptions aligned across manifest, runtime, and docs.

Stream and lifecycle behavior

  • Handles Crunchyroll URL changes and episode transitions.
  • Clears or refreshes playback/editor state when stream identity changes.
  • Keeps selection sync aligned with segment entry instead of overlap churn.
  • Excludes the actively edited segment from normal playback resolution until editing finishes.

Tooling and verification surfaces

  • TypeScript source compiled to checked-in runtime src/*.js files for Chrome loading.
  • Build output copied to dist/ for load-unpacked verification.
  • Plain Node test suites for segment matching, playback integration, and extension loading.
  • Browser smoke coverage for extension loading.
  • Packaging script for release archives.