Better replit editor

Get the old and best replit editor!

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Better replit editor
// @namespace    http://tampermonkey.net/
// @version      1
// @description  Get the old and best replit editor!
// @author       @OfirApps on replit
// @match        https://replit.com/*
// @icon         https://replit.com/public/icons/favicon-196.png
// @grant        none
// @license      Apache License 2.0
// ==/UserScript==

(function() {
    'use strict';
    if ((window.location.href).includes("@")) { /* check if url is an actual codable repl*/
    if ((window.location.href).includes("?monaco=1")) { /* check if the url has ?Monaco=1*/
    //Nothing happens if it does have it
    } else { /* redirect the url Actions: */
     if ((window.location.href).includes("#")) { /* check if the url got an file specified like main.py*/
         var splittedurl = (window.location.href).split("#") /* split the url that contains the file*/
         window.location.href = splittedurl[0] + "?monaco=1#" + splittedurl[1] /* remake the url and redirect to it */
     } else { /* if it dosent have a file specfied in the url */
    window.location.href = window.location.href + "?monaco=1" /* switch to the simpler version of ?monaco=1*/
     }
    }
    }
})();