Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
 gsInteriotInsertBefore = 'pt-mycontris'; // leave blank to append after "logout"
 gsInteriotLink = 'pt-Interiot';
 gsMyArticles = 'pt-myarticles';

 function InteriotLink()
 {
   var user = document.getElementById( 'pt-userpage').firstChild.firstChild.data;
 
   var li = document.createElement( 'li' );
   li.id = gsInteriotLink;
 
   var a = document.createElement( 'a' );
   a.appendChild( document.createTextNode( 'Interiot' ) ); // eh, the css makes the text lowercase
//   a.href = 'http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?user=kmorozov&dbname=enwiki_p';
//   a.href = 'http://en.wikipedia.org/wiki/User:Interiot/Tool2/code.js?username=kmorozov';
    a.href = 'http://tools.wikimedia.de/~interiot/cgi-bin/Tool1/wannabe_kate?username=kmorozov&site=en.wikipedia.org';
   li.appendChild( a );
 
   if ( ! gsInteriotInsertBefore ) // append to end (right) of list
   {
      document.getElementById( 'pt-logout' ).parentNode.appendChild( li );
   }
   else
   {
       var before = document.getElementById( gsInteriotInsertBefore );
       before.appendChild( li, before );
   }
 }

 function MyArticlesLink()
 {
   var user = document.getElementById( 'pt-userpage').firstChild.firstChild.data;
 
   var li = document.createElement( 'li' );
   li.id = gsMyArticles;
 
   var a = document.createElement( 'a' );
   a.appendChild( document.createTextNode( 'my articles' ) ); // eh, the css makes the text lowercase
   a.href = 'http://en.wikipedia.org/wiki/User:Kmorozov/articles';
 
   li.appendChild( a );
 
   if ( ! gsInteriotLink) // append to end (right) of list
   {
      document.getElementById( 'pt-logout' ).parentNode.appendChild( li );
   }
   else
   {
       var before = document.getElementById( gsInteriotLink);
       before.appendChild( li, before );
   }
 }

 function addLinks()
 {
  if (window.navigator.userAgent.indexOf ("Gecko") > 0)
  {
   InteriotLink();
   MyArticlesLink();
  }
 }

 if ( window.addEventListener ) 
  {window.addEventListener( 'load', addLinks, false );
  } 
 else if ( window.attachEvent ) 
  {
   window.attachEvent( 'onload', addLinks );
  }

   mw.loader.load(
             'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
             + '&action=raw&ctype=text/javascript&dontcountme=s');

 mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Interiot/Tool2/code.js&action=raw&ctype=text/javascript');

popupFixRedirs=true;
//popupRedirAutoClick=wpPreview;
popupFixDabs=true;