6,107 Pages

(Created page with "Hi their I was wondering if you could change the title from the energy regeneration cell? From "Energy" to "Energy regeneration" see Lee Sin: <source lang="HTML5"><a href...")
 
 
Line 7: Line 7:
 
<source lang="HTML5"><a href="/wiki/Energy" title="Energy regeneration">Energy regen.</a></source>
 
<source lang="HTML5"><a href="/wiki/Energy" title="Energy regeneration">Energy regen.</a></source>
   
-----
+
----
 
I'm currently working on an tool named [[User blog:Jens Ingels/LoLBox_Tool - Get more out your infobox|LoLBox]]. To expand the options of the infobox. Offcourse I bounced against an fell problems like tagging I decide to script an fell classes too it so the script could work faster ones it's loaded. I used the title to detect the location and it works perfectly with exeption of the energy regen cell where the title is the same as the cell above:
 
I'm currently working on an tool named [[User blog:Jens Ingels/LoLBox_Tool - Get more out your infobox|LoLBox]]. To expand the options of the infobox. Offcourse I bounced against an fell problems like tagging I decide to script an fell classes too it so the script could work faster ones it's loaded. I used the title to detect the location and it works perfectly with exeption of the energy regen cell where the title is the same as the cell above:
   
<source lang="HTML5"><a href="/wiki/Energy" title="Energy regeneration">Energy</a></source>
+
<source lang="HTML5"><a href="/wiki/Energy" title="Energy">Energy</a></source>
   
 
----
 
----

Latest revision as of 16:08, April 15, 2014

Hi their I was wondering if you could change the title from the energy regeneration cell? From "Energy" to "Energy regeneration" see Lee Sin:

<a href="/wiki/Energy" title="Energy">Energy regen.</a>

to

<a href="/wiki/Energy" title="Energy regeneration">Energy regen.</a>

I'm currently working on an tool named LoLBox. To expand the options of the infobox. Offcourse I bounced against an fell problems like tagging I decide to script an fell classes too it so the script could work faster ones it's loaded. I used the title to detect the location and it works perfectly with exeption of the energy regen cell where the title is the same as the cell above:

<a href="/wiki/Energy" title="Energy">Energy</a>

Now I was wondering if you couldn't include those markings in the infobox? Than I don't have to code markings with scripting. I'm currently using this code for the markings:

      //Prepare Arrays
      var name = ["Health","Health regeneration","Mana","Mana regeneration", "Range","Attack damage","Attack speed","Armor","Magic resistance","Movement speed"];
 
      //Def Classes
      $.each(name, function( index, val ) {
 
         loc = $( "#champion_info-lower td span a[title='"+ val + "']").parent().parent().next();
         valueCode = val.toLowerCase().replace(/ /g,"_");
         value = loc.html();
         $( loc ).addClass( "data-" + valueCode );
         defCode = value.replace(/\(.*?\)/, '<span class="increase">$&</span>');
         $(".data-" + valueCode).html(defCode);
 
      });

What give an result like this:

<td class="data-health">
   428
   <span class="increase">
      (+85)
   </span>
</td>

or this:

<td class="data-attack_damage">
   46.5
   <span class="increase">
      (+3)
   </span>
</td>
Community content is available under CC-BY-SA unless otherwise noted.