Feature request: Providing a link to a JavaScript file to lint
unrealapex opened this issue · 4 comments
unrealapex commented
It would be nice to be able to provide a link to a file e.g https://www.example.com/script.js
for linting as an alternative to copying the contents of the file and pasting them into JSLint.
kaizhu256 commented
closing this feature-request as infeasible-at-moment since it would require a backend/external server to process cors-requests. jslint.com currently is a static website.
unrealapex commented
@kaizhu256 we could use an XMLHttpRequest to retrieve the content of webpages without the need of a server(works with static sites):
function reqListener () {
// set the value of the editor textarea to the response text
console.log(this.responseText);
}
var oReq = new XMLHttpRequest();
oReq.addEventListener("load", reqListener);
oReq.open("GET", "http://www.example.org/example.txt");
oReq.send();
kaizhu256 commented
unrealapex commented
I'm a little busy at the moment, when I get time, I'll verify it.