Move adding pac kitchen to lower level (during cook)

This commit is contained in:
Ilya Ig. Petrov 2018-01-24 19:55:22 +05:00
parent a592b4c4ae
commit c59ffda2e2

View File

@ -315,6 +315,12 @@
cook(pacData, pacMods = mandatory()) { cook(pacData, pacMods = mandatory()) {
pacData = pacData.replace(
new RegExp(kitchenStartsMark + '[\\s\\S]*$', 'g'),
''
);
/a/.test('a'); // GC RegExp.input and friends.
return pacMods.ifNoMods ? pacData : pacData + `${ kitchenStartsMark } return pacMods.ifNoMods ? pacData : pacData + `${ kitchenStartsMark }
/******/ /******/
/******/;(function(global) { /******/;(function(global) {
@ -483,12 +489,6 @@ ${ pacMods.filteredCustomsString
) { ) {
const pac = window.utils.getProp(details, 'value.pacScript'); const pac = window.utils.getProp(details, 'value.pacScript');
if (pac && pac.data) { if (pac && pac.data) {
// Delete old kitchen modifications.
pac.data = pac.data.replace(
new RegExp(kitchenStartsMark + '[\\s\\S]*$', 'g'),
''
);
/a/.test('a'); // GC RegExp.input and friends.
return chrome.proxy.settings.set(details, chromified(cb)); return chrome.proxy.settings.set(details, chromified(cb));
} }
} }