import React from 'dom-chef'; import onetime from 'onetime'; import elementReady from 'element-ready'; import * as pageDetect from 'github-url-detection'; import features from '.'; async function init(): Promise { const exploreLink = await elementReady('.Header-link[href="/explore"]'); if (!exploreLink) { return false; } exploreLink.before( Trending ); } void features.add(__filebasename, { shortcuts: { 'g t': 'Go to Trending' }, exclude: [ pageDetect.isGist ], awaitDomReady: false, init: onetime(init) });