GreaseMokey 里面搞笑的JavaScript代码
2008-04-04 17:09
441 查看
在GreaseMokey里又一段代码,是GreaseMokey的开发者发现了一个firefox的bug,然后写在注释里,firefox的开发者看到了这段话,于是在下面给出了解决方案,并且回复了。
// This is the most amazing thing I have ever seen.
// Multiple statements in the JavaScript interpreter were causing a crash
// in FF 1.0.x.
// I described it to Brendan, and, after a bit of thought, he knew right off
// the top of his head that adding a pointless eval() would fix it. Magic.
eval("42");
var sandbox = new this.sandboxCtor();
var storage = new GM_ScriptStorage(script);
var logger = new GM_ScriptLogger(script);
var xmlhttpRequester = new GM_xmlhttpRequester(this.unsafeContentWin,
this.chromeWindow);
//在firefox1.0.X中,当又多个表达式的时候会导致firefox崩溃
//你只要在里面添加以个eval()行了
// This is the most amazing thing I have ever seen.
// Multiple statements in the JavaScript interpreter were causing a crash
// in FF 1.0.x.
// I described it to Brendan, and, after a bit of thought, he knew right off
// the top of his head that adding a pointless eval() would fix it. Magic.
eval("42");
var sandbox = new this.sandboxCtor();
var storage = new GM_ScriptStorage(script);
var logger = new GM_ScriptLogger(script);
var xmlhttpRequester = new GM_xmlhttpRequester(this.unsafeContentWin,
this.chromeWindow);
//在firefox1.0.X中,当又多个表达式的时候会导致firefox崩溃
//你只要在里面添加以个eval()行了
相关文章推荐
- GreaseMokey 里面搞笑的JavaScript代码
- GreaseMokey 里面搞笑的JavaScript代码
- 从一行代码里面学点JavaScript
- 从一行代码里面学点JavaScript
- jsp里面,实现跳转,可以在javascript里面,添加代码:
- 在android里面调用javascript代码
- javascript代码如何实现打印框架里面的某个网页
- 从一行代码里面学点 JavaScript
- 从一行代码里面学点JavaScript
- 从一行代码里面学点JavaScript
- ASP.NET里面嵌入javascript代码示例
- javascript 动态改变onclick事件触发函数代码
- 100个直接可以拿来用的JavaScript实用功能代码片段
- javaScript矢量图表库-gRaphael几行代码实现精美的条形图/饼图/点图/曲线图
- [译]用YUIDoc文档化JavaScript代码
- 用ASP动态生成JavaScript的表单验证代码
- javascript 回到顶部效果的实现代码