Chrome blocking Ajax calls to approved domains

As I embark on creating my very first Chrome extension, it's a rather straightforward one involving some ajax calls.

The structure of my manifest file is quite basic:

{
    "name": "Read It Now",
    "version": "0.12",
    "description": "Read it now.",
    "permissions": [
                    "https://readitlaterlist.com"
                   ],
  "app": {
      "launch": {
          "local_path": "index.html"
      }
  }
}

To retrieve simple data using jQuery, I'm making requests to a URL like this:

https://readitlaterlist.com/v2/get?state=unread&count=10&apikey=xxx&username=yyy&password=zzz

Unfortunately, Chrome consistently denies the request with the following error message:

XMLHttpRequest cannot load . Origin chrome-extension://cdfeahailioembamnjnikbiemengfgpp is not allowed by Access-Control-Allow-Origin.

Answer №1

To resolve the issue, make sure to include the path in your URL match pattern. Using "https://readitlaterlist.com/*" should address the problem you're facing.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Guide to emphasize the active navigation tab in a particular scenario

Utilizing this template for JavaScript to choose the appropriate navigation using JQuery, with reference to this API. Snippet of my current code: index.php <html> <head> <title>ChillSpot Alpha 1.2.3</title> &l ...

Using AJAX to refresh a div upon submitting a form, instead of reloading the entire page

My SQL database generates a table that remains hidden until the search button is clicked to display the results. I want to use ajax to update the table without refreshing the entire page. Currently, when the page refreshes, the table reverts back to being ...

handling component interaction with react-redux store

Currently, I am in the process of developing my first significant project using react-redux. While trying to establish state mapping between components in react-redux, I seem to have missed a crucial step. Almost everything is functioning smoothly except ...

Securing nested access tokens in JavaScript: Best practices

FB.api({user-id}, { "fields":"context", "access_token": anAccessToken }, function (response) { console.log(response); }) I am currently retrieving mutual friends using the context parameter. However, I need to provide b ...

Exploring the directories: bundles, lib, lib-esm, and iife

As some libraries/frameworks prepare the application for publishing, they create a specific folder structure within the 'dist' directory including folders such as 'bundles', 'lib', 'lib-esm', and 'iife'. T ...

I'm struggling to get JavaScript to copy my string exactly how I need it to

Running JavaScript in a Django app, I am receiving a list from my views.py and need to extract the image URL. The first line of code successfully fetches the image URL, which is displayed correctly in the console log: pictures/logo.png However, the issue ...

Challenges with scrolling on flatlists in iOS

My FlatList component on iOS is only scrolling with a 3 finger scroll. I suspect that the TouchableOpacity button in each item may be causing the issue. How can I make it scroll with just a 1 finger motion? Here's the code snippet: <FlatList ...

Converting an ajax request to CORS

Would appreciate some guidance on accessing an API through my localhost using the code below: $.ajax({ url: "http://domain.xxx.net/api/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d7a3b8bcb2b9a4f9bda4b8b9e8b2ba ...

I am experiencing difficulties with my jQuery animation function as it does not seem to be functioning properly despite successful

Can someone knowledgeable in jQuery and JavaScript please help me understand why this code isn't functioning as expected? The goal is for the image with the id "previmage" to expand and then shrink when the changeclass function is triggered. However ...

Troubleshooting Layout Transition Problems in Nuxt 3

Encountering a challenge with route transitions while selectively disabling layouts on specific pages. Within the app.vue, there's a <NuxtPage /> wrapped in default <NuxtLayout /> containing header and footer elements. The 'About&apos ...

Struggling to submit sample applications on React JS due to an error that keeps popping up while creating an Apply Now Page

I've encountered an issue with my website project. I'm currently working on creating an "Apply Now" page for users to submit applications on my site. However, I'm facing a problem when trying to connect the front end to the back end as I kee ...

Error copying cell width attribute when using border collapse

Currently, I am attempting to duplicate a table header by copying the tr HTML and then replicating the th widths. Unfortunately, this method is unsuccessful as the widths are displayed as (width minus W) pixels when border: 'Wpx' and border-colla ...

Exploring JSON data in JavaScript

In my Json data, I have a nested structure of folders and files. My goal is to determine the number of files in a specific folder and its sub-folders based on the folder's ID. Below is an example of the JSON dataset: var jsonStr = { "hierarchy": ...

What is the best way to retrieve the latest date from an array of objects?

I had an array of objects where each object contained startDate, endDate, ownerID, and ownerType. To get the documents, I used the following statement: var yesterdayDate = new Date(); yesterdayDate.setDate(yesterdayDate.getDate() - 1); var next30daysDate ...

Implementing AngularJS JSON Data into SQL Database

Currently, I am in the process of developing an application that utilizes WebAPI and AngularJS for searching data from a SQL table. The retrieved data is then displayed on a webpage where users can select multiple rows to be inserted into a separate JSON a ...

Replacing text using regex results in whitespace

How can I eliminate text and spaces? For instance: http://www.exampleweb.com/myprogram.rar http://www.examplebackup.com/mybackups.rar http://www.exampleweb.com/myprogram1.rar I have used something similar to remove the second line: http://www.exampleba ...

CORS policy blocked Deepl API request

For the past few months, I successfully integrated Deepl API into our Web CRM. However, things took a turn a few days ago. I can't pinpoint exactly when, but it might have been since the start of the new year. Now, every request is being blocked by s ...

Retrieving the content of a component tag in Vue

Recently, I've been experimenting with Vue and I'm interested in achieving the following: <snippet name="Select From Table"> SELECT * FROM database.table </snippet> I want to create a link that, when clicked, triggers a ...

Proper method for implementing an external component on a webpage using the Vue.js 3 CDN

As a developer working with ASL.NET Core, I have been exploring the integration of vuejs to build intricate forms. To familiarize myself with Vue.js components, I have been creating static HTML files as examples. One such example can be seen below: <!DO ...

manipulating elements of an array within a .map method

i am stuck with a json exporting database. it generates json data in the following format. {"Drinks":[ { "name":"name", "discription":"discription", "image":"image", "ingredients&qu ...