2

I'm working on an extension for Chrome that uses an RSS parser, however I have used several different methods and I keep getting the error: "XMLHttpRequest cannot load Example.rss. Origin chrome extension://djhppbppokfmldecpcfbcmchagimpmpc is not allowed by Access-Control-Allow-Origin."

Tried using the AJAX feed and jFeed methods in the first answer below but neither worked for me.

How to parse an RSS feed using JavaScript?

Here's my JavaScript function:

   jQuery.getFeed({
   url: 'http://example.rss',
   success: function(feed) {
       alert(feed.title);
   }});

My Manifest.JSON looks like

"manifest_version": 2,
"version": "1.0",
"permissions": ["http://*/", "tabs"],

Any help would be greatly appreciated.

Community
  • 1
  • 1
  • What is the url for the feed? Try adding a `*` to the end of `http://*/` so that it becomes `http://*/*`. – BeardFist Mar 14 '13 at 06:35

2 Answers2

0

You need to add CSP in your manifest. Something like this line, but change example.com to your feed:

content_security_policy": "script-src 'self' https://example.com; object-src 'self'

For more read this: CSP in Chrome extensions

Ido Green
  • 2,795
  • 1
  • 17
  • 26
0

Your specified host permission is missing a path.

Change http://*/ to http://*/*

For more info, see the chrome documentation on match patterns.

BeardFist
  • 8,031
  • 3
  • 35
  • 40