Skip to content

Instantly share code, notes, and snippets.

@gdakram
Created September 14, 2012 18:01
Show Gist options
  • Save gdakram/3723575 to your computer and use it in GitHub Desktop.
Save gdakram/3723575 to your computer and use it in GitHub Desktop.
Disable loader from fetching a skinnable module's assets from YUI's CDN, while on HTTPS.
<script>
var YUI_config = {
skin : {
overrides : {
"widget" : []
}
}
};
</script>
<!-- Includes YUI Seed file and all the widget dependent modules. -->
<script src="https://dl.dropbox.com/u/73213/nfl/s-widget.js"></script>
<script>
// if skin loading isn't disabled per the YUI_config setting above,
// loader will make a request to fetch the widget-base css file
// http://yui.yahooapis.com/combo?3.6.0/build/widget-base/assets/skins/sam/widget-base.css
// So... load the stylesheet separately.
YUI().use("widget", function(){
document.write("am using widget module.");
});
</script>
<!-- Includes YUI Seed file and all the widget dependent modules. -->
<script src="https://dl.dropbox.com/u/73213/nfl/s-widget.js"></script>
<script>
// if skin loading isn't disabled per the YUI_config setting above,
// loader will make a request to fetch the widget-base css file
// http://yui.yahooapis.com/combo?3.6.0/build/widget-base/assets/skins/sam/widget-base.css
// So... load the stylesheet separately.
YUI({
skin : {
overrides : {
"widget" : []
}
}
}).use("widget", function(){
document.write("am using widget module.");
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment