Disable scope (SHELL SHOCKERS)

Removes the black borders that occur whenever you scope in!

بۇ قوليازمىنى قاچىلاش؟
ئاپتورنىڭ تەۋسىيەلىگەن قوليازمىسى

سىز بەلكىم Mod Panel for Shell Shockers نى ياقتۇرۇشىڭىز مۇمكىن.

بۇ قوليازمىنى قاچىلاش
  1. // ==UserScript==
  2. // @name Disable scope (SHELL SHOCKERS)
  3. // @version 0.3
  4. // @description Removes the black borders that occur whenever you scope in!
  5. // @match *://shellshock.io/*
  6. // @author A3+++
  7. // @run-at document-start
  8. // @grant none
  9. // @namespace https://greatest.deepsurf.us/users/815159
  10. // ==/UserScript==
  11. (function () {
  12. window.XMLHttpRequest = class extends window.XMLHttpRequest {
  13. constructor(){super(...arguments)}
  14. open() {
  15. if (arguments[1] && arguments[1].includes("js/shellshock.js"))this.scriptMatch = true;
  16. super.open(...arguments);}
  17. get response(){
  18. if (this.scriptMatch) {
  19. let responseText = super.response;
  20. let matches = [responseText.match(/.push\((\w+)\),\w+.maxZ=100/),responseText.match(/this.crosshairs.position.z=2/)];
  21. if (matches[0]) responseText = responseText.replace(matches[0][0], matches[0][0] + `,window.fixCamera(${matches[0][1]})`);
  22. if (matches[1]) responseText = responseText.replace(matches[1][0], matches[1][0] + `;return`)
  23. return responseText
  24. }
  25. return super.response;
  26. }
  27. };
  28. window.fixCamera = function (camera) {
  29. let border = document.getElementById("scopeBorder");
  30. Object.defineProperties(camera.viewport, {
  31. width: {
  32. set: () => border.style.display = "none",
  33. get: () => 1
  34. },
  35. x: {
  36. get: () => 0
  37. }
  38. });
  39. }
  40. }())