I installed Google chrome extension cjs (Custom JavaScript for Website).
The script is working fine if I am writting the script inside the cjs editor:
I wrote the script in a js file and put it in my IIS as following:
- Open IIS Manager
- Right-click Default Web Site
- Add Application
- Alias = googleScript
- Physical path: C:\scripts\google (for example)
- I created a googleScript.js file and saved it in C:\scripts\google. The content of the file is: alert("Google");
- I clicked on Connect As and select Application user (pass-through authentication)
- I opened the Default Document located in the googleScript (in IIS) and Add a new Default Document named: googleScript.js
- When I right-click on googleScript and select Manage Application->Browse, a new web page is being opened with the script I wrote. THe url of the page is http://localhost/googleScript/
- Now back to cjs extension, instead of alert("Google"); I wrote //localhost/googleScript/googleScript.js;.
When calling the script file, the alert is not working anymore. WHat is the correct way to call a script file from cjs chrome extension?