!(function (window, undefined) {
  'use strict';

  var nameRe = '([\-_\.A-z0-9]+)'
  , githubIssueUrlRe = new RegExp('https?://github.com/' + nameRe + '/'
                                  + nameRe + '/(?:pull|issues)/([0-9]+)')
  , lgtmUrlTmp = 'http://lgtmin-gh-bmlt.herokuapp.com/lgtm?user=$USER&repo=$REPO&number=$NUMBER'
  , match, user, repo, number
  ;

  match = location.href.match(githubIssueUrlRe);

  if(!match || !match[1] || !match[2] || !match[3]) {
    window.alert('Error!: Execute this bookmarklet on github issue page.');
    return;
  }

  user = match[1], repo = match[2], number = match[3];

  window.open(lgtmUrlTmp.replace('$USER', user)
              .replace('$REPO', repo)
              .replace('$NUMBER', number));
})(window);

@@ -227,26 +227,23 @@
 )')%0A  , 
-lgtmUrlTmp
+homeUrl
  = 'http
@@ -273,16 +273,51 @@
 uapp.com
+'%0A  , lgtmUrlTemplate = homeUrl + '
 /lgtm?us
@@ -491,16 +491,113 @@
 h%5B3%5D) %7B%0A
+    if(location.href.indexOf(homeUrl) == 0) %7B%0A      window.alert('Bookmark Me!');%0A    %7D else %7B%0A  
     wind
@@ -660,24 +660,30 @@
 ue page.');%0A
+    %7D%0A
     return;%0A
@@ -765,18 +765,38 @@
 lgtmUrlT
+e
 mp
+late%0A              
 .replace
@@ -890,16 +890,38 @@
  number)
+%0A             ).focus(
 );%0A%7D)(wi

update bookmarklet