Skip to content

Instantly share code, notes, and snippets.

@devbug
Last active July 28, 2018 00:21
Show Gist options
  • Save devbug/cec1f7326a14e7faaf047945c732408f to your computer and use it in GitHub Desktop.
Save devbug/cec1f7326a14e7faaf047945c732408f to your computer and use it in GitHub Desktop.
Mnet PRODUCE48 홈페이지에 소소하게 '내 픽만 보기' 추가 (개발자 콘솔에 붙여넣기 ㄱㄱ)
myPicksOnly = function() {
var isMyPicksOnly = $('#myPick').is(":checked") || false;
if (!isMyPicksOnly) {
$('.sorting a.selected').click();
return;
}
var html = '';
picks = $('.tranieeList li.selected');
if (picks.length > 0) {
html += '<ul>';
picks.each(function(){
html += $(this).wrap('<p/>').parent().html();
});
html += '</ul>';
}
$('.tranieeList').html(html);
};
$('.sorting').append('<div class="ckEtc"><label for="myPick"><input id="myPick" name="myPick" onclick="javascript:myPicksOnly();" type="checkbox">내 픽만 보기</label></div>');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment