MCPcopy Index your code
hub / github.com/refined-github/refined-github / init

Function init

source/features/previous-next-commit-buttons.tsx:7–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5import features from '../feature-manager.js';
6
7function init(): false | void {
8 const originalPreviousNext = $optional('.commit .float-right.ButtonGroup') // Legacy
9 ?? $optional('[class^="prc-ButtonGroup-ButtonGroup"]:has(a[aria-label$="previous commit" i])');
10 if (!originalPreviousNext) {
11 return false;
12 }
13
14 // Wrap the button in a <div> to avoid #4503
15 $([
16 '#files', // Legacy
17 '[class^="DiffPlaceholder-module__DiffPlaceholderSVG"]',
18 ]).after(
19 <div className="d-flex flex-justify-end mb-3 tmp-mb-3">
20 {originalPreviousNext.cloneNode(true)}
21 </div>,
22 );
23}
24
25void features.add(import.meta.url, {
26 include: [

Callers

nothing calls this directly

Calls 1

cloneNodeMethod · 0.80

Tested by

no test coverage detected