javascript - How to read a js script file from cjs chrome extension -


i installed google chrome extension cjs (custom javascript website).

the script working fine if writting script inside cjs editor:

enter image description here

i wrote script in js file , put in iis following:

  • open iis manager
  • right-click default web site
  • add application
  • alias = googlescript
  • physical path: c:\scripts\google (for example)
  • i created googlescript.js file , saved in c:\scripts\google. content of file is: alert("google");
  • i clicked on connect , select application user (pass-through authentication)
  • i opened default document located in googlescript (in iis) , add new default document named: googlescript.js
  • when right-click on googlescript , select manage application->browse, new web page being opened script wrote. url of page http://localhost/googlescript/
  • now cjs extension, instead of alert("google"); wrote //localhost/googlescript/googlescript.js;.

enter image description here

when calling script file, alert not working anymore. correct way call script file cjs chrome extension?

read

before proceeding...


i created small weave can use experiment idea application/extension.

now 1 way grab , save external scripts source online.

var download_to_textbox = function (url, el) {       return $.get(url, null, function (data) {         el.val(data)       }, "text")     }; 

grab script source code , add textarea

download_to_textbox('libraries/alertifyjs/css/alertify.min.css', $('.alertifyjs1')); 

save file using filesaver.js - https://github.com/eligrey/filesaver.js/

var blob = new blob([ $('.alertifyjs1').val() ], {type: "text/html"}); saveas(blob, "alertify.min.css"); 

Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -