Created
June 17, 2015 21:08
-
-
Save freshout-dev/7979091b9a4d43883375 to your computer and use it in GitHub Desktop.
This file contains 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
<!--Custom code for DISH Sites begins --> | |
<!--To hide the menu until its ready --> | |
<style> | |
#section_843a4cf9089dd8b0fbe85b4b73acb69a>div { | |
visibility:hidden; | |
} | |
</style> | |
<script> | |
$( document ).ready(function() { | |
// Adding the sproutloud iframe for testimonials | |
$( ".breezi-app-bdc7dad6ff4418f34e4951fc>div>div>ul>li:nth-child(6)>.content>div" ).append( "<iframe src='http://empowerkit.s3.amazonaws.com/dish/testimonials.htm' frameborder='0' width='100%' height='700px'>"); | |
$(".header-01>.container>.section-01>.container").css({"margin-top": "-2px"}); | |
$(".header>div").css({"margin-bottom": "-2px"}); | |
// Making the header and nav area 100% width and responsive | |
$("#section_843a4cf9089dd8b0fbe85b4b73acb69a>div").css({"width": "100%"}); | |
$("#section_843a4cf9089dd8b0fbe85b4b73acb69a>div>div:nth-child(4)").css({"width": $( window ).width()-890}); | |
$("#section_843a4cf9089dd8b0fbe85b4b73acb69a>div>div:nth-child(5)").css({"width": "200px"}); | |
$("#section_843a4cf9089dd8b0fbe85b4b73acb69a>div>div:nth-child(6)").css({"width": "145px"}); | |
$("#section_843a4cf9089dd8b0fbe85b4b73acb69a>div>div:nth-child(7)").css({"width": "107px"}); | |
$("h6>span:contains('$')").css({"text-decoration": "line-through", "font-weight": "bold"}); | |
// Making the header again visible now that we're done | |
$("#section_843a4cf9089dd8b0fbe85b4b73acb69a>div").css({"visibility": "visible"}); | |
// Cleanup rules for each page begin... | |
// Rules set 1 | |
if (window.location.pathname == '/international-packages' || window.location.pathname == '/latino-packages' || window.location.pathname == '/english-packages') { | |
$(".body>div>div>div>div>div").css({"width": "100%"}); | |
// Only apply when NOT in mobile device | |
var window_size = $(window).width(); | |
if (window_size>550) { | |
$(".body>div>div>div>div>div>div:nth-child(1)").css({"width": $( window ).width()-408}); | |
$(".body>div>div>div>div>div>div:nth-child(2)").css({"width":"118px"}); | |
$(".body>div>div>div>div>div>div:nth-child(3)").css({"width":"290px"}); | |
} | |
else { | |
$("tr").css({"vertical-align": "top","border-bottom":"20px solid transparent"}); | |
$("td").css({"padding-right":"10px"}); | |
} | |
} | |
// Rules set 2 | |
if(window.location.pathname == '/premium'){ | |
$(".body>div>div>div>div>div").not( "#section_08266272405162454>div, #section_033796540601179004>div, #section_04545581126585603>div, #section_05363807540852576>div ").css({"width": "100%"}); | |
// Only apply when NOT in mobile device | |
var window_size = $(window).width(); | |
if (window_size>550) { | |
$(".body>div>div>div>div>div>div:nth-child(1)").not( "#section_08266272405162454>div>div, #section_033796540601179004>div>div, #section_04545581126585603>div>div, #section_05363807540852576>div>div ").css({"width": $( window ).width()-290}); | |
$(".body>div>div>div>div>div>div:nth-child(2)").not( "#section_08266272405162454>div>div, #section_033796540601179004>div>div, #section_04545581126585603>div>div, #section_05363807540852576>div>div ").css({"width":"290px"}); | |
} | |
else { | |
$("tr").css({"vertical-align": "top","border-bottom":"20px solid transparent"}); | |
$("td").css({"padding-right":"10px"}); | |
} | |
} | |
// Rules set 3 | |
if(window.location.pathname == '/sports'){ | |
$(".body>div>div>div>div>div").not( "#section_08266272405162454>div, #section_033796540601179004>div, #section_04545581126585603>div, #section_05363807540852576>div ").css({"width": "100%"}); | |
// Only apply when NOT in mobile device | |
var window_size = $(window).width(); | |
if (window_size>550) { | |
$(".body>div>div>div>div>div>div:nth-child(1)").not( "#section_08266272405162454>div>div, #section_033796540601179004>div>div, #section_04545581126585603>div>div, #section_05363807540852576>div>div ").css({"width": $( window ).width()-290}); | |
$(".body>div>div>div>div>div>div:nth-child(2)").not( "#section_08266272405162454>div>div, #section_033796540601179004>div>div, #section_04545581126585603>div>div, #section_05363807540852576>div>div ").css({"width":"290px"}); | |
} | |
else { | |
$("tr").css({"vertical-align": "top","border-bottom":"20px solid transparent"}); | |
$("td").css({"padding-right":"10px"}); | |
} | |
} | |
// Rules set 4 | |
if(window.location.pathname == '/international-add-on'){ | |
$(".body>div>div>div>div>div").not( "#section_08266272405162454>div, #section_033796540601179004>div, #section_04545581126585603>div, #section_05363807540852576>div ").css({"width": "100%"}); | |
// Only apply when NOT in mobile device | |
var window_size = $(window).width(); | |
if (window_size>550) { | |
$(".body>div>div>div>div>div>div:nth-child(1)").not( "#section_08266272405162454>div>div, #section_033796540601179004>div>div, #section_04545581126585603>div>div, #section_05363807540852576>div>div ").css({"width": $( window ).width()-290}); | |
$(".body>div>div>div>div>div>div:nth-child(2)").not( "#section_08266272405162454>div>div, #section_033796540601179004>div>div, #section_04545581126585603>div>div, #section_05363807540852576>div>div ").css({"width":"290px"}); | |
} | |
} | |
// Rules set 5 | |
if(window.location.pathname == '/dishnet'){ | |
$(".body>div>div>div>div>div").not( "#section_03183865451719612>div, #section_042412680201232433>div").css({"width": "100%"}); | |
$("#section_042412680201232433>div>div>div>div>div>div>div>.app-container").css({"height": "470px", "padding-bottom":"10px"}); | |
// Only apply when NOT in mobile device | |
var window_size = $(window).width(); | |
if (window_size>550) { | |
$(".body>div>div>div>div>div>div:nth-child(2)").not( "#section_03183865451719612>div>div, #section_042412680201232433>div>div").css({"width": $( window ).width()-455}); | |
$(".body>div>div>div>div>div>div:nth-child(3)").not( "#section_03183865451719612>div>div, #section_042412680201232433>div>div").css({"width":"324px"}); | |
} | |
// Rules set 6 | |
} | |
if(window.location.pathname == '/dish-anywhere'){ | |
$("#section_042412680201232433>div>div>div>div>div>div>div>.app-container").css({"height": "470px", "padding-bottom":"10px"}); | |
} | |
// Only apply when NOT in mobile device | |
}); | |
$(window).resize(function() { | |
$("#section_843a4cf9089dd8b0fbe85b4b73acb69a>div>div:nth-child(4)").css({"width": $( window ).width()-890}); | |
}); | |
</script> | |
<script> | |
// Mobile cleanup rules | |
$(document).ready(function() { | |
setTimeout(function() { | |
var window_size = $(window).width(); | |
if (window_size<550) { | |
$("#section_843a4cf9089dd8b0fbe85b4b73acb69a>div>div:nth-child(5)").css({"width":"100%"}); | |
$("#section_843a4cf9089dd8b0fbe85b4b73acb69a>div>div:nth-child(6)").css({"width":"100%","padding-top":"10px","padding-bottom":"10px"}); | |
$("#section_843a4cf9089dd8b0fbe85b4b73acb69a>div>div:nth-child(2)").css({"width":"100%","float":"right","padding-bottom":"10px"}); | |
$("#section_843a4cf9089dd8b0fbe85b4b73acb69a>div>div:nth-child(1)").css({"width":"100%"}); | |
$(".eac3e564c99a1f1c7997cdac>div>div>div>div>div>div>div>div>div>div>h3").css({"text-align":"center"}); | |
$("#section_843a4cf9089dd8b0fbe85b4b73acb69a>div>div:nth-child(7)").css({"width":"100%","padding-bottom":"10px"}); | |
$("#section_843a4cf9089dd8b0fbe85b4b73acb69a>div>div:nth-child(3)").css({"padding-bottom":"10px"}); | |
$("#section_843a4cf9089dd8b0fbe85b4b73acb69a>div>div:nth-child(4)").css({"width":"100%"}); | |
$("#container_09001039704307914").css({"background-image":"url(http://empowerkit.s3.amazonaws.com/dish/orange.jpg)"}); | |
}}, 100); | |
}); | |
// Reload the page when they change orientation because of some of the apps don't refresh properly | |
window.onorientationchange = function() | |
{ | |
window.location.reload(); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment