Customize Hayden Technologies DNS Block Page

Replace page contents (2018-05-12)

  1. // ==UserScript==
  2. // @name Customize Hayden Technologies DNS Block Page
  3. // @namespace JeffersonScher
  4. // @description Replace page contents (2018-05-12)
  5. // @author Jefferson "jscher2000" Scher
  6. // @copyright Copyright 2018 Jefferson Scher
  7. // @license BSD-3-clause
  8. // @include http*://haydentech.com/private/dns/dns.php?report=*
  9. // @version 0.1
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. var myHTML = '<h1>{ICON}You\'re Welcome!</h1>' +
  14. '<p>{DOMAIN} is terrible, so let\'s not go there.';
  15.  
  16. var myImageCode = '<span style="display: block; height: 180px; width: 180px; font-size: 144px; text-align: center; ' +
  17. 'float: left; background-color: #f4f4f4; padding: 15px; border-radius: 100px; margin-right: 50px">&#x1f648;</span>';
  18.  
  19. var myCSS = '<style>html, body {box-sizing: border-box; height: 100%; width: 100%; margin: 0; background-color: red; color: white; }' +
  20. 'body {font-size: 36px; padding: 20px 30px;}</style>';
  21.  
  22. // No need to customize below this line
  23.  
  24. var domain = location.search.substr(location.search.indexOf('report=')+7);
  25.  
  26. document.body.innerHTML = myHTML.replace('{DOMAIN}', domain).replace('{ICON}', myImageCode) + '\n' + myCSS;