Zimuku2pianyuan

Add Pianyuan.net and Rarbg.is search buttons to Zimuku

当前为 2018-03-23 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Zimuku2pianyuan
// @namespace    http://tampermonkey.net/
// @version      0.5
// @description  Add Pianyuan.net and Rarbg.is search buttons to Zimuku
// @author       Johnxon
// @match        https://www.zimuku.cn/detail/*
// @grant        GM_addStyle
// ==/UserScript==

(function() {
    'use strict';
    GM_addStyle("span.py{background:#20A4FF;padding:16px 20px !important;height:50px;font-size:18px;color:#fff !important} span.rarbg{background:#505599;padding:16px 20px !important;height:50px;font-size:18px;color:#fff !important}");
    var keywords = $("meta[name='keywords']").attr("content");
    var title = keywords.split(',')[0];
    var en_title = keywords.split(',')[1];
    var pianyuanBtn = '<a href="http://pianyuan.net/search?q=' + title + '" target="_blank"><span class="py">片源</span></a>';
    var rarbgBtn = '<a href="https://rarbg.is/torrents.php?search=' + en_title + '" target="_blank"><span class="rarbg">RARBG</span></a>';
    var btnDownload = $('.dl').parent();
    btnDownload.after(pianyuanBtn);
    btnDownload.after(rarbgBtn);
})();