forked from Ovler-Young/user_scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
feishu_minutes_single.js
55 lines (50 loc) · 2.01 KB
/
feishu_minutes_single.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// ==UserScript==
// @name feishu_minutes_single
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 将飞书妙记转化为单栏
// @author You
// @match https://*.feishu.cn/minutes/*
// @exclude https://*.feishu.cn/minutes/me
// @icon https://www.google.com/s2/favicons?sz=64&domain=feishu.cn
// @grant none
// ==/UserScript==
(function () {
"use strict";
// Create a floating ball
var ball = document.createElement("div");
ball.style.backgroundColor = "red";
ball.style.width = "30px";
ball.style.height = "30px";
ball.style.borderRadius = "15px";
ball.style.position = "fixed";
ball.style.right = "20px";
ball.style.bottom = "20px";
ball.style.cursor = "pointer";
document.body.appendChild(ball);
// Add an event listener to run code when the ball is clicked
ball.addEventListener("click", function () {
var isHidden = ball.getAttribute("data-hidden") === "true";
// 1. remove extra-info-wrapper
var extrainfowrapper =
document.getElementsByClassName("extra-info-wrapper")[0];
extrainfowrapper.style.display = "none";
// 2. remove keywords-comp-inner
var keywordsCompInner = document.getElementsByClassName(
"keywords-comp-inner"
)[0];
keywordsCompInner.style.display = "none";
console.log("success")
// 3. move right-area to left-area
var rightAreaInner = document.querySelector('.right-area-inner');
var leftArea = document.querySelector('.left-area');
var rightArea = document.querySelector('.right-area');
var collapseCompExpand = document.querySelector('.collapse-comp-expand');
leftArea.appendChild(rightAreaInner);
rightArea.style.display = "none";
collapseCompExpand.style.display = "none";
// 4 remove header
var larkwWebHeader = document.querySelector('.larkw-web-header');
larkwWebHeader.style.display = "none";
});
})();