init
This commit is contained in:
parent
6e9e14a817
commit
b3790d663b
1 changed files with 12 additions and 3 deletions
15
content.js
15
content.js
|
|
@ -20,8 +20,7 @@ function random(arr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function elStyle(width, height) {
|
function elStyle(width, height) {
|
||||||
return `display:block;width:${width}px;height:${height}px;object-fit:cover;pointer-events:none;`;
|
return `display:block;width:${width}px;height:${height}px;object-fit:cover;pointer-events:none;z-index:0;position:relative;`;
|
||||||
// return `display:block;width:100%;height:100%;object-fit:cover;pointer-events:none;`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function showPhoto(width, height) {
|
function showPhoto(width, height) {
|
||||||
|
|
@ -90,11 +89,21 @@ function replaceAnimation(canvas) {
|
||||||
canvas.dataset.customReplaced = "true";
|
canvas.dataset.customReplaced = "true";
|
||||||
canvas.style.display = "none";
|
canvas.style.display = "none";
|
||||||
|
|
||||||
const { width, height } = canvas.getBoundingClientRect();
|
// const { width, height } = canvas.getBoundingClientRect();
|
||||||
|
const width = 650;
|
||||||
|
const height = 650;
|
||||||
const w = width || canvas.width;
|
const w = width || canvas.width;
|
||||||
const h = height || canvas.height;
|
const h = height || canvas.height;
|
||||||
|
|
||||||
container = canvas.closest(ROOT_SELECTOR) ?? canvas.parentElement;
|
container = canvas.closest(ROOT_SELECTOR) ?? canvas.parentElement;
|
||||||
|
// container.style.position = "relative";
|
||||||
|
container.style.overflow = "hidden";
|
||||||
|
|
||||||
|
const style = document.createElement("style");
|
||||||
|
style.textContent = `
|
||||||
|
.VibePage_artistCover__RQee1 { display: none !important; }
|
||||||
|
`;
|
||||||
|
document.head.appendChild(style);
|
||||||
|
|
||||||
showVideo(w, h);
|
showVideo(w, h);
|
||||||
watchForPlayIndicator(w, h);
|
watchForPlayIndicator(w, h);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue