Skip to content

Instantly share code, notes, and snippets.

@StuPig
Created July 10, 2015 02:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StuPig/6edf02d32e7133b9c9e9 to your computer and use it in GitHub Desktop.
Save StuPig/6edf02d32e7133b9c9e9 to your computer and use it in GitHub Desktop.
报销脚本,可以添加到书签里,在pig上的具体报销月份里,点击书签,会在页面高亮出可报销时间,在console里打出报销时间和报销数额
javascript:;(function() { var dates=[];document.querySelectorAll('html /deep/ .com-panel').array().forEach(function(item){var date=item.querySelector('.com-t-day').innerText;if(date.indexOf('/')!=-1)return;item=item.querySelector('.com-f-time');var endTime=item.children[1].innerText;endTime=endTime&&parseInt(endTime.split(":")[0]);if(endTime>=20||(endTime<6&&endTime>0)){dates.push(date);item.style.webkitBoxShadow="0 0 3px 3px red"}});console.log(dates.join(','),"共"+dates.length+"天,"+(dates.length*18)+"元") })()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment