first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
class VoidInfo{
constructor(){
this.getVoidInfo();
}
async getVoidInfo(){
let video=document.querySelector('.header video');
let h2=document.querySelector('.content h2');
let p=document.querySelector('.content p');
video.src=getUrlSearch('vid');
h2.innerHTML=getUrlSearch('tid');
p.innerHTML=getUrlSearch('inif');
}
}
new VoidInfo();
function getUrlSearch(name) {
        if (!name) return null;
        var after = window.location.search;
        after = after.substr(1) || window.location.hash.split('?')[1];
        if (!after) return null;
        if (after.indexOf(name) === -1) return null;
        var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)');
        var r = decodeURI(after).match(reg);
        if (!r) return null;
        return r[2];
    }