我正在开发一个Chrome扩展程序,以使用jQuery突出显示Facebook通知。当Facebook首次加载时,我可以加载它,但是过了一会儿它就停止工作了。在清单中,我尝试将持久性设置为true和false,没有区别。我尝试使用background.js。
我一直在摆弄chrome.tabs.onActivated和.onHighlighted并可以显示警报,但是看不到我的代码或jQuery $。
在开发工具中,我的扩展程序未在我可以选择在此处使用的环境中列出 
我的代码:manifest.json
{
"name": "Facebook Your notification highlight",
"version": "0.3.2",
"description": "Highlights notifications with 'your' in the notification!",
"background": {
"scripts": ["jquery.min.js","background.js"],
"persistent": false
},
"browser_action": {
"default_icon": "icon48.png"
},
"icons": {
"48": "icon48.png",
"128": "icon128.png" },
"permissions": [ "tabs", "webNavigation", "https://www.facebook.com/" , "https://facebook.com/", "http://www.facebook.com/"],
"manifest_version": 2
}Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>Run Code Online (Sandbox Code Playgroud)
新manifest.js
{
"name": "Facebook Your notification highlight",
"version": "0.3.3",
"description": "Highlights notifications with 'your' in the notification!",
"background": {
"scripts": ["jquery.min.js","background.js"]
},
"browser_action": {
"default_icon": "icon48.png"
}, …Run Code Online (Sandbox Code Playgroud)我想为网页开发一个“添加到联系人”按钮,就像您在网络研讨会和活动页面上看到的“添加到日历-Google,ICal,Outlook”类型的按钮一样。
我开始使用它来调查Google通讯录。我开始构建一个表单,将应用程序/ atom + xml提交到他们在帮助文件中讨论的URL 以及Google on Stack的类似问题。
我认为创建此服务是对社区的一种类似于开源的服务,在我进行修补时会得到一些专家帮助。我在这里要求这项贡献。
我的粗糙代码不起作用
函数SendToGoogle(){
var url =“ https://www.google.com/m8/feeds/contacts/default/full”;
var data = contactData();
警报(数据);
/ *
$ .post(网址,数据,功能(数据,状态){
alert(“ Data:” + data +“ \ nStatus:” + status);
});
* /
$ .ajax({type:“ POST”,
网址:网址,
dataType:“ xml”,
contentType:“应用程序/ atom + xml”,
快取:false,
异步:是的,
crossDomain:是的,
成功:功能(数据,状态){
alert(“数据:” +数据+“ \ n状态:” +状态)}
})
} //结束SendToGoogle
函数contactData(){
return'Elizabeth Bennet Elizabeth Bennet Notes (206)555-1212 (206)555-1213 Mountain View 1600 Amphitheatre Pkwy CA 94043 United …