Hướng Dẫn Xóa ?m=1 Trên Thanh Địa Chỉ cho blogspot

Khi bạn vào một trang web (nền tảng blogger) nào đó trên mobile thì hãy để ý trên thanh địa chỉ nó sẽ có thêm đoạn ?m=1, có bao giờ bạn nghĩ trong đầu làm thế nào để xóa dòng chữ này chưa ?

CÁC BƯỚC THỰC HIỆN

Bước 1: Đầu tiên bạn vào trang quản trị blogger – Chủ đề – chỉnh sửa HTML.
Bước 2: Ctrl + F tìm thẻ </head> và dán code phía dưới lên trên nó. (code này mình trích từ một blog nước ngoài)

<script>/*<![CDATA[*/ var uri = window.location.toString(); if (uri.indexOf("%3D","%3D") > 0) { var clean_uri = uri.substring(0, uri.indexOf("%3D")); window.history.replaceState({}, document.title, clean_uri);} var uri = window.location.toString(); if (uri.indexOf("%3D%3D","%3D%3D") > 0) { var clean_uri = uri.substring(0, uri.indexOf("%3D%3D")); window.history.replaceState({}, document.title, clean_uri);} 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); } 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);}; var protocol=window.location.protocol.replace(/\:/g,''); if(protocol=='http'){ var url=window.location.href.replace('http','https'); window.location.replace(url);} /*]]>*/</script>

Bước 3: Lưu lại chủ đề và tận hưởng thành quả.
Thủ thuật chỉ đơn giản thế thôi.

Leave a Reply

Your email address will not be published. Required fields are marked *