Firefox和UniversalBrowserWrite特权 [英] Firefox and UniversalBrowserWrite privilege

查看:261
本文介绍了Firefox和UniversalBrowserWrite特权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我尝试写:

  netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserWrite'); 

Firefox 3告诉我,我的脚本已经被UniversalBrowserWrite权限取消了!



现在我想在我的局域网中执行一个在全屏模式下最大化的程序,我希望使用窗口的特权语句作为 toolbar = no 等,但我怎么能做到这一点?



我记得当我们使用上面的语句给用户时,会被一个窗口
tell它接受一个特权的脚本,但现在该窗口不显示。

我希望我不能设置一些about:配置,因为我的程序必须运行到一个局域网,我应该把这个配置部署到所有的客户端。

解决方案

好的,我发现这个解决方案:
$ b $首先,我们必须在about:config中设置这个:
$ b <1> signed.applets.codebase_principal_support为true
允许执行
p>

  netscape.security.PrivilegeManager.enablePri vilege( UniversalBrowserWrite); 

并向用户显示确认窗口以允许执行

2)dom.disable_window_open_feature.location为false
以允许隐藏地址栏

3)dom.disable_window_open_feature。状态为false'
允许隐藏状态栏

所以这样的代码将Firefox放在一个真正的全屏幕中:



window.onload = function()
{

  netscape.security.PrivilegeManager .enablePrivilege( 'UniversalBrowserWrite'); 
var newWin = window.open('http://www.stackoverflow.com','so','dialog = yes,minimizable = no,personalbar = no,directories = no,titlebar = no,location =没有');
};

在局域网中,我们应该为客户端设置about:config首选项,我们可以使用远程工具就像SpliFF建议的一样。


If I try to write:

netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserWrite');

Firefox 3 tell me that to my script have been negated the UniversalBrowserWrite privileges!

Now I want to execute in my LAN a program that is maximized in a fullscreen mode and I want to use privileged statements for the windows as toolbar=no etc. but how can I do that?

I remember that when we use the statement above to the user will be prompeted a window that tell it to accept a privileged script but now that window does not show.

I hope I must not set some about:config because my program must run into a LAN and I should deploy that configuration to all the client.

解决方案

Ok I found this solution:

First we must in about:config setting this:

1) signed.applets.codebase_principal_support" to true to allow the execution of

 netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserWrite');

and to show the user a confirmation window to allow that execution

2) "dom.disable_window_open_feature.location" to false to allow to hide the location bar

3) "dom.disable_window_open_feature.status" to false' to allow to hide the status bar

So code like this will put Firefox in a real full screen:

window.onload = function() {

    netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserWrite');
    var newWin = window.open('http://www.stackoverflow.com', 'so', 'dialog=yes,minimizable=no,personalbar=no, directories=no, titlebar=no, location=no');
}; 

After in the LAN we should set for the clients that about:config preferences and we can use a remote tool like suggested by SpliFF.

这篇关于Firefox和UniversalBrowserWrite特权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆