Gist 3a03bac4ed27ab3c1ca3d87cc21fcd9d
✓ Published0🌍 Public
Aandybak
Last edited Jul 16, 2024
Created on Jul 16, 2024
This userscript adds a fixed "EDIT" link to the top-right corner of GitBook documentation pages for two specific sites: OpenBlocks and OpenBrush. The script determines which documentation site is currently open by checking the URL, then constructs the corresponding GitBook editing URL by replacing the documentation domain prefix with the appropriate GitBook organization and space path. It uses the Tampermonkey API and plain DOM manipulation to create the anchor element, set its styles, and update the link dynamically on mouse movement.
AI-generated description