Last active
September 14, 2021 06:29
-
-
Save jaikt/c3b1de40ffb610c07cd61705d7de60b6 to your computer and use it in GitHub Desktop.
How To Remove ?M=1 From URL Blogger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type='text/javascript'> | |
//<![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); | |
} | |
//]]> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment