toi la gay :sosad:
Senior Member
mình ko biết code nên bó tay bác ạ
Thêm luôn vào bộ sưu tập, mở link xem từ Youtube qua Mobile, code rất ezpz:cũng đang dùng ông này chuyển qua lại yt desktop, mobile
YouTube Minimal on PC (https://greasyfork.org/en/scripts/457579-youtube-minimal-on-pc)
YouTube Minimal Fixs (https://greasyfork.org/en/scripts/457587-youtube-minimal-fixs)
View attachment 2192874
Code:
// ==UserScript==
// @name Youtube Watch Mobile
// @description Youtube Watch Mobile - Scripts
// @include https://www.youtube.com/*
// @include https://m.youtube.com/*
// @exclude https://www.youtube.com/watch*
// @exclude https://m.youtube.com/watch*
// @namespace Open Youtube PC and Mobile video links in new tab
// @author -
// @version 2.0.4
// @license MIT License
// @grant GM_openInTab
// @run-at document-start
// ==/UserScript==
var suppressing;
window.addEventListener('mouseup', function(e) {
if (e.button > 1 || e.altKey)
return;
var link = e.target.closest('[href^="/watch"]');
if (!link ||
(link.getAttribute('href') || '').match(/^(javascript|#|$)/) ||
link.href.replace(/#.*/, '') == location.href.replace(/#.*/, '')
)
return;
GM_openInTab('https://m.youtube.com' + link.pathname, e.button || e.ctrlKey);
suppressing = true;
prevent(e);
}, true);
window.addEventListener('click', prevent, true);
window.addEventListener('auxclick', prevent, true);
function prevent(e) {
if (!suppressing)
return;
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
setTimeout(function() {
suppressing = false;
}, 100);
}