Skip to content

A small temporary fix for the Krunker.io editor page where the scripting tab was blank due to codemirror links returning a 403 error code.

Notifications You must be signed in to change notification settings

BluZed/kr-editor-krunkscript-fix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

NO LONGER REQUIRED - THIS GOT FIXED

kr-editor-krunkscript-fix

How to use?

  • install tampermonkey browser extension (click here)
  • install script.user.js from this repo in tampermonkey manually or by clicking here.

swat's script which also works by rerouting to codemirror mirror without cors (thanks sak):

// ==UserScript==
// @name         Codemirror rerouter
// @description  Reroutes to codemirror mirror without cors
// @author       Swat
// @match        https://krunker.io/editor.html
// @match        https://krunker.io/scripting.html
// @grant        none
// @run-at       document-start
// ==/UserScript==

new MutationObserver(async m => m.forEach(m => m.addedNodes.forEach(m => m.src &&= m.src.replace("codemirror.net", "codemirror-mirror.swatdo.ge")))).observe(document, { childList: true, subtree: true })

how it works

Krunker Editor scripting page has codemirror 5 scripts in the body tag whose urls return a 403 forbidden error code for krunker.io domain. I've copy pasted all the code from all the codemirror 5 script files that do not load into a single file (https://bluzed.github.io/kr-editor-krunkscript-fix/code_mirror_packed.js) and then while the Krunker Editor scripting page loads, my script checks for these script tag with broken urls and replaces the first script tag's src with my packed file and deletes rest of the script tags. This way, Krunker Editor Scripting tab loads fine.

About

A small temporary fix for the Krunker.io editor page where the scripting tab was blank due to codemirror links returning a 403 error code.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published