Custom ShellShock Theme

Custom theme for ShellShock.io with background and skybox fixes

  1. // ==UserScript==
  2. // @name Custom ShellShock Theme
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.1
  5. // @description Custom theme for ShellShock.io with background and skybox fixes
  6. // @author Anonymous
  7. // @match *://shellshock.io/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // Ensure the custom background image is applied
  15. function setCustomBackground() {
  16. document.body.style.backgroundImage = "url('https://images.wallpapersden.com/image/download/obito-uchiha-cool-4k_bGllbm6UmZqaraWkpJRoa2lprWdlaW4.jpg')";
  17. document.body.style.backgroundSize = "cover";
  18. document.body.style.backgroundRepeat = "no-repeat";
  19. document.body.style.backgroundAttachment = "fixed";
  20. }
  21. setCustomBackground();
  22.  
  23. // Ensure the skybox is set to the base64 image
  24. function setSkybox() {
  25. const sky = document.querySelector('.skybox'); // Adjust the selector based on the game's DOM
  26. if (sky) {
  27. sky.style.backgroundImage = "url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxITEhISEhIVFRUWFRcVFRUVFRUVFRUVFRcYFhUVFRUYHSggGBolGxcVITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OGhAQFy0dHR0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKy0rKy0tLS0tLS0tNi0tLSstK//AABEIALEBHAMBIgACEQEDEQH/xAAbAAADAQEBAQEAAAAAAAAAAAADBAUCAQAGB//EADUQAAIBAgMFCAEEAgEFAAAAAAABAgMRBCExBUFRcYESIjJhkbHB8KETQtHhI3IzFFJigsL/xAAZAQADAQEBAAAAAAAAAAAAAAABAgMABAX/xAAhEQACAgMAAwADAQAAAAAAAAAAAQIRAyExEjJBBCJhQv/aAAwDAQACEQMRAD8A/...')";
  28. sky.style.backgroundSize = "cover";
  29. sky.style.backgroundRepeat = "no-repeat";
  30. sky.style.backgroundAttachment = "fixed";
  31. }
  32. }
  33. setSkybox();
  34.  
  35. // Observer to apply the skybox fix whenever the skybox is re-rendered
  36. new MutationObserver(setSkybox).observe(document.body, { childList: true, subtree: true });
  37.  
  38. // Modify the kill message
  39. const originalFunction = window.someKillFunction; // Replace `someKillFunction` with the actual function name that handles kill messages
  40. window.someKillFunction = function(killer, victim) {
  41. const message = `${killer} obliterated ${victim}`;
  42. originalFunction.call(this, killer, victim, message);
  43. };
  44.  
  45. // Ensure scope colors are set for specific weapons
  46. const customScopeColor = "#880808";
  47. const css = `
  48. .scope-crackshot { border-color: ${customScopeColor} !important; }
  49. .scope-rpegg { border-color: ${customScopeColor} !important; }
  50. .scope-free-ranger { border-color: ${customScopeColor} !important; }
  51. `;
  52. const style = document.createElement("style");
  53. style.type = "text/css";
  54. style.appendChild(document.createTextNode(css));
  55. document.head.appendChild(style);
  56. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址