Skip to content

Instantly share code, notes, and snippets.

@apple502j
Last active August 2, 2020 18:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apple502j/43b2bb095745c5bc1ac3038354724977 to your computer and use it in GitHub Desktop.
Save apple502j/43b2bb095745c5bc1ac3038354724977 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Don't Load Project
// @description Do not load project when reading comments
// @author apple502j
// @match https://scratch.mit.edu/projects/*
// ==/UserScript==
// Credit to Florrie
const destroyGUI = () => {
const oldMap = Array.prototype.map;
Array.prototype.map = function(...args) {
// loader.jsx
if (this && this[0] && this[0].weight) {
Array.prototype.map = oldMap;
throw new Error('loader crashed; you are reading a comment');
}
return oldMap.apply(this, args);
};
};
if (location.hash.startsWith('#comments-')) {
console.log('we will destroy gui')
destroyGUI();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment