Closed paudsu01 closed 11 months ago
@sumanchapai, The browser extension folder will need to be a standalone folder once uploaded to the web store. However, since it will need access to the data files in the root directory, should I move the data folder inside the browser_extension folder and create a symlink from the root directory data to the data folder inside the browser extension ?. Please look at chrome-extension branch if necessary
I think that symlink only works for local systems for example inside your computer, not well in with git
. I think there are a couple options:
In either case, here are some tips (assuming that the extension shows the today's nepali date and the event details for today, and in phase 2 something like future and past events ):
js
. Don't forget to write tests!1). I think sending an API request would just work fine. Rather than storing data for future use, we can store the current data after the API request is made on popup (after the user clicks the extension). The data persists as long as the extension popup is open. This would however also mean making a request every time the user opens the extension.
2). For the current Nepali date and time. I have found a GitHub repo: Nepali-date. We can just it as CDN in our index.html and use that to convert the dates. Would that work @sumanchapai ? However, if we don't want to increase our dependencies, I can write a date converter function which shouldn't be that hard.
Lets implement it for now like the way you suggested for 1. and 2.
The pro and con for 1. are:
pro:
con:
For 2. dependency is a problem, but not right now. So lets use the package you suggested.
@sumanchapai I have pushed the changes to the chrome-extension branch. Please review the changes
For 1). It makes an API request and it should work fine for now. For 2) I have written a date converter instead of relying on a dependency. However, there needs to be tests written for the date converter js file.
The next steps would now be publishing the extension to the chrome store if the pull request gets approved.
Create a browser extension for patro.