mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-30 10:52:45 +00:00
18 lines
534 B
JavaScript
18 lines
534 B
JavaScript
---
|
|
---
|
|
{% if site.suffix %}
|
|
if(!String.prototype.endsWith) {
|
|
String.prototype.endsWith = function (ending) {
|
|
if(typeof ending !== 'string') return false;
|
|
if(!ending) return true;
|
|
return this.slice(-ending.length) === ending;
|
|
};
|
|
}
|
|
if(!document.location.hostname.endsWith('{{ site.suffix }}') &&
|
|
!document.location.hostname.endsWith('{{ site.suffix }}.')){
|
|
document.title = document.title.replace(/(清华)|(tsinghua)|(tuna)/gi, '');
|
|
$().ready(() => {
|
|
$(document.body).addClass('nonthu');
|
|
})
|
|
}
|
|
{% endif %} |