2017-09-24 64 views
-1

我可以将我的网站设置为Google Chrome浏览器的主页吗?我能够为IE做。是否可以将我的网站设置为Chrome的默认主页

我的代码为IE。

RegistryKey startPageKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Internet Explorer\Main", true); 
    startPageKey.SetValue("Start Page", "http://example.com/"); 
    startPageKey.Close(); 
+0

Java或C#?哪一个? –

+0

C#或javascript –

回答

0

Chrome浏览器设置在%USERPROFILE%\本地设置\应用 数据\谷歌\镀铬\用户Data.ChromotingConfig.json,并一点点加密为npocmaka提及。

但是,您可以通过将以下javascript粘贴到“主页”前置字段(在Chrome选项下)来执行解决方法,并且在单击“主页”按钮时按预期工作。

javascript:(function(){ window.location.href='http://www.google.com/';})(); 
+0

但是,我将如何编程 –

0

随着Chrome扩展程序的帮助下,我能够做同样的

相关问题