Try the extension
- Type pull
- Press Tab
- Type a number
- Press Enter
The suggestions of the extension show here.
Live log 0 lines
Each event that Chrome fires, and each call of the real scripts.
Configure the repos
This is the real options page of the extension. Add, change or move a repo, and select Save. The suggestions in the URL bar then use the new list. The first repo is the default.
chrome.storage.sync
Save writes this value. Open again shows it, and removes each change that you did not save.
How it works
-
1
The keyword
manifest.jsonsets the omnibox keywordpull. After Tab, Chrome sends the text of the bar to the extension. -
2
Each key
onInputChangedreads the repos. The first repo goes in the default row. Each other repo gets a row with the contentnumber|index. -
3
Enter
onInputEnteredreads the number and the repo index. It adds the number to the repo URL, and it callschrome.tabs. -
4
The options
The options page writes the list to
chrome.storage.sync. An empty list gives the default repo ofsrc/types.ts.
Real code in this page
src/background.ts, loaded as it issrc/options.ts, in its own iframesrc/types.ts,options.htmlandmanifest.json
The stand-in
- This page draws the URL bar and the tabs. It sets its own
chromeobject before it loads the scripts. - That object fires the omnibox events, keeps the storage in memory and records the tab calls.
- It has no storage quota and no sync between devices. Chrome also shows fewer rows when the list is long.
Install
The extension is not in the Chrome Web Store. Build it, then load the folder.
git clone https://github.com/mark1russell7/pr-opener.git
cd pr-opener
pnpm install
pnpm build
- Open
chrome://extensionsin Chrome. - Turn on Developer mode.
- Select Load unpacked, then select the
pr-openerfolder.