MGS5 age check selection Keeper

Store MGS5 Ground Zero and METAL GEAR SOLID V: THE PHANTOM PAIN country and age selection locally in browser.

  1. // ==UserScript==
  2. // @name MGS5 age check selection Keeper
  3. // @namespace http://www.konami.jp/mgs5/ storeageselection/
  4. // @version 0.1
  5. // @author suPirman
  6. // @description Store MGS5 Ground Zero and METAL GEAR SOLID V: THE PHANTOM PAIN country and age selection locally in browser.
  7. // @include http://www.konami.jp/mgs5/*/certification.php5
  8. // ==/UserScript==
  9.  
  10. if(typeof(Storage) !== "undefined") {
  11. $('.easy-select-box').remove();
  12. $('#sel-country').val(localStorage.val_country).easySelectBox();
  13. $('#sel-month').val(localStorage.val_month).easySelectBox();
  14. $('#sel-day').val(localStorage.val_day).easySelectBox();
  15. $('#sel-year').val(localStorage.val_year).easySelectBox();
  16. $('input[type=image]').click(function(){
  17. localStorage.setItem("val_country", $('#sel-country').val());
  18. localStorage.setItem("val_month", $('#sel-month').val());
  19. localStorage.setItem("val_day", $('#sel-day').val());
  20. localStorage.setItem("val_year", $('#sel-year').val());
  21. });
  22. } else {
  23. // Sorry! No Web Storage support..
  24. }