Link and execute external JavaScript file hosted on GitHub

前端 未结 15 1052
感动是毒
感动是毒 2020-11-22 04:08

When I try to change the linked reference of a local JavaScript file to a GitHub raw version my test file stops working. The error is:

Refused to exe

15条回答
  •  执念已碎
    2020-11-22 04:12

    I found the error was shown due to the comments at the beginning of file , You can solve this issue , by simply creating your own file without comment and push to git, it shows no error

    For proof you can try these two file with same code of easy pagination :

    without comment

    with comment

提交回复
热议问题