Created
August 3, 2015 18:50
-
-
Save Dillie-O/d9b2b0cbcdda385e44c5 to your computer and use it in GitHub Desktop.
Sitefinity Load Custom Scripts Only in Designer Mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script language="C#" runat="server"> | |
| protected void Page_PreRender(object sender, EventArgs e) | |
| { | |
| if (!Telerik.Sitefinity.Services.SystemManager.IsDesignMode) | |
| { | |
| var scriptManager = System.Web.UI.ScriptManager.GetCurrent(Page); | |
| if (scriptManager == null) return; | |
| scriptManager.Scripts.Add(new ScriptReference { Path = "https://maps.googleapis.com/maps/api/js?key=AIzaSyA2OGXl_YKdtBFvOSb7sxyGvf9ePBaipSA&v=3.exp&sensor=false" }); | |
| scriptManager.Scripts.Add(new ScriptReference { Path = "http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerwithlabel/1.1.9/markerwithlabel/src/markerwithlabel.js" }); | |
| scriptManager.Scripts.Add(new ScriptReference { Path = "~/Sitefinity/WebsiteTemplates/WAFD/js/vendor/bootstrap.min.js" }); | |
| scriptManager.Scripts.Add(new ScriptReference { Path = "~/Sitefinity/WebsiteTemplates/WAFD/js/vendor/modernizr-2.6.2.min.js" }); | |
| scriptManager.Scripts.Add(new ScriptReference { Path = "~/Sitefinity/WebsiteTemplates/WAFD/js/vendor/script.bottom.min.js" }); | |
| scriptManager.Scripts.Add(new ScriptReference { Path = "~/Sitefinity/WebsiteTemplates/WAFD/js/vendor/script.top.min.js" }); | |
| scriptManager.Scripts.Add(new ScriptReference { Path = "~/Sitefinity/WebsiteTemplates/WAFD/js/vendor/jquery.elastic.source.min.js" }); | |
| scriptManager.Scripts.Add(new ScriptReference { Path = "~/Sitefinity/WebsiteTemplates/WAFD/js/vendor/geoPosition.min.js" }); | |
| scriptManager.Scripts.Add(new ScriptReference { Path = "~/Sitefinity/WebsiteTemplates/WAFD/js/vendor/jquery.cookie.min.js" }); | |
| scriptManager.Scripts.Add(new ScriptReference { Path = "~/Sitefinity/WebsiteTemplates/WAFD/js/wafd-google-maps.min.js" }); | |
| scriptManager.Scripts.Add(new ScriptReference { Path = "~/Sitefinity/WebsiteTemplates/WAFD/js/conversation-form.js" }); | |
| scriptManager.Scripts.Add(new ScriptReference { Path = "~/Sitefinity/WebsiteTemplates/WAFD/js/scripts.min.js" }); | |
| } | |
| } | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment