用户:自由李代数/common.js:修订间差异

无编辑摘要
无编辑摘要
标签移动版编辑 移动版网页编辑
无编辑摘要
标签移动版编辑 移动版网页编辑
第4行: 第4行:
/* preload-code */
/* preload-code */
function getTitle() {
function getTitle() {
     var url = document.querySelector('#ca-view a').getAttribute('href');
     try {
    return url.slice(url.indexOf('/wiki/')+6);
        var url = document.querySelector('#ca-view a').getAttribute('href');
        return url.slice(url.indexOf('/wiki/')+6);
    }
    catch {
        return document.URL.slice(document.URL.indexOf('/wiki/') + 6);
    }
}
}