Skip to content

Tag: javascript

How to find and replace a string in Javascript? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago. Improve this question How can I find a specific word in a string then replace it using javascrip…

How do I fetch JSON data with Vue and Axios

I’m trying to fetch product data from a JSON file, but can’t get it to work. I’ve tried several things and searched the internet for a solution but none of the examples on the internet equals my situation. I’m new to both vue and axios, so please excuse my ignorance. This is what I hav…

npx webpack command cannot find module webpack.config.js

I’m following the official Webpack getting started guide and I get an error on the Using a Configuration section. It says to create a webpack.config.js file with: I then run the following command: npx webpack –config webpack.config.js The error I get is: Cannot find module ‘/Users/Documents/…

Chrome extension getSelection not working

I am trying to create a chrome extension which only consist of a button. When this button is clicked, it should make an alert box which contains the highlighted textarea on a page. I can’t get it to work. I can make it alert a hardcoded string, but not make it alert some highlighted text / selected text…