Greasy Fork

Show Pitchfork Ratings for Albums

This is now a fairly heavily modified version of http://userscripts.org/scripts/show/49052 updated so it gets albums and retries when an album rating is not available

目前为 2017-11-21 提交的版本。查看 最新版本

作者
cambist
评分
0 0 0
版本
1.10.5
创建于
2016-03-21
更新于
2017-11-21
大小
3.1 KB
许可证
暂无
适用于

This is just a modified version of http://userscripts.org/scripts/show/49052 updated so it only gets albums. They stopped reviewing individual tracks so it was pointless to get the review for those tracks. You would also get "NaN.0" next to every individual track. Then Pitchfork updated their layout several times causing that script to break.

If the original author updates his/her script and wants me to take my modification down please just let me know. This was written for my own benefit.

Changes:

  • I added an "orange" state for mediocre reviews. Now "green" is a review of 7 or higher, "orange" is 5-6.9 and red is below 5.
  • Now if a page is unavailable from Pitchfork due to a server issue (500 errors were happening fairly regularly) the script tries again a few times on the failed pages. There is a counter to prevent it from attempting more than a few times to prevent infinite loops. I don't want to DOS attack Pitchfork.
  • I've updated this script for the recent layout changes to Pitchfork.
  • With version 1.06 I revised this to take into account their pages are now AJAX with state and history and I detect changes to the location object to see if you are on a review page now. This should keep the user from having to refresh the page to see review scores.
  • Rewritten in jQuery to make it easier for me to maintain. No more messy and complicated regex to find the score in the response text. Much easier to create and append the rating to the correct place.
  • Realized there were problems with the script in Tampermonkey. I think this has been fixed.