allows to bypass missing certificate problem by changing WSS to WS. need to enable Mixed content in browser settings
当前为
// ==UserScript==
// @name Enter semi dead surviv.io by using HTTP. Needs browser settings adjusted (see info).
// @namespace http://tampermonkey.net/
// @version 0.11
// @description allows to bypass missing certificate problem by changing WSS to WS. need to enable Mixed content in browser settings
// @author garlic
// @match https://surviv.io/
// @icon https://www.google.com/s2/favicons?sz=64&domain=surviv.io
// @grant none
// @license MIT
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
{
window.WebSocket=class WebSocket extends window.WebSocket {
constructor(e) {
var url = new URL(e);
url.port='';
url.protocol='ws';
super(url.toString());
this.onerror = function(z) {
console.warn(z); /* maybe it's due to Mixed content ban, should explain to user */
if(!e.includes("team"))
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','')}
}
}
}
}
})();