Home  >  Article  >  Web Front-end  >  Why do used to?

Why do used to?

PHPz
PHPzOriginal
2024-08-26 21:43:321116browse

Why do used to?

<script type='text/javascript'>
//<![CDATA[
var uri = window.location.toString();
if (uri.indexOf("/" + new Date().getFullYear() + "/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/1/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/1/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/12/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/12/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/11/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/11/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/10/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/10/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/9/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/9/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/8/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/8/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/7/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/7/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/6/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/6/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/5/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/5/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/4/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/4/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/3/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/3/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}
if (uri.indexOf("/" + new Date().getFullYear() + "/2/", "/")) {
    var clean_uri = uri.replace("/" + new Date().getFullYear() + "/2/", "/");
    window.history.replaceState({}, document.title, clean_uri);
}

//]]>
</script>

The above is the detailed content of Why do used to?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn