Skip to content

Instantly share code, notes, and snippets.

@minj
Created October 24, 2018 17:27
Show Gist options
  • Save minj/cef256af7f74b5f12b9b0be504458a75 to your computer and use it in GitHub Desktop.
Save minj/cef256af7f74b5f12b9b0be504458a75 to your computer and use it in GitHub Desktop.
DOM improvements
--- playerDetails.html 2018-10-24 19:26:01.559561445 +0200
+++ playerDetails.new.html 2018-10-24 19:25:02.952884859 +0200
@@ -42,24 +42,7 @@
</script>
<!-- This div is just here to prevent Foxtrick from crashing the player page. -->
- <div class="foxtrick-hack playerInfo" style="display: none">
- <table>
- <tbody>
- <tr>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- </div>
+
<a href="/MyHattrick/Bookmarks/Default.aspx?actionType=add&amp;BookmarkTypeID=2&amp;ObjectID=255853949"
title="Add to your bookmarks" class="bookmark"><img src="/Img/Icons/transparent.gif" alt="Add to your bookmarks"></a>
@@ -78,62 +61,63 @@
<span class="speedBrowser">
- </span>
+ </span><span class="playerName">
Vasilije Čolić
- <span>(255853949)</span>
+ </span><span class="playerId">(255853949)</span>
</h1>
<div class="byline">
<a href="/World/Leagues/League.aspx?LeagueID=57" class="flag inner"><img src="/Img/Icons/transparent.gif"
style="background: transparent url(/Img/Flags/flags.gif) no-repeat -1140px 0;" alt="Srbija"
- title="Srbija"></a>
+ title="Srbija"></a><span class="playerAge" data-age="47.1">
47 years and 1 day, next birthday: 2019-02-12
- </div>
- <p class="shy" style="font-style: italic">"player statement"</p><br>
-
- Has <a href="/Help/Rules/AppDenominations.aspx?lt=skillshort&amp;ll=7#skillshort" class="skill">solid</a>
- coaching skill and is neither attack nor defense minded. A <a href="/Help/Rules/AppDenominations.aspx?lt=gentleness&amp;ll=1#gentleness"
- class="skill">controversial person</a> who is <a href="/Help/Rules/AppDenominations.aspx?lt=aggressiveness&amp;ll=4#aggressiveness"
+ </span></div>
+ <p class="shy playerStatement" style="font-style: italic">"player statement"</p><br>
+ <div class="playerPersonality">
+
+ Has <a href="/Help/Rules/AppDenominations.aspx?lt=skillshort&amp;ll=7#skillshort" class="skill"
+ data-skill="coach">solid</a> coaching skill and is neither attack nor defense minded. A <a
+ href="/Help/Rules/AppDenominations.aspx?lt=gentleness&amp;ll=1#gentleness" class="skill">controversial
+ person</a> who is <a href="/Help/Rules/AppDenominations.aspx?lt=aggressiveness&amp;ll=4#aggressiveness"
class="skill">fiery</a> and <a href="/Help/Rules/AppDenominations.aspx?lt=honesty&amp;ll=2#honesty"
class="skill">honest</a>. Has <a href="/Help/Rules/AppDenominations.aspx?lt=skill&amp;ll=9#skill"
- title="9/20" class="skill">formidable</a> experience and <a href="/Help/Rules/AppDenominations.aspx?lt=skillshort&amp;ll=3#skillshort"
- title="3/8" class="skill">poor</a> leadership. Has <a href="/Help/Rules/AppDenominations.aspx?lt=skill&amp;ll=20#skill"
- title="20/20" class="skill">divine</a> loyalty.<br>
+ title="9/20" class="skill" data-skill="experience">formidable</a> experience and <a href="/Help/Rules/AppDenominations.aspx?lt=skillshort&amp;ll=3#skillshort"
+ title="3/8" class="skill" data-skill="leadership">poor</a> leadership. Has <a href="/Help/Rules/AppDenominations.aspx?lt=skill&amp;ll=20#skill"
+ title="20/20" class="skill" data-skill="loyalty">divine</a> loyalty.</div>
<div class="ownerAndStatusPlayerInfo">
<table style="width:auto" ;="">
<tbody>
- <tr>
+ <tr data-type="owner">
<td class="right">Owner</td>
<td>
- <i class="icon-mother-club" title=""></i>&nbsp;<a href="/Club/?TeamID=672194" title="Strange quarks">Strange
- quarks</a>
+ <i class="icon-mother-club" title=""></i>&nbsp;<a href="/Club/?TeamID=672194" title="Strange quarks">Strange quarks</a>
<span class="shy">
- <span dir="ltr">(since 2013-03-06)</span>
+ <span dir="ltr" data-date="2014-12-11">(since 2014-12-11)</span>
</span>
</td>
<td></td>
</tr>
- <tr>
+ <tr data-type="injury">
<td class="right">
Injuries
</td>
<td>
<div class="nowrap" style="display:flex;">
- <i class="icon-injury" title="Injured"></i>&nbsp;∞ weeks&nbsp;(Left ankle)
+ <i class="icon-injury" title="Injured" data-value="Infinity" data-type="LeftAnkle"></i>&nbsp;∞ weeks&nbsp;(Left ankle)
</div>
</td>
</tr>
- <tr>
+ <tr data-type="cards">
<td class="right">
Warnings
</td>
<td>
- <i class="icon-yellow-card" title="1 card accumulated"></i>
+ <i class="icon-yellow-card" title="1 card accumulated" data-value="1"></i>
</td>
</tr>
@@ -176,13 +160,13 @@
<tbody>
- <tr>
+ <tr data-type="tsi">
<td class="right"> TSI</td>
<td colspan="3">0</td>
</tr>
- <tr>
+ <tr data-type="wage">
<td class="right">Wage</td>
<td colspan="3" class="nowrap">300&nbsp;<span style=" border-bottom: 1px dashed black;"
title="300&nbsp;€/week including 20% bonus">€/week</span></td>
@@ -353,10 +337,10 @@
<td>
<a href="/Club/Matches/Match.aspx?matchID=628660729&amp;SourceSystem=Hattrick&amp;TeamId=672194&amp;UpdateViewedReport=False">2018-10-20</a>
</td>
- <td>
+ <td data-skill="winger">
Winger
</td>
- <td>
+ <td class="minutes">
91
</td>
</tr>
@@ -366,6 +350,7 @@
</div>
+
<div class="mainBox">
<h2 class="">Match history</h2>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment