如果“剩余能量”值大于 20%,我想制作一个 Greasemonkey 脚本,该脚本每秒自动单击“清空垃圾”链接。
该页面的代码如下。感谢并为我糟糕的英语感到抱歉。
<div class="btn-group">
<a class="btn btn-mini" href="#" data-toggle="dropdown"><i class="icon-wrench"></i> Chores</a>
<a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="/pet/100000113715357/chore/1">Poke your owner (5%)</a></li>
<li><a href="/pet/100000113715357/chore/2">Pinch your owner (10%)</a></li>
<li><a href="/pet/100000113715357/chore/3">Serve strawberries (15%)</a></li>
<li><a href="/pet/100000113715357/chore/4">Empty trash (20%)</a></li>
<li><a href="/pet/100000113715357/chore/5">Iron clothes (40%)</a></li>
<li><a href="/pet/100000113715357/chore/6">Clean the pet store (60%)</a></li>
<li><a href="/pet/100000113715357/chore/7">Spank your owner (80%)</a></li>
<li><a href="/pet/100000113715357/chore/8">Dance with your owner (100%)</a></li>
<li class="divider"></li>
<li><a href="#">Energy left: 15%</a></li>
</ul>
</div>