Rainwave v5: Pin Request Pane

Adds a pin/close button to the top-right of the requests pane. Pane stays fully open w/o hovering when pinned.

目前為 2016-10-19 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @version      1.0.2
// @author       Nmaster64
// @namespace    http://twitter.com/nmaster64
// @match        http://*.rainwave.cc/*
// @name         Rainwave v5: Pin Request Pane
// @description  Adds a pin/close button to the top-right of the requests pane. Pane stays fully open w/o hovering when pinned.
// @grant        GM_addStyle
// @require      https://code.jquery.com/jquery.min.js
// ==/UserScript==

// Style Updates
var css = [
    'body.full div.panel.requests.pinned { transform:translateX(-100%) !important; }',
    'body.full div.panel.requests.pinned ul.request_icons li { visibility:visible !important; opacity:.5; }',

    'body.full div.panel.requests > div.close:first-child { display:block !important; }',
    'body.full div.panel.requests > div.close:first-child > img.close { display:none; }',
    'body.full div.panel.requests > div.close:first-child > img.pin  { display:block; }',
    'body.full div.panel.requests.pinned > div.close:first-child > img.close { display:block; }',
    'body.full div.panel.requests.pinned > div.close:first-child > img.pin {  display:none; }'
];
GM_addStyle(css.join("\n"));

// Close Button
jQuery(document).ready(function($) {
    var closeBtn = $('body.full div.panel.requests > div.close:first-child');
    closeBtn.find('img').addClass('close').clone().attr('src', 'http://i.imgur.com/waouJLl.png').attr('class', 'pin').appendTo(closeBtn);
    closeBtn.off().click(function() {
        $('body.full div.panel.requests').toggleClass('pinned');
    });
});