diff --git a/crispr/crispr.js b/crispr/crispr.js index f0ef4b7..dc7fef4 100644 --- a/crispr/crispr.js +++ b/crispr/crispr.js @@ -101,9 +101,7 @@ function evaluate(str, exportsR) { }); } - } - }, pushHookOld: (x, mod, main) => { @@ -130,7 +128,7 @@ function evaluate(str, exportsR) { crispr.functions.patch(mod); // call webpack proper with our modified modules - return x,mod,main; + return mod; } @@ -222,7 +220,7 @@ function evaluate(str, exportsR) { // setup replacement when discord tries to define webpack set: webpack => { - if (window.webpackJsonp && window.webpackJsonp.patched) return; + if (webpack && webpack.push && webpack.push.patched) return; const push_original = webpack.push; //__crprint('something is trying to define webpackJsonp...'); @@ -237,7 +235,7 @@ function evaluate(str, exportsR) { const main = o ? o : e[2]; const _ = t ? e : e[0]; - const {x,patched,z} = window.crispr.functions.pushHookNew(_,modules,main); + const patched = window.crispr.functions.pushHookNew(_,modules,main); const args = [_,patched,main]; @@ -246,7 +244,7 @@ function evaluate(str, exportsR) { webpack.push = newPush; window.crispr.hook = webpack; - webpack.patched = true; + webpack.push.patched = true; } } }); diff --git a/plugin/settings.js b/plugin/settings.js index efeef14..3b00f74 100644 --- a/plugin/settings.js +++ b/plugin/settings.js @@ -71,15 +71,6 @@ exports = { $settingsapi.ourSections.push({section:"HEADER",label:label}); $settingsapi.sections.splice($settingsapi.sections.length-4,0,{section:"HEADER",label:label}); }, - exportSections: function(){ - let out = ""; - - for(i in $settingsapi._sections){ - out = out + convertToText($settingsapi._sections[i]); - } - - return out; - }, //All of these allow us to use Discord's elements. elements: { createVerticalPanel: function() {