Mathworks no select country

Disable country selection nag which comes up every time if cookies are deactivated

  1. // ==UserScript==
  2. // @name Mathworks no select country
  3. // @namespace org.spineeye
  4. // @description Disable country selection nag which comes up every time if cookies are deactivated
  5. // @include https://*.mathworks.com/*
  6. // @include http://*.mathworks.com/*
  7. // @version 1.0.1
  8. // @grant
  9. // @run-at document-start
  10. // ==/UserScript==
  11.  
  12. // this is only possible with no @grant and @run-at document-start
  13. // see https://wiki.greasespot.net/Content_Script_Injection
  14. window.overrideDomainSelector = true;
  15.  
  16. /*
  17. GM_addStyle("#country-unselected { display: none !important; }");
  18.  
  19. var waitForNag = setInterval(function() {
  20. if (document.querySelector("#country-unselected")) {
  21. clearInterval(waitForNag);
  22. console.log(document.querySelector("#country-unselected"));
  23. document.body.className = document.body.className.replace( /(?:^|\s)modal-open(?!\S)/, "");
  24. }
  25. }, 10);
  26. */