open($file, ZipArchive::CREATE + ZipArchive::EXCL + ZipArchive::CHECKCONS) or die("Failed to create {$file}.\n"); return $zip; } $raw_build = createZip("Universal Bypass for Firefox.zip"); $chromium_build = createZip("Universal Bypass for Chromium-based browsers.zip"); foreach($index as $fn) { if($fn == "README.md" || $fn == "injection_script.js") { continue; } if($fn == "manifest.json") { $json = json_decode(file_get_contents($fn), true); unset($json["browser_specific_settings"]); $json["incognito"] = "split"; $chromium_build->addFromString($fn, json_encode($json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); } else { $chromium_build->addFile($fn, $fn); } $raw_build->addFile($fn, $fn); } $raw_build->close(); $chromium_build->close();