Goodreads Giveaways checkbox (un)checker

Checks the "I have read and agree to terms and conditions..." box and unchecks the "Also add this book to my to-read shelf" box.

当前为 2016-01-21 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Goodreads Giveaways checkbox (un)checker
  3. // @namespace Joseph
  4. // @description Checks the "I have read and agree to terms and conditions..." box and unchecks the "Also add this book to my to-read shelf" box.
  5. // @include https://www.goodreads.com/giveaway/enter/*
  6. // @include http://www.goodreads.com/giveaway/enter/*
  7. // @version 1
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. var inputs = document.getElementsByTagName("input");
  12. for (var i = 0; i < inputs.length; i++) {
  13. if (inputs[i].id === "terms") {
  14. inputs[i].checked = true;
  15. }
  16. if (inputs[i].id === "want_to_read") {
  17. inputs[i].checked = false;
  18. }
  19. }