Difference between revisions of "User:MindlessXD/monobook.js"

From Lyriki
Jump to navigation Jump to search
m
 
Line 22: Line 22:
 
      
 
      
 
     songclean.appendChild(document.createElement("a"));
 
     songclean.appendChild(document.createElement("a"));
     songclean.firstChild.setAttribute("href", "http://it.travisbsd.org/foo/lyriki/bot/mindlessbot_song-clean.php?title=" + article);
+
     songclean.firstChild.setAttribute("href", "http://www.camanis.net/lyriki/mindlessbot_song-clean.php?title=" + article);
 
     songclean.firstChild.appendChild(document.createTextNode("song clean"));
 
     songclean.firstChild.appendChild(document.createTextNode("song clean"));
 
      
 
      
Line 30: Line 30:
 
      
 
      
 
     songlink.appendChild(document.createElement("a"));
 
     songlink.appendChild(document.createElement("a"));
     songlink.firstChild.setAttribute("href", "http://it.travisbsd.org/foo/lyriki/bot/mindlessbot_songlink.php?title=" + article);
+
     songlink.firstChild.setAttribute("href", "http://www.camanis.net/lyriki/mindlessbot_songlink.php?title=" + article);
 
     songlink.firstChild.appendChild(document.createTextNode("{{song link}}"));
 
     songlink.firstChild.appendChild(document.createTextNode("{{song link}}"));
 
      
 
      
Line 38: Line 38:
 
      
 
      
 
     albumlink.appendChild(document.createElement("a"));
 
     albumlink.appendChild(document.createElement("a"));
     albumlink.firstChild.setAttribute("href", "http://it.travisbsd.org/foo/lyriki/bot/mindlessbot_albumlink.php?title=" + article);
+
     albumlink.firstChild.setAttribute("href", "http://www.camanis.net/lyriki/mindlessbot_albumlink.php?title=" + article);
 
     albumlink.firstChild.appendChild(document.createTextNode("{{album link}}"));
 
     albumlink.firstChild.appendChild(document.createTextNode("{{album link}}"));
 
      
 
      

Latest revision as of 17:18, 27 January 2011

  /*<nowiki>*/
  
  function addBotBox() {
    var article = document.getElementById("ca-history").firstChild.href.match( /title=(.*?)&/ )[1];
    
    var sidebar = document.getElementById("column-one");
    
    var botbox = document.createElement("div");
    botbox.setAttribute("id", "p-bb")
    botbox.setAttribute("class", "portlet");
    botbox.appendChild(document.createElement("h5"));
    botbox.firstChild.appendChild(document.createTextNode("MindlessBot"));
    
    var div = botbox.appendChild(document.createElement("div"));
    div.setAttribute("class", "pBody");
    
    ul = div.appendChild(document.createElement("ul"));
    
  /* song-clean */
    var songclean = ul.appendChild(document.createElement("li"));
    songclean.setAttribute("id", "t-song-clean");
    
    songclean.appendChild(document.createElement("a"));
    songclean.firstChild.setAttribute("href", "http://www.camanis.net/lyriki/mindlessbot_song-clean.php?title=" + article);
    songclean.firstChild.appendChild(document.createTextNode("song clean"));
    
  /* {{songlink}} */
    var songlink = ul.appendChild(document.createElement("li"));
    songlink.setAttribute("id", "t-songlink");
    
    songlink.appendChild(document.createElement("a"));
    songlink.firstChild.setAttribute("href", "http://www.camanis.net/lyriki/mindlessbot_songlink.php?title=" + article);
    songlink.firstChild.appendChild(document.createTextNode("{{song link}}"));
    
  /* {{songlink}} */
    var albumlink = ul.appendChild(document.createElement("li"));
    albumlink.setAttribute("id", "t-albumlink");
    
    albumlink.appendChild(document.createElement("a"));
    albumlink.firstChild.setAttribute("href", "http://www.camanis.net/lyriki/mindlessbot_albumlink.php?title=" + article);
    albumlink.firstChild.appendChild(document.createTextNode("{{album link}}"));
    
    
    sidebar.appendChild(botbox);
  }
  
  window.addEventListener( "load" , addBotBox , false );
  
  /*</nowiki>*/