您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Google Drive Folder/File List wide, create button to hide google drive left side bar so there're more estate for showing file name
当前为
- // ==UserScript==
- // @name Allow Sidebar Hide Google Drive
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description Google Drive Folder/File List wide, create button to hide google drive left side bar so there're more estate for showing file name
- // @author Benyamin Limanto <me@benyamin.xyz>
- // @match https://drive.google.com/drive/*
- // @icon https://www.google.com/s2/favicons?domain=google.com
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- var status = true; var newStyle = document.createElement("style");
- var btnCollapse = document.createElement("button");
- btnCollapse.innerText = ">"; btnCollapse.style.marginLeft = "100px";
- btnCollapse.style.padding = "4px"; btnCollapse.style.fontWeight = "bolder"; btnCollapse.style.cursor = "pointer";
- btnCollapse.style.background = "#fff"; btnCollapse.style.borderRadius = "4px"; btnCollapse.style.border = "#0011008c solid 1px";
- btnCollapse.onclick = function() {
- if(status) {
- newStyle.innerText = ".a-hrN2W-S-kl-Gd > .a-s-tb-kl-Gd-ig, .a-D-B-Lc-j { min-width: 256px !important; }";
- status = false;
- btnCollapse.innerText = "<";
- } else {
- newStyle.innerText = ".a-hrN2W-S-kl-Gd > .a-s-tb-kl-Gd-ig, .a-D-B-Lc-j { min-width: 0px !important; }";
- status = true;
- btnCollapse.innerText = ">";
- }
- };
- var newButton = document.querySelector(".a-ec-Gd-Cs-mp-S");
- newButton.after(btnCollapse);
- // Set Style and Append
- newStyle.id = "new-style";
- newStyle.innerText = ".a-hrN2W-S-kl-Gd > .a-s-tb-kl-Gd-ig, .a-D-B-Lc-j { min-width: 0px !important; }";
- document.body.appendChild(newStyle);
- })();