I've try to create an extension that add params to url, but not work!! In Chrome Extension details give me error Uncaught SyntaxError: Unexpected token ':' Can you help me please?
{
"background": {
"persistent": true,
"scripts": [ "backgroundscript.js" ]
},
"description": "MY EXTENSION",
"manifest_version": 2,
"name": "MY EXTENSION",
"permissions": [ "webRequest", "webRequestBlocking", "*://www.mysite.com/*" ],
"version": "1.0"
}
chrome.webRequest.onBeforeRequest.addListener(
function(details) {
return {
redirectUrl: details.url +
(details.url.indexOf("?") == -1 ? "?" : "") +
(details.url.indexOf("¶m=XXX") == -1 ? ("¶m=XXX" : "")
};
},
{urls: ['*://*.mysite.com/*'], types: ['main_frame']},
['blocking']
);