Greasy Fork is available in English.
Enhance GitHub with additional features.
Fra og med
If you encounter issues reading Greasy Fork's README, please visit the README on GitHub for a better experience.
MutationObserver
or setInterval
, purely event-driven, making it more efficient than scripts of similar functionalitygithub_pat_
(used for increasing rate limit). For more information, see the Personal Access Token (PAT) section.Example "Assets" section of a release on GitHub, with Release Downloads
, Release Uploader
and Release Histogram
enabled:
Public Repositories (read-only)
under Repository access
tab, which is the default setup. An example image is shown below for reference.Example setup for personal access token:
For more detailed information, please refer to the source code. It is (hopefully) well-commented and contains other explanations and insights that may not be covered here.
Release *
FeaturesDOMContentLoaded
and turbo:load
events to know when DOM is ready or there has been a content change. In both cases, we need to re-check the page (setupListeners
).include-fragment
elements. By using devtools, we learn that they will be dynamically replaced with the actual content, so it's vital to investigate them.include-fragment
with documentation. We can learn from the documentation that a include-fragment
element will dispatch a include-fragment-replace
event, just after the content has been fetched and parsed, and before it's inserted into the DOM. Better still, it comes with a handy detail.fragment
property of type DocumentFragment
, which is the parsed content.include-fragment
element, we listen for the include-fragment-replace
event and then process the detail.fragment
to add our additional information (onFragmentReplace
).DocumentFragment
.Tracking Prevention
FeatureBy investigating source code (thanks for the source mapping) and setting breakpoints, we can find out that GitHub initializes tracking endpoints from certain <meta>
tags. By removing these tags, we can prevent some tracking. More details can be found in the source code.