import React from 'dom-chef'; import select from 'select-dom'; import features from '../libs/features'; import {getRepoURL} from '../libs/utils'; function init() { const currentBranch = select('#partial-pull-merging .merge-branch-description .commit-ref'); if (!currentBranch) { return false; } const [forkPath] = currentBranch.title.split(':'); if (forkPath === getRepoURL()) { return false; } currentBranch.parentElement.append( Delete fork ); } features.add({ id: 'delete-fork-link', include: [ features.isPRConversation ], load: features.onNewComments, init });