我将沙盒解决方案部署到具有CustomAction
设置的Sharepoint 2013网站,以在每个页面上包含我的javascript文件,如下所示:
<CustomAction ScriptSrc="MyScriptUrl.js" Location="ScriptLink" Sequence="10000">
这样可以在页面呈现的所有页面上正常工作,并且包含我的脚本链接:
...
<script type="text/javascript" src="/_layouts/15/1033/initstrings.js?rev=uNmvBiHdrBzcPQzXRpm%2FnQ%3D%3D"></script>
<script type="text/javascript" src="/_layouts/15/clienttemplates.js?rev=vtrc0n3sjgxKB4WQrCEeaA%3D%3D"></script>
<script type="text/javascript" src="/_layouts/MyApp/MyScriptUrl.js"></script>
...
但是在主页(start.aspx)上我的链接丢失了,js包含的内容完全不同:
...
<script type="text/javascript" src="/_layouts/15/init.js?rev=zwpf9CD1m7am6imImmQglQ%3D%3D"></script>
<script type="text/javascript" src="/ScriptResource.axd?d=nnhGXhlC0O1qfk6HXinkGyT_1TJisFpYK2ABJoGzI-IJfbkEQ8O-FNAr_1TgMft0D4TC2OewVZXiRooP_-SU74hHHu0AiGA4sSA3rrm1cvMqv3QRvFv8PafLyLDxWfN1O4qPFJXWfAf3avBHVS0HiXP55em_jNSsNMvRj1GJO4rjzyxg1vBi7IfXVHSWNBK60&t=6119e399"></script>
<script type="text/javascript" src="/_layouts/15/blank.js?rev=ZaOXZEobVwykPO9g8hq%2F8A%3D%3D"></script>
...
(注意:当然有更多的JS文件,但我只是想表明有不同的包含)
我做错了什么?