aotungchao
Yếu sinh lý
Có của hikaru nagi với suzume mino k bác
chrome bác, đã làm đủ các bước, tới bước lưu lại k được, hiện lỗi 3 dòng nàyXem nội dung: 869652
thử dán lại code đi nhé, tôi ném lên gpt nó fix lai cho ok r, nma tôi thấy vẫn ko xem đc hếtchrome bác, đã làm đủ các bước, tới bước lưu lại k được, hiện lỗi 3 dòng nàyXem nội dung: 869652
ko xem đc hếtthử dán lại code đi nhé, tôi ném lên gpt nó fix lai cho ok r, nma tôi thấy vẫn ko xem đc hết
Tri ân tml. Có những file mp4 mang codec HVEC thì không xem trực tiếp được trên web đâu nhé.// ==UserScript==
// @Name PP Video Controls - Native UI
// @namespace force-native-video-controls
// @version 2.0.0
// @description Hide custom video controls and enable native browser controls on PikPak
// @match https://mypikpak.com/*
// @run-at document-start
// @GranT none
// ==/UserScript==
(() => {
'use strict';
const STYLE_ID = 'pp-native-video-controls-style';
// Các thành phần giao diện tùy chỉnh của trình phát
const HIDE_SELECTORS = [
'.control-box',
'.control-bar-progress',
'.control-bar-button',
'.pp-slider',
'.pp-slider-player',
'.pp-slider_track',
'.pp-slider_track-split',
'.icon-play',
'.icon-voice',
'.rate-icon',
'.articulation-icon',
'.player-message-box'
];
const CLOSE_BUTTON_SELECTORS = [
'.el-dialog__headerbtn',
'.close-button',
'[aria-label="Close"]'
];
let scanScheduled = false;
// Thêm CSS một lần
function injectStyle() {
if (!document.documentElement) return;
if (document.getElementById(STYLE_ID)) return;
const style = document.createElement('style');
style.id = STYLE_ID;
style.textContent = `
${HIDE_SELECTORS.join(',\n')} {
display: none !important;
visibility: hidden !important;
pointer-events: none !important;
}
video {
pointer-events: auto !important;
}
`;
(document.head || document.documentElement).appendChild(style);
}
// Bật controls gốc cho tất cả video
function enableNativeControls() {
document.querySelectorAll('video').forEach(video => {
if (!video.controls) {
video.controls = true;
}
video.controlsList = '';
video.disablePictureInPicture = false;
// Không ép video phát lại và không thay đổi trạng thái mute.
// Không đặt z-index quá cao vì có thể phá bố cục trang.
});
}
// Chỉ đóng các nút thuộc popup đã xác định.
// Không tự động bấm mọi nút Close trên trang.
function closeKnownPopups() {
CLOSE_BUTTON_SELECTORS.forEach(selector => {
document.querySelectorAll(selector).forEach(button => {
const dialog = button.closest(
'[role="dialog"], .el-dialog, .el-message-box'
);
if (!dialog) return;
if (!dialog.isConnected) return;
// Chỉ đóng dialog đang hiển thị.
const style = getComputedStyle(dialog);
if (
style.display === 'none' ||
style.visibility === 'hidden'
) {
return;
}
// Tránh đóng dialog không rõ mục đích.
// Nếu cần tự đóng một popup cụ thể, hãy thêm selector
// riêng cho popup đó sau khi xác định class thực tế.
});
});
}
function run() {
scanScheduled = false;
injectStyle();
enableNativeControls();
closeKnownPopups();
}
// Gom các thay đổi DOM để tránh chạy liên tục
function scheduleRun() {
if (scanScheduled) return;
scanScheduled = true;
run();
}
function start() {
injectStyle();
enableNativeControls();
if (!document.documentElement) {
document.addEventListener('DOMContentLoaded', start, {
once: true
});
return;
}
const observer = new MutationObserver(() => {
scheduleRun();
});
observer.observe(document.documentElement, {
childList: true,
subtree: true
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', start, {
once: true
});
} else {
start();
}
})();
Em này tên gì bro10T xem tải tẹt ga



