我正在尝试在我的chrome扩展中使用Requre.js.
这是我的清单:
{
"name":"my extension",
"version":"1.0",
"manifest_version":2,
"permissions": ["http://localhost/*"],
"web_accessible_resources": [
"js/test.js"
],
"content_scripts":[
{
"matches":["http://localhost/*"],
"js":[
"js/require.js",
"js/hd_init.js"
]
}
]
}
Run Code Online (Sandbox Code Playgroud)
hd_init.js
console.log("hello, i'm init");
require.config({
baseUrl: chrome.extension.getURL("js")
});
require( [ "js/test"], function ( ) {
console.log("done loading");
});
Run Code Online (Sandbox Code Playgroud)
JS/test.js
console.log("hello, i'm test");
define({"test_val":"test"});
Run Code Online (Sandbox Code Playgroud)
这是我在控制台中得到的:
hello, i'm init chrome-extension://bacjipelllbpjnplcihblbcbbeahedpo/js/hd_init.js:8
hello, i'm test test.js:8
**Uncaught ReferenceError: define is not defined test.js:2**
done loading
Run Code Online (Sandbox Code Playgroud)
所以它加载文件,但看不到"定义"功能.这看起来像某种范围错误.如果我在本地服务器上运行,它可以正常工作.
有任何想法吗?
javascript scope google-chrome google-chrome-extension requirejs
我正在尝试编写powershell脚本,将用户从交换列表中隐藏起来.
我能够找到以下命令:
Set-Mailbox -Identity [user id here] -HiddenFromAddressListsEnabled $true
它没有给我一个错误信息,当我运行命令两次时,我得到以下警告:
警告:命令已成功完成,但未修改"[user id here]"的设置.
这可能意味着该命令确实有效.
但是当我转到Exchange管理控制台并打开用户配置文件时," hide user from exchange address lists
"复选框已关闭.
可能是什么原因?