Hướng dẫn xóa ?m=1 trên thanh địa chỉ Blogger
Bước 1: Đăng nhập vào trang quản trị Blogger ⇒ Chọn Chủ đề ⇒ Chỉnh sửa HTML.Bước 2: Ctrl + F tìm thẻ </body> và dán code phía dưới lên trên nó.
Bước 3: Lưu lại chủ đề và tận hưởng thành quả.<script>//<![CDATA[var uri = window.location.toString();if (uri.indexOf("?m=1","?m=1") > 0) {var clean_uri = uri.substring(0, uri.indexOf("?m=1"));window.history.replaceState({}, document.title, clean_uri);}//]]></script>
Lời kết
Với thủ thuật nhỏ này hy vọng sẽ giúp blog của các bạn chuyên nghiệp hơn mà không ảnh hưởng hay tốn công sức gì nhiều.
Dùng cái này đến khi comment trên mobile xong nó ko hiện ra đúng comment đó mà nhảy lên đầu trang
Trả lờiXóaa nói em mới để ý luôn á
XóaXử lý đc ko e :D
Xóaa xài đoạn này thử
Xóa<script>//<![CDATA[
window.addEventListener('load',function(){
if(navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|Windows Phone|webOS)/i)===null){
var url=window.location.href,
uri=window.location.toString(),
m1=url.substring(0,url.indexOf('?m=1')),
m2=url.substring(0,url.indexOf('&m=1')),
_a=document.querySelectorAll('a')
if((uri.length-m1.length)>0) window.history.replaceState({},document.title,m1)
if((uri.length-m2.length)>0) window.history.replaceState({},document.title,m2)
for(var i=0;i<_a.length;i++){
var _b=_a[i].getAttribute('href')
if(_b.indexOf('?m=1')!=-1) _a[i].setAttribute('href',_b.substr(0,_b.indexOf('?m=1')))
if(_b.indexOf('&m=1')!=-1) _a[i].setAttribute('href',_b.substr(0,_b.indexOf('&m=1')))
}
}
})
//]]></script>