CineZone Trailers

generates 'Trailer' links that will open a video trailer for movies and TV shows, using YouTube, in a popup window

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         CineZone Trailers
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  generates 'Trailer' links that will open a video trailer for movies and TV shows, using YouTube, in a popup window
// @match        *://cinezone.to/*
// @match        *://www*.cinezone.to/*
// @match        *://www.cinezone.to/*
// @match        https://flixflare.to/*
// @require      https://code.jquery.com/jquery-3.7.0.min.js
// @license      CC-BY-NC-SA-4.0
// @icon https://www.google.com/s2/favicons?sz=64&domain=cinezone.to
// @author       drhouse
// ==/UserScript==
this.$ = this.jQuery = jQuery.noConflict(true);
jQuery(function($){

    var title = $("h1[itemprop='name']").text().trim();

    var siteLink = document.createElement('a');
    siteLink.innerHTML = '<b>[ Trailer ]</b>';
    siteLink.setAttribute('href', 'https://www.google.com/search?q=site%3Ayoutube.com+' + encodeURIComponent(title) + '+trailer&btnI=I%27m+Feeling+Lucky');
    siteLink.setAttribute('class', 'nframe');
    siteLink.style.fontSize = 'inherit';

    var insert = $("h1").first();
    // $(insert).append(siteLink).append("<br>");
     $(insert).after(siteLink).append("<br>");

    $(".nframe").click(function (e) {
        e.preventDefault();
        var url = $(this).attr("href");

        var width = screen.width * 0.75;
        var height = screen.height * 0.75;
        var left = (screen.width - width) / 2;
        var top = (screen.height - height) / 2;
        var params = 'width=' + width + ', height=' + height;
        params += ', top=' + top + ', left=' + left;
        params += ', directories=no';
        params += ', location=no';
        params += ', menubar=no';
        params += ', resizable=yes';
        params += ', scrollbars=yes';
        params += ', status=no';
        params += ', toolbar=no';
        var newwin = window.open(url, 'subpop', params);
        if (window.focus) {
            newwin.focus()
        }
        return false;
    });
});