# 油猴脚本 **Repository Path**: stoneqweadsa/oil-monkey-script ## Basic Information - **Project Name**: 油猴脚本 - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-10-22 - **Last Updated**: 2026-10-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Userscript: Web Toolkit (All-in-One) One script, four features: **page sticky notes, bilibili video downloader, search result purifier, page unlocker**. Requires the [Tampermonkey](https://www.tampermonkey.net/) extension (or Violentmonkey / Greasemonkey). ## Install - One-click: [Install all-in-one.user.js](https://gitee.com/stoneqweadsa/oil-monkey-script/raw/master/scripts/all-in-one.user.js) - Manual: Tampermonkey dashboard -> Utilities -> paste the content of `scripts/all-in-one.user.js`. > Every feature lives in the same file `scripts/all-in-one.user.js`; a single install is enough. ## Features After installation a round "Tools" button appears at the bottom-right of every page; click it to open the menu. `Alt + N` creates a sticky note directly. ### 1. Page Sticky Notes - Insert notes anywhere; drag the header to move, drag the bottom-right corner to resize. - Buttons: color switch, collapse/expand, delete. Double-click the header to collapse. - Notes auto-save ~0.4s after typing and survive reloads. - Storage scope: current page / current host / all pages (switchable in the menu). ### 2. Bilibili Video Downloader - Works on `bilibili.com/video/*`, `/bangumi/play/*`, `/list/*`; a "Download" button appears at the top-right of the player. - The panel lists every available video/audio track by quality with download and copy-url actions. - DASH streams are separate; merge them with: ```bash ffmpeg -i video.mp4 -i audio.m4a -c copy output.mp4 ``` ### 3. Search Result Purifier (Baidu / Bing) - Removes ads, sponsored results, right-column promotions and recommendation blocks. - Restores real target URLs (Bing `/ck/a?` decoded locally; Baidu `/link?url=` resolved from metadata or a background request). - Badge shows the purge statistics; click it to toggle purification (page reloads). ### 4. Page Unlocker (Select / Copy / Right Click) - Neutralizes handlers that block `copy`, `cut`, `contextmenu`, `selectstart`, `dragstart`, `mousedown`, `keydown`. - Strips `oncopy` / `onselectstart` / `unselectable` attributes and injects `user-select: text` styles. - Menu: toggle, clean restriction attributes, disable transparent overlays, copy the current selection. - Useful on sites such as `https://www.doc88.com/`. ### 5. doc88 Copy Unlocker (standalone) `scripts/doc88-unlock.user.js` is a lightweight script scoped to `doc88.com`: - Hooks `Event.prototype.preventDefault` at `document-start` so the page cannot cancel `copy / cut / contextmenu / selectstart / mousedown / dragstart`. - Claims `copy / cut / contextmenu` in the document capture phase — page listeners (including "blank out the clipboard" tricks) never run — and writes the selection to the clipboard itself. - Freezes `Selection.removeAllRanges / empty` while dragging, so the page cannot drop the selection in `mousemove`. - Overrides `oncopy / onselectstart / unselectable` and injects `user-select: text` plus a visible `::selection` style. - Floating "解" button: toggle, copy selection, copy the whole document text (from text layers), remove overlays; same actions in the script menu. - Limitation: DOM text layers only — image/canvas scanned documents contain no selectable text. ## Menu | Group | Items | | --- | --- | | Notes | New note / Show-hide / Storage scope / Clear current / Clear all | | Bilibili | Open download panel / Refresh play url | | Purifier | Toggle ads / Toggle junk blocks / Toggle link restore / Purge now / Badge | | Unlocker | Enable-disable / Clean attributes / Remove overlays / Copy selection / Badge | ## Repository structure ``` oil-monkey-script/ ├─ scripts/ │ ├─ all-in-one.user.js # all four features in one script │ └─ doc88-unlock.user.js # doc88-only copy unlocker ├─ README.md ├─ README.en.md └─ LICENSE ``` ## Contribution 1. Fork the repository 2. Create a `Feat_xxx` branch 3. Commit your code 4. Create a Pull Request ## Disclaimer For personal and educational use only. Downloaded media remains the property of its original authors. ## License [MIT](LICENSE)