闲聊么PC版Style

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

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

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

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

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

你需要先安裝一款使用者腳本管理器擴展,比如 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);
})();