自定义协议处理程序并确认对话框

时间:2019-10-12 06:31:18

标签: javascript google-chrome

我需要摆脱自定义协议的确认窗口(图片上显示)。 一切正常,但是这个窗口破坏了我的想法...如何隐藏它?

EN:在Power Shell中打开吗?

dialog box

当然可以,我该如何做: 例如:testnotepad:// 12345

js中的注册表

navigator.registerProtocolHandler("web+testnotepad", 'localhost?q=%s', "Test");

html

<a href="testnotepad:12345">notepad</a>

Windows注册表

[HKEY_CLASSES_ROOT\testnotepad]
"Content Type"="text/plain"
"URL Protocol"=""
@="Test Notepad"

[HKEY_CLASSES_ROOT\testnotepad\shell]
@="open"

[HKEY_CLASSES_ROOT\testnotepad\shell\open]

[HKEY_CLASSES_ROOT\testnotepad\shell\open\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -File C:\\testnotepad\\test.ps1 %1"

0 个答案:

没有答案