LMB opens video in bg tab + Remove Tooltip
// ==UserScript==
// @name R34 Thumb LMB Control + Remove Tooltip
// @namespace http://tampermonkey.net/
// @version 3.1
// @match https://rule34video.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=rule34video.com
// @grant GM_openInTab
// @run-at document-start
// @description LMB opens video in bg tab + Remove Tooltip
// ==/UserScript==
(function () {
'use strict';
// 1 = обычное поведение, 2 = отключить ЛКМ, 3 = открыть в фоновой вкладке
const THUMB_LMB_MODE = 3;
// Очистка нативных подсказок
document.addEventListener('mouseover', function (e) {
const el = e.target?.closest?.('[title]');
if (el?.closest?.('.thumb, .th, .video-card-meta')) {
el.removeAttribute('title');
}
}, true);
// Обработка нажатия ЛКМ на миниатюре
if (THUMB_LMB_MODE !== 1) {
document.addEventListener('click', function (e) {
if (e.button !== 0) return;
const thumb = e.target.closest('.thumb, .th');
if (!thumb) return;
const link = thumb.tagName.toLowerCase() === 'a' ? thumb : (thumb.closest('a') || thumb.querySelector('a'));
if (!link || !link.href) return;
e.preventDefault();
e.stopImmediatePropagation();
if (THUMB_LMB_MODE === 3) {
GM_openInTab(link.href, {
active: false,
insert: true,
setParent: true
});
}
}, true);
}
})();