作者:jytujtuyt | 来源:互联网 | 2023-05-19 11:57
I have a github.com demo page that is linking to https://raw.github.com/.../master/.../file.js so that I don't need to always copy the .js
file over to the gh-pages
branch every time it's changed. This works in every browser except IE which complains:
我有一个github.com的演示页面,链接到https://raw.github.com/./master/master/.file.js,这样我就不需要每次更改时都将.js文件复制到gh-pages分支。这适用于除IE外的所有浏览器:
SEC7112: Script from https://raw.github.com/cwolves/jQuery-iMask/master/dist/jquery-imask-min.js was blocked due to mime type mismatch
SEC7112:来自https://raw.github.com/cwolves/jQuery-iMask/master/dist/jquery-imask-min.js的脚本由于mime类型不匹配而被阻塞
This complaint is coming from the fact that the file is transferred with:
这项投诉是由于该文件是用下列方式传送的:
X-Content-Type-Options: nosniff
Content-Type: text/plain
which I can't change.
我不能改变。
Anyone have any ideas how to accomplish this same thing? Somehow allowing me to link to the file in the master
branch without having to always push it to the gh-pages
branch?
有人知道怎么做同样的事情吗?不知怎么的,让我可以链接到主分支的文件,而不必总是把它推到ghpage分支上?
Actual page: http://cwolves.github.com/jQuery-iMask/
实际页面:http://cwolves.github.com/jQuery-iMask/。
(Minor update -- I changed the gh-pages in this exact instance to include the .js file, so IE is no longer broken, but would still like any feedback :))
(小更新——我在这个实例中更改了ghl页面,以包含.js文件,所以IE不再被破坏,但仍然会像任何反馈一样:)
5 个解决方案