Created
August 24, 2019 08:02
-
-
Save quanhua92/52e6a30980b67768060cb6237bffcc5c to your computer and use it in GitHub Desktop.
playerduo hamtruyentv
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
function scroll_to(pos){ | |
$('html,body').animate({ scrollTop: pos }, 'fast'); | |
} | |
function scroll_and_grid(current){ | |
scroll_to(9999999); grid(false); | |
if(current > 0){ | |
scroll_and_grid(current - 1); | |
} else { | |
scroll_to(0); | |
} | |
} | |
function grid(should_scroll=true){ | |
if(should_scroll == true){ | |
scroll_to(0); | |
} | |
elements = $(".articles-section"); | |
tags = ["header-articles", "content-articles"]; | |
for(var i in elements){ | |
if (elements[i].style != undefined){ | |
elements[i].style.display = "block"; | |
elements[i].style.width = "200px"; | |
elements[i].style.height = "200px"; | |
for(child_idx in elements[i].children){ | |
child = elements[i].children[child_idx]; | |
if (!tags.includes(child.className) && child.style != undefined){ | |
child.style.display = "none"; | |
} | |
if (child.className == "content-articles"){ | |
title = child.children[0].children[0]; | |
if( title != undefined){ | |
title_str = title.innerHTML; | |
if (title_str.includes("Chap")){ | |
title.style.color = "red"; | |
title.style.fontWeight = "bold"; | |
} | |
} | |
} | |
} | |
} | |
} | |
return 1; | |
} | |
function hide(){ | |
columns = $(".col-md-3"); | |
for(var i in columns){ | |
if(columns[i].style != undefined){ | |
columns[i].style.display = "none"; | |
} | |
} | |
$(".col-md-6")[0].setAttribute("class", "col-md-12"); | |
} | |
scroll_and_grid(10); | |
setTimeout(grid, 5000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment