Greasy Fork

Greasy Fork is available in English.

闲聊么PC版Style

闲聊么PC版界面太小了,聊天不不爽。快用这个脚本把界面放大

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         闲聊么PC版Style
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  闲聊么PC版界面太小了,聊天不不爽。快用这个脚本把界面放大
// @author       黄盐
// @match        http://www.xianliao.me/*
// @grant        GM_addStyle
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';
    GM_addStyle('#gmBig{z-index: 999; position:absolute; top:0px; left: 0; width: 32px; height:32px;font-size: 28px;padding: 7px 4px;color:#2772AB !important;background:#fff;cursor: pointer;}\
    #gmBig:hover{background:#eee;}');
    var a,b,c;
    a=document.createElement("div");
    a.id='gmBig';
    a.innerHTML='▣';
   b=document.querySelector('#frame');
    b.appendChild(a);
    function changeCSS(){
        var tar=document.querySelector("#frame");
        if (parseInt(tar.style.height)<50){
            document.querySelector('.collapsed_content').click();
            setTimeout("var tar=document.querySelector('#frame'); tar.style.height=window.innerHeight+'px';tar.style.width=window.innerWidth/2+'px';tar.style.bottom='0px';",40);
        }
        else{
            document.querySelector('#nav__collapse').click();
            setTimeout("var tar=document.querySelector('#frame');tar.style.width='20%';tar.style.bottom='20%';",40);
        }
    }
    a.addEventListener("click",changeCSS);
})();