blasploop

ESC for settings menu, ALT for homepage menu!

  1. // ==UserScript==
  2. // @name blasploop
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @description ESC for settings menu, ALT for homepage menu!
  6. // @author blaspious
  7. // @match https://sploop.io/
  8. // @grant none
  9. // ==/UserScript==
  10. (function(){
  11. //in-game settings
  12. let popUI = document.querySelector('#pop-ui');
  13. let settings = document.querySelector('#pop-settings');
  14. //style changes
  15. document.getElementById('ranking-middle-main').style.height = '380px';
  16. document.getElementById('ranking-ranks-container').style.height = '295px';
  17.  
  18. document.getElementById('ranking2-middle-main').style.height = '380px';
  19. document.getElementById('ranking-rank-container').style.height = '295px';
  20.  
  21. document.getElementById('profile-left-main').style.width = '650px';
  22. document.getElementById('change-username').style.width = '200px';
  23.  
  24. document.getElementById('pop-ui').style.opacity = '0.6';
  25. document.getElementById('homepage').style.opacity = '0.5';
  26.  
  27. document.getElementById('hat-menu').style.opacity = '0.5';
  28. document.getElementById('clan-menu').style.opacity = '0.5';
  29. //adjustment fixes
  30. document.querySelector('#game-content').style.justifyContent = 'center';
  31. document.querySelector('#main-content').style.width = 'auto';
  32. //ad remove
  33. var styleItem1 = document.createElement('style');
  34. styleItem1.type = 'text/css';
  35. styleItem1.appendChild(document.createTextNode(`#cross-promo, #bottom-wrap, #google_play, #game-left-content-main, #game-bottom-content, #game-right-content-main, #right-content { display: none !important;
  36. }
  37. create_clan *, #pop-ui {
  38. background-color: transparent;
  39. }
  40. #pop-settings {
  41. background: rgba(0,0,0,0.5);
  42. opacity: 0.5;
  43. }`));
  44. document.head.appendChild(styleItem1);
  45. //auto settings
  46. const grid = document.querySelector('#grid-toggle');
  47. const ping = document.querySelector('#display-ping-toggle');
  48. grid.click();
  49. ping.click();
  50. //in-game settings
  51. document.addEventListener('keydown', e =>{
  52. if(e.keyCode == 27) {
  53. if(document.querySelector('#hat-menu').style.display !== 'flex' && document.querySelector('#clan-menu').style.display !== 'flex' && document.querySelector('#homepage').style.display !== 'flex' && document.querySelector('#chat-wrapper').style.display !== 'block') {
  54. if(!popUI.classList.contains('fade-in')) {
  55. popUI.classList.add('fade-in');
  56. popUI.style.display = 'flex';
  57. settings.style.display = 'flex';
  58. return;
  59. }
  60. popUI.classList.remove('fade-in');
  61. popUI.style.display = 'none';
  62. settings.style.display = 'none';
  63. //in-game homepage
  64. const popHomepage = document.getElementById('homepage')
  65. function handleControlKeyPress(event) {
  66. if (event.code === 'AltLeft' || event.code === 'AltRight') {
  67. if (popHomepage.style.display === 'flex') {
  68. popHomepage.style.display = 'none';
  69. } else {
  70. popHomepage.style.display = 'flex';
  71. }
  72. event.preventDefault();
  73. event.stopPropagation();
  74. }}
  75. document.addEventListener('keydown', handleControlKeyPress);
  76. }}});})();