Skip to content

Instantly share code, notes, and snippets.

View unamed666's full-sized avatar
😢
Need a job

unamed666 unamed666

😢
Need a job
  • Need a job
  • Bogor, Indonesia
  • 13:40 (UTC +07:00)
  • LinkedIn in/damala
View GitHub Profile
@tophf
tophf / patch-chrome-mv2-2025-11-18.ps1
Last active January 26, 2026 17:53
Enables ManifestV2 for extensions in Chrome 140+
<# 1. To patch dll in a protected folder like "c:\program files" run this script as Administrator.
2. If your Windows isn't configured to run ps1 files, you can run it from command prompt like this:
powershell -ep bypass -noprofile "patch-chrome-mv2.ps1"
#>
param([string]$dll, [string]$dir = $pwd)
function doPatch([string]$path, [string]$pathLabel = '') {
$dll = $script:dll = if ($path.EndsWith('\')) { Join-Path $path chrome.dll } else { $path }
if (!(Test-Path -literal $dll)) { return }
$localAppData = [Environment]::GetFolderPath('LocalApplicationData')