fuck eval

This commit is contained in:
Cynthia Foxwell 2018-05-21 17:39:36 -06:00
parent cc3e5ea311
commit 9d937fe0b5
2 changed files with 5 additions and 2 deletions

View file

@ -150,10 +150,13 @@ function evaluate(str, exportsR) {
}
// krequire is a reimplementation of require(), only intended for loading plugins
window.krequire = function (p) {
/*window.krequire = function (p) {
var exports = {};
evaluate(fs.readFileSync($api.data + '/plugins/' + p + (p.endsWith('.js') ? '' : '.js'), 'utf8').toString(), exports);
return exports;
}*/
window.krequire = function(p){
return require($api.data + '/plugins/' + p + (p.endsWith('.js') ? '' : '.js')); //200 IQ :bigthink:
}
}

View file

@ -24,7 +24,7 @@ exports = {
name: "Settings Page + Settings API",
description: "Hijacking the settings pages.",
replacements: [
{signature:'/function z\\(\\){return\\[{(.+)}]}/',payload:'window.$settingsapi={sections:[{$1}]};function z(){return window.$settingsapi.sections;}'}
{signature:'/function (.)\\(\\){return\\[{(.+)}]}/',payload:'window.$settingsapi={sections:[{$2}]};function $1(){return window.$settingsapi.sections;}'}
],
loadAfter: ["system"]
},