script.js 파일
내용 확인하기
스크립트 파일 정리
(function($){
functiontabUI($ele){
$ele.each(function(){
var$this=$(this),
$list=$this.find(".tab-list"),
itemLength=$list.length;
if(itemLength>1){
$this.prepend("<h2></h2>");
$list.each(function(i){
$this.find(">h2").append('<ahref="#'+$(this).attr('id')+'">'+$(this).find("h2").text()+'</a>')
$(this).find("h2").remove();
});
$this.find("h2a").on("click",function(){
$list.hide();
$(this).addClass("current").siblings().removeClass("current");
$($(this).attr("href")).show();
returnfalse;
});
$this.find("a:first").click();
}
});
}
function commentControl(){
$(document).on("click",".area_reply.comment-listulli.author-meta.controlbutton",function(){
if($(this).siblings(".link").is(":hidden")){
$(".area_reply.link").removeAttr("style");
$(this).siblings(".link").show();
}else{
$(this).siblings(".link").hide();
}
});
$(document).on("keyup", function(e){
if(e.keyCode=='27'){
$(".comment-listulli.author-meta.control.link").removeAttr("style");
}
});
}
functionpostCover(){
var$postCover=$(".list_item");
if(!$postCover.length){
$("body").addClass("list_item_hide")
}
}
//Execute
commentControl();
if($("#tt-body-page").length)postCover();
})(jQuery);
Details 자바 스크립트
window.addEventListener('DOMContentLoaded', function(){
document.querySelectorAll('details').forEach(function(item){
item.addEventListener("toggle",event=>{
lettoggled=event.target;
if (toggled.attributes.open) {
document.querySelectorAll('details[open]').forEach(function(opened){
if(toggled != opened)
opened.removeAttribute('open');
});
}
})
});
});
티스토리 시작 제거 스크립트
$(window).on('load', function() {
vartRateBtn=document.querySelector("#rate_btn_rateus");
vareditEntry=document.querySelector('#editEntry');
varlbEl=document.querySelector(".lb-cancel");
varpageEl=document.querySelectorAll('.paginationa:not([href])');
if(tRateBtn){
tRateBtn.setAttribute("rel","noopenernoreferer");
}
if(lbEl){
lbEl.setAttribute('href','javascript:;');
}
if(pageEl){
Array.from(pageEl).map(function(el){
returnel.setAttribute('href','javascript:;');
});
}
if(editEntry){
editEntry.setAttribute('title','editEntry');
}
});