MCPcopy Index your code
hub / github.com/philc/vimium / copyCurrentUrl

Function copyCurrentUrl

content_scripts/mode_normal.js:166–177  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

164 },
165
166 copyCurrentUrl() {
167 chrome.runtime.sendMessage({ handler: "getCurrentTabUrl" }, function (url) {
168 HUD.copyToClipboard(url);
169 // This length is determined empirically based on a 350px width of the HUD. An alternate
170 // solution is to have the HUD ellipsize based on its width.
171 const maxLength = 40;
172 if (url.length > maxLength) {
173 url = url.slice(0, maxLength - 2) + "...";
174 }
175 HUD.show(`Yanked ${url}`, 2000);
176 });
177 },
178
179 openCopiedUrlInNewTab(count, request) {
180 HUD.pasteFromClipboard((url) =>

Callers

nothing calls this directly

Calls 1

showMethod · 0.45

Tested by

no test coverage detected