【Chrome插件】去掉因使用jsonView插件的弹出窗口"请停用以开发者模式运行的扩展程序"
前言
小编最近使用jsonView插件时,每次打开谷歌浏览器都会弹出下面的窗口,上网搜索,找到一个非常有效的方法。

解决方法
一、新建一个文本文档
二、复制代码
<# :
@echo off
copy/b "%~f0" "%temp%\%~n0.ps1" >nul
powershell -Version 2 -ExecutionPolicy bypass -noprofile "%temp%\%~n0.ps1" "%cd% " "%~1"
del "%temp%\%~n0.ps1"
pause
exit /b
#>
param([string]$cwd='.', [string]$dll) function main {
"Chrome 'developer mode extensions' warning disabler v1.0.10.20170114`n"
$pathsDone = @{}
if ($dll -and (gi -literal $dll)) {
doPatch "DRAG'n'DROPPED" ((gi -literal $dll).directoryName + '\')
exit
}
doPatch CURRENT ((gi -literal $cwd).fullName + '\')
('HKLM', 'HKCU') | %{ $hive = $_
('', '\Wow6432Node') | %{
$key = "${hive}:\SOFTWARE$_\Google\Update\Clients"
gci -ea silentlycontinue $key -r | gp | ?{ $_.CommandLine } | %{
$path = $_.CommandLine -replace '"(.+?\\\d+\.\d+\.\d+\.\d+\\).+', '$1'
doPatch REGISTRY $path
}
}
}
}
function doPatch([string]$pathLabel, [string]$path) {
if ($pathsDone[$path.toLower()]) { return }
$dll = $path + "chrome.dll"
if (!(test-path -literal $dll)) {
return
}
"======================="
"$pathLabel PATH $((gi -literal $dll).DirectoryName)"
"`tREADING Chrome.dll..."
$bytes = [IO.File]::ReadAllBytes($dll)
# process PE headers
$BC = [BitConverter]
$coff = $BC::ToUInt32($bytes,0x3C) + 4
$is64 = $BC::ToUInt16($bytes,$coff) -eq 0x8664
$opthdr = $coff+20
$codesize = $BC::ToUInt32($bytes,$opthdr+4)
$imagebase32 = $BC::ToUInt32($bytes,$opthdr+28)
# patch the flag in data section
$data = $BC::ToString($bytes,$codesize)
$flag = "ExtensionDeveloperModeWarning"
$stroffs = $data.IndexOf($BC::ToString($flag[1..99]))/3 - 1
if ($stroffs -lt 0) {
write-host -f red "`t$flag not found"
return
}
$stroffs += $codesize
if ($bytes[$stroffs] -eq 0) {
write-host -f darkgreen "`tALREADY PATCHED"
return
}
$exe = join-path (split-path $path) chrome.exe
$EA = $ErrorActionPreference
$ErrorActionPreference = 'silentlyContinue'
while ((get-process chrome -module | ?{ $_.FileName -eq $exe })) {
forEach ($timeout in 15..0) {
write-host -n -b yellow -f black `
"`rChrome is running and will be terminated in $timeout sec. "
write-host -n -b yellow -f darkyellow "Press ENTER to do it now. "
if ([console]::KeyAvailable) {
$key = $Host.UI.RawUI.ReadKey("AllowCtrlC,IncludeKeyDown,NoEcho")
if ($key.virtualKeyCode -eq 13) { break }
if ($key.virtualKeyCode -eq 27) { write-host; exit }
}
sleep 1
}
write-host
get-process chrome | ?{
$_.MainWindowHandle.toInt64() -and ($_ | gps -file).FileName -eq $exe
} | %{
"`tTrying to exit gracefully..."
if ($_.CloseMainWindow()) {
sleep 1
}
}
$killLabelShown = 0
get-process chrome | ?{
($_ | gps -file | select -expand FileName) -eq $exe
} | %{
if (!$killLabelShown++) {
"`tTerminating background chrome processes..."
}
stop-process $_ -force
}
sleep -milliseconds 200
}
$ErrorActionPreference = $EA
$bytes[$stroffs] = 0
"`tPATCHED $flag flag"
# patch the channel restriction code for stable/beta
$code = $BC::ToString($bytes,0,$codesize)
$rxChannel = '83-F8-(?:03-7D|02-7F)'
# old code: cmp eax,3; jge ...
# new code: cmp eax,2; jg ...
$chanpos = 0
try {
if ($is64) {
$pos = 0
$rx = [regex]"$rxChannel-.{1,100}-48-8D"
do {
$m = $rx.match($code,$pos)
if (!$m.success) { break }
$chanpos = $m.index/3 + 2
$pos = $m.index + $m.length + 1
$offs = $BC::ToUInt32($bytes,$pos/3+1)
$diff = $pos/3+5+$offs - $stroffs
} until ($diff -ge 0 -and $diff -le 4096 -and $diff % 256 -eq 0)
if (!$m.success) {
$rx = [regex]"84-C0.{18,48}($rxChannel)-.{30,60}84-C0"
$m = $rx.matches($code)
if ($m.count -ne 1) { throw }
$chanpos = $m[0].groups[1].index/3 + 2
}
} else {
$flagOffs = [uint32]$stroffs + [uint32]$imagebase32
$flagOffsStr = $BC::ToString($BC::GetBytes($flagOffs))
$variants = "(?<channel>$rxChannel-.{1,100})-68-(?<flag>`$1-.{6}`$2)",
"68-(?<flag>`$1-.{6}`$2).{300,500}E8.{12,32}(?<channel>$rxChannel)",
"E8.{12,32}(?<channel>$rxChannel).{300,500}68-(?<flag>`$1-.{6}`$2)"
forEach ($variant in $variants) {
$pattern = $flagOffsStr -replace '^(..)-.{6}(..)', $variant
"`tLooking for $($pattern -replace '\?<.+?>', '')..."
$minDiff = 65536
foreach ($m in [regex]::matches($code, $pattern)) {
$maybeFlagOffs = $BC::toUInt32($bytes, $m.groups['flag'].index/3)
$diff = [Math]::abs($maybeFlagOffs - $flagOffs)
if ($diff % 256 -eq 0 -and $diff -lt $minDiff) {
$minDiff = $diff
$chanpos = $m.groups['channel'].index/3 + 2
}
}
}
if (!$chanpos) { throw }
}
} catch {
write-host -f red "`tUnable to find the channel code, try updating me"
write-host -f red "`thttp://stackoverflow.com/a/30361260"
return
}
$bytes[$chanpos] = 9
"`tPATCHED Chrome release channel restriction" "`tWriting to a temporary dll..."
[IO.File]::WriteAllBytes("$dll.new",$bytes) "`tBacking up the original dll..."
move -literal $dll "$dll.bak" -force "`tRenaming the temporary dll as the original dll..."
move -literal "$dll.new" $dll -force $pathsDone[$path.toLower()] = $true
write-host -f green "`tDONE.`n"
[GC]::Collect()
} main
三、命名脚本文件chrome.bat
四、出现问题

1.将Chrome.bat文件放到路径下:C:\Windows\System32\WindowsPowerShell\v1.0
2.双击运行即可。
【Chrome插件】去掉因使用jsonView插件的弹出窗口"请停用以开发者模式运行的扩展程序"的更多相关文章
- 【已解决】Chrome提示:"请停用以开发者模式运行的扩展程序"的解决办法
chrome用户在安装了一些第三方的chrome插件后,每次打开浏览器的时候都会出现“请停用以开发者模式运行的扩展程序”的提示,只有每次点击取消之后才能正常使用扩展.如下图所示 那么有没有什么方法可以 ...
- 彻底禁用Chrome的“请停用以开发者模式运行的扩展程序”提示
前言 作为一个前端程序员,难免会有一些专属自己的小扩展,没必要每一个都发到Chrome应用商店去,虽然可以勾选"开发者模式"来运行本地插件,但是每次启动都会有一个烦人的" ...
- 禁用Chrome的“请停用以开发者模式运行的扩展程序”提示
1.前言 每次启动都会有一个烦人的“请停用以开发者模式运行的扩展程序”提示,这个提示有多烦人,接触过的人都知道,启动的时候它不立即提示,等过了几秒钟等你打开某个网页开始执行某些操作时它突然弹出来干扰你 ...
- 最新解决Chrome(版本76.0.3809.100) “请停用以开发者模式运行的扩展程序”的方法
最新解决Chrome(版本76.0.3809.100) “请停用以开发者模式运行的扩展程序”的方法 最近在远景论坛上发现了最新的解决Chrome浏览器提示:请停用以开发者模式运行的扩展程序的问题.该方 ...
- Selenium启动Chrome浏览器提示“请停用以开发者模式运行的扩展程序”的解决办法
安装了python selenium,运行下面代码: 1 from selenium import webdriver 2 3 browser = webdriver.Chrome() 4 brows ...
- Chrome提示:"请停用以开发者模式运行的扩展程序"的解决办法
操作步骤 1.开始 -> 运行 -> 输入gpedit.msc -> 回车确定打开计算机本地组策略编辑器(通过Win + R快捷键可以快速打开运行),如图所示: 2.在打开的本地组策 ...
- [转]关闭 Chrome 浏览器的启动时提示 - 请停用以开发者模式运行的扩展程序
最新版本 69.0.3497.92 (x64) 解决办法: https://www.cnblogs.com/liuxianan/p/disable-chrome-extension-warning.h ...
- 彻底禁用chrome请停用以开发者模式运行的扩展程序弹框
首先上图 怎么解决呢? 进入安装目录-->下图目录(一串数字的目录) 2. 找到chrome.dll 3.下载patch.exe 下载网址 https://itdocs.pipipan.co ...
- 去除Chrome“请停用以开发者模式运行的扩展程序”提示
将version.dll放在chrome同级目录,重启浏览器( 79.0.3945.79版本后已失效)
随机推荐
- Pat1128:N Queens Puzzle
1128. N Queens Puzzle (20) 时间限制 300 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue The & ...
- MySql中innodb存储引擎事务日志详解
分析下MySql中innodb存储引擎是如何通过日志来实现事务的? Mysql会最大程度的使用缓存机制来提高数据库的访问效率,但是万一数据库发生断电,因为缓存的数据没有写入磁盘,导致缓存在内存中的数据 ...
- ajax如何实现、readyState五中状态的含义
转载:http://www.cnblogs.com/teroy/p/3917439.html 熟悉web开发的程序员想必对Ajax也不会陌生.现在已经有很多js框架封装了ajax实现,例如JQuery ...
- HTTP协议GET HEAD简单介绍
一.HTTP协议简介 超文本传输协议(Hypertext Transfer Protocol,简称HTTP)是应用层协议,自 1990 年起,HTTP 就已经被应用于 WWW 全球信息服务系统. HT ...
- UISegmentedControl在Swift中的使用
UISegmentedControl控件是分段显示控件,用户可以选择它上展示的任一段部分,每一个部分都像是一个按钮,如果被按下也会像UIButton一样执行相应的方法.在这篇文章中我们将创建一个UIS ...
- Linux kernel的中断子系统之(一):综述
返回目录:<ARM-Linux中断系统>. 总结: 一从作为一名驱动工程师角度看,用好中断需要正确认识request_threaded_irq/request_irq关系.中断临界区保护. ...
- Securing Spring Cloud Microservices With OAuth2
From Zero to OAuth2 in Spring cloud Today I am presenting hours of research about a (apparently) sim ...
- Open-Source Service Discovery
Service discovery is a key component of most distributed systems and service oriented architectures. ...
- Collection集合详解
/*Collection--List:元素是有序的,元素可以重复.因为该集合体系有索引. ---ArrayList;底层的数据结构使用的是数组结构.特点:查询速度很快.但是增删很慢.线程不同步 --- ...
- PHP写的爬虫,爬指定网站页面上的各种图片
打算用php实现一个爬虫,这是爬指定页面的图片的一段程序,其他的部分还没调试好,先把这个放上来 <?php $string=file_get_contents("http://www. ...