Guest User

Untitled

a guest
Oct 16th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. .hideOnNoScript {
  2. display: none !important;
  3. }
  4.  
  5. //Execute after page is ready
  6. function ready(callback){
  7. // in case the document is already rendered
  8. if (document.readyState!='loading') callback();
  9. // modern browsers
  10. else if (document.addEventListener)
  11. document.addEventListener('DOMContentLoaded', callback);
  12. // IE <= 8
  13. else document.attachEvent('onreadystatechange', function(){
  14. if (document.readyState=='complete') callback();
  15. });
  16. }
  17.  
  18. var removeHideOnNoScript = function() {
  19. var elementstohide = window.top.document.querySelectorAll('.removeHideOnNoScript');
  20. for (let i= 0; i< elementstohide.length; i++) {
  21. const element = elementstohide[i];
  22. element.classList.remove('removeHideOnNoScript ');
  23. }
  24. }
  25.  
  26. ready(removeHideOnNoScript);
Add Comment
Please, Sign In to add comment