I’m writing a chrome extension that do some simple stuff. now, I made a .txt file that hold some url’s, and stored it in the same directory, the .js file that hold the logic, to read from him and write to him (which I will create when I know how too).
the problem is, I didn’t find any info about accessing file with javascript.
so I thought maybe is not possible?
-
the extension will not be upload the chrome store, so it will be working only on my PC.
-
if is not possible, can you recommend me for a different way to achieve this?
chrome.*API does not provide any methods to perform file I\O. However, it allows you to read\write data usingchrome.storageAPI, or using more old-fashionedchrome.cookiesAPI. I recommend to usechrome.storageto achieve your goal.