Apollo & Redacted Required Fields

Make fields on upload page required so that the submit button does not work until filled in

  1. // ==UserScript==
  2. // @name Apollo & Redacted Required Fields
  3. // @namespace https://greatest.deepsurf.us/en/users/90188
  4. // @version 3
  5. // @description Make fields on upload page required so that the submit button does not work until filled in
  6. // @author thegeek (but really SIGTERM86 on PTH)
  7. // @include https://*apollo.rip/upload.php
  8. // @include https://*passtheheadphones.me/upload.php
  9. // @include https://*redacted.ch/upload.php
  10. // ==/UserScript==
  11.  
  12. var requiredIds = ["file", "artist", "title", "year", "releasetype", "format", "bitrate", "media", "tags"];
  13.  
  14. (function() {
  15. 'use strict';
  16. for (var i=0; i<requiredIds.length; i++) {
  17. document.getElementById(requiredIds[i]).required = true;
  18. }
  19. })();