MCPcopy Create free account
hub / github.com/ChinaGodMan/UserScripts / getCloneCmd

Function getCloneCmd

github-clone-button/github-clone-button.user.js:373–377  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

371 'use strict'
372
373 function getCloneCmd() {
374 const match = location.pathname.match(/^\/([^/]+)\/([^/]+)(\/|$)/)
375 if (!match) return null
376 return `git clone --recurse-submodules https://github.com/${match[1]}/${match[2]}.git`
377 }
378
379 function copyCloneCmd(cmd) {
380 if (!cmd) return

Callers 1

addCopyButtonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected