Enter semi dead surviv.io by using HTTP. Needs browser settings adjusted (see info).

allows to bypass missing certificate problem by changing WSS to WS. need to enable Mixed content in browser settings

  1. // ==UserScript==
  2. // @name Enter semi dead surviv.io by using HTTP. Needs browser settings adjusted (see info).
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.14
  5. // @description allows to bypass missing certificate problem by changing WSS to WS. need to enable Mixed content in browser settings
  6. // @author garlic
  7. // @match *://surviv.io/
  8. // @match *://*.surviv.io/*
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=surviv.io
  10. // @grant none
  11. // @license MIT
  12. // @run-at document-start
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17. {
  18. function disableLoginPrompt() {
  19. Object.defineProperty(window["modal-notification"],"style",{ get: function() { return {} }, set: function() {} }); Object.defineProperty(window["modal-create-account"],"style",{ get: function() { return {} }, set: function() {} }); Object.defineProperty(window["modal-account-incentive"],"style",{ get: function() { return {} }, set: function() { "strangely this has no effect"} }); Object.defineProperty(document, "cookie", { configurable: true, get: function() { return "ftue-step=12"; }, set: function(e) {} }); History.prototype.replaceState = function() {}; 0;
  20. }
  21.  
  22. window.addEventListener("DOMContentLoaded", disableLoginPrompt);
  23.  
  24. window.WebSocket=class WebSocket extends window.WebSocket {
  25. constructor(e) {
  26. var url = new URL(e);
  27. url.port='';
  28. url.protocol='ws';
  29. super(url.toString());
  30. this.onerror = function(z) {
  31. console.warn(z); /* maybe it's due to Mixed content ban, should explain to user */
  32. if(!e.includes("team"))
  33. if(console.confirm("This error might be because need to enable security settings (Enter semi dead surviv.io by using HTTP userscript Tampermonkey). Choose OK to read link with explanation")) { window.open('https://greasyfork.org/en/scripts/463163-enter-semi-dead-surviv-io-by-using-http-needs-browser-settings-adjusted-see-info','')}
  34. }
  35. }
  36. }
  37. }
  38.  
  39. })();