canary fix (again)

This commit is contained in:
Cynthia Foxwell 2018-05-21 15:31:21 -06:00
parent 119cf7a1ac
commit cc3e5ea311
2 changed files with 4 additions and 15 deletions

View File

@ -101,9 +101,7 @@ function evaluate(str, exportsR) {
}); });
} }
} }
}, },
pushHookOld: (x, mod, main) => { pushHookOld: (x, mod, main) => {
@ -130,7 +128,7 @@ function evaluate(str, exportsR) {
crispr.functions.patch(mod); crispr.functions.patch(mod);
// call webpack proper with our modified modules // 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 // setup replacement when discord tries to define webpack
set: webpack => { set: webpack => {
if (window.webpackJsonp && window.webpackJsonp.patched) return; if (webpack && webpack.push && webpack.push.patched) return;
const push_original = webpack.push; const push_original = webpack.push;
//__crprint('something is trying to define webpackJsonp...'); //__crprint('something is trying to define webpackJsonp...');
@ -237,7 +235,7 @@ function evaluate(str, exportsR) {
const main = o ? o : e[2]; const main = o ? o : e[2];
const _ = t ? e : e[0]; 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]; const args = [_,patched,main];
@ -246,7 +244,7 @@ function evaluate(str, exportsR) {
webpack.push = newPush; webpack.push = newPush;
window.crispr.hook = webpack; window.crispr.hook = webpack;
webpack.patched = true; webpack.push.patched = true;
} }
} }
}); });

View File

@ -71,15 +71,6 @@ exports = {
$settingsapi.ourSections.push({section:"HEADER",label:label}); $settingsapi.ourSections.push({section:"HEADER",label:label});
$settingsapi.sections.splice($settingsapi.sections.length-4,0,{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. //All of these allow us to use Discord's elements.
elements: { elements: {
createVerticalPanel: function() { createVerticalPanel: function() {