地味に気になるutmをリンクから消すjs(jQ)
function editHref(){
document.querySelectorAll("a").forEach(function(element){
element.href = element.href.replace(/utm_.*&*/g, '').replace(/\/\?$/g, '/');
});
}
$(document).ready(function(){$(window).on('hashchange', editHref);});
$(document).ready(function(){$(window).on('load', editHref);});
Conversation
Notices
-
TacosTea (tacostea@don.tacostea.net)'s status on Wednesday, 22-Aug-2018 22:10:38 JST
TacosTea
-
TacosTea (tacostea@don.tacostea.net)'s status on Wednesday, 22-Aug-2018 22:11:33 JST
TacosTea
リンク全部追いかけるので若干重いし、無駄も多そう
-