@Moastafi74 said in load and show page using http client ?:
@Fox why doesn't load full page?
Open the console in the browser on the network tab and go to the page. You will see that multiple requests are used to load the page, not just one.
Hello
How can I disable video loading but sound still loading as in the image?
@haquangchi said in How to disable video loading?:
Hello
How can I disable video loading but sound still loading as in the image?!
Have you tried to find a solution to your question on the forum?
@haquangchi
Someone suggest using request mask deny with match (player, hqdefault, mqdefault). But they don't work.
@haquangchi
Use "Execute On Every Page Load In Browser" and try below code
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
if (mutation.addedNodes && mutation.addedNodes.length > 0) {
var videos = mutation.target.querySelectorAll('video');
videos.forEach(function(video) {
var sources = video.querySelectorAll('source');
sources.forEach(function(source) {
var src = source.src;
var type = source.type;
var audio = document.createElement('audio');
audio.setAttribute('src', src);
audio.setAttribute('type', type);
audio.setAttribute('controls', 'controls');
video.parentNode.insertBefore(audio, video);
});
video.style.display = 'none';
});
}
});
});
document.addEventListener('DOMContentLoaded', function() {
var videos = document.querySelectorAll('video');
videos.forEach(function(video) {
var sources = video.querySelectorAll('source');
sources.forEach(function(source) {
var src = source.src;
var type = source.type;
var audio = document.createElement('audio');
audio.setAttribute('src', src);
audio.setAttribute('type', type);
audio.setAttribute('controls', 'controls');
video.parentNode.insertBefore(audio, video);
});
video.style.display = 'none';
});
var targetNode = document.body;
var config = { childList: true, subtree: true };
observer.observe(targetNode, config);
});