5,140 Pages

  • 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>
      Loading editor
    • Sure thing.

      The titles in anchors are automatically set to the name of the href. So I've linked it to "Energy regeneration" which is a redirect. (We don't have a dedicated article for Energy regeneration)

        Loading editor
    • Thx, I'm happy that I don't have to code another exeption for that one.

        Loading editor
    • I came with another idea for the LoLBox tool. Since whe are able to load an part of an page with jQuery I'm planning to code an compair tool into it. An example:

      1. Select an champion you want to compair stats with
      2. The values in the infobox now have an different color (green = highest value, red = lowest, orange = something in between)

      This way it would be possible to check what adc has the highest basedamage including when scaling in level. For example an adc could have the highest AD damage on level 1 but the other adc could have the highest AD damage on level 18.

      I'm currently also trying to load pages like List of champions' armor & collecting the min & max values from it. I'm currently searching if it's worth the loading but I'm just in the testing fase.

      For these reason I think it would be easyer to call the data from the infoboxes if the marking was implemented in the html so I don't have to repeat the same code every time an element is called. Like I explaned before. Currently this code add the html markings.

      //Prepare Arrays
            var name = ["Health","Health regeneration","Mana","Mana regeneration","Range","Attack damage","Attack speed","Armor","Magic resistance","Movement speed", "Energy", "Energy regeneration"];
       
            //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();
               if (value == undefined) {
               }
               else
               {
                  $( loc ).addClass( "data-" + valueCode );
                  defCode = value.replace(/\(.*?\)/, '<span class="increase">$&</span>');
                  $(".data-" + valueCode).html(defCode);
               }
       
            });

      So the changes that I suggest to the infobox are:

      <td>
         428 (+85)
      </td>

      to this:

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

      So:

      • td.data-health
      • td.data-health_regeneration
      • td.data-mana
      • td.data-mana_regeneration
      • td.data-attack_damage
      • td.data-attack_speed
      • td.data-magic_resistance
      • td.data-movement_speed
      • td.data-energy
      • td.data-energy_regeneration
      • and an span marking arround every "(...)" value
        Loading editor
    • an anonymous contributor
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message
Community content is available under CC-BY-SA unless otherwise noted.