Guest User

Untitled

a guest
May 26th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. (function (win, doc) {
  2. var GIT = function (url) {
  3. return new _GIT(url);
  4. };
  5.  
  6. var _GIT = function (url) {
  7. this.url = url;
  8. };
  9.  
  10. _GIT.prototype.getStatement = function (what) {
  11. switch (what) {
  12. case 'clone':
  13. return this.url.replace(/git:\/\/github\.com\/([^\/]+)\/(.+)\.git/i, 'git clone git://github.com/$1/$2.git $1_$2');
  14. default:
  15. return '';
  16. }
  17. };
  18.  
  19. GIT.prototype = _GIT.prototype;
  20.  
  21. win.git = GIT;
  22. }(window, document));
Add Comment
Please, Sign In to add comment