您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Ищет фильм в Google и автоматически переходит на Flicksbar без использования API Кинопоиска (для правильной работы нужен второй скрипт "Автопереход на Flicksbar с Google")
当前为
// ==UserScript== // @name Кнопка перехода на Flicksbar из Kinorium (без использования API Кинопоиска) // @namespace http://tampermonkey.net/ // @version 0.9.4 // @description Ищет фильм в Google и автоматически переходит на Flicksbar без использования API Кинопоиска (для правильной работы нужен второй скрипт "Автопереход на Flicksbar с Google") // @author CgPT & Vladimir_0202 // @icon https://ru.kinorium.com/favicon.ico // @include /^https?:\/\/.*kinorium.*\/.*$/ // @grant none // @license MIT // ==/UserScript== (function () { 'use strict'; // Проверка: находимся ли мы на главной странице фильма (например: https://kinorium.com/247921/) const path = window.location.pathname; const isMainFilmPage = /^\/\d+\/?$/.test(path); if (!isMainFilmPage) { console.log('Не главная страница фильма, кнопка не будет добавлена.'); return; } function getFilmDetails() { const titleElement = document.querySelector('.film-page__title-text.film-page__itemprop'); const originalTitleElement = document.querySelector('.film-page__orig_with_comment'); const typeLink = document.querySelector('.b-post__info a[href*="/series/"]'); const title = titleElement ? titleElement.textContent.trim() : ''; const originalTitle = originalTitleElement ? originalTitleElement.textContent.trim() : ''; const yearElement = document.querySelector('.film-page__date a[href*="years_min="]'); const year = yearElement ? yearElement.textContent.trim() : ''; console.log(`Extracted movie data: Title: "${title}", Original Title: "${originalTitle}", Year: "${year}"`); const isSeries = typeLink !== null; return { title, originalTitle, year, isSeries }; } function createButton() { const button = document.createElement('button'); button.textContent = 'Найти на Flicksbar'; button.style.padding = '9px'; button.style.marginTop = '5px'; button.style.marginBottom = '2px'; button.style.backgroundColor = '#007bff'; button.style.color = 'white'; button.style.border = 'none'; button.style.borderRadius = '3px'; button.style.width = '100%'; button.style.cursor = 'pointer'; button.style.transition = 'background-color 0.3s ease'; // Наведение: делаем цвет темнее button.addEventListener('mouseenter', () => { button.style.backgroundColor = '#0056b3'; // темно-синий }); button.addEventListener('mouseleave', () => { button.style.backgroundColor = '#007bff'; // обратно как было }); const { title, originalTitle, year } = getFilmDetails(); button.title = `Поиск: ${title} ${originalTitle} ${year}`; button.onclick = () => { const { title, originalTitle, year, isSeries } = getFilmDetails(); if (!title) { alert('Не удалось извлечь информацию о фильме.'); return; } const searchQuery = encodeURIComponent(`${title} ${originalTitle} ${year} кинопоиск`); const flicksbarType = isSeries ? 'series' : 'film'; const googleUrl = `https://www.google.com/search?q=${searchQuery}&btnK&flcks_type=${flicksbarType}`; window.open(googleUrl, '_blank'); }; const sideCover = document.querySelector('.collectionWidget.collectionWidgetData.withFavourites'); if (sideCover) { sideCover.appendChild(button); } else { console.warn('Элемент для вставки кнопки не найден.'); } } // Запуск как можно раньше, но только после готовности DOM if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', createButton); } else { createButton(); } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址