Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add icon style #5

Merged
merged 1 commit into from
Apr 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions coze_com/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Beautiful Coze| Coze 聊天面板美化 |免费GPT4
// @namespace http://tampermonkey.net/
// @version 0.0.7.2
// @version 0.0.7.3
// @description 👍👍最新适配,超级好用||️Coze 聊天面板美化| 提示栏和插件栏的切换| 聊天面板全屏| Coze chat panel beautification| Switch between prompt bar and plugin bar| Full screen chat panel
// @author xx025
// @homepage https://github.com/xx025/strawberry
Expand Down Expand Up @@ -58,15 +58,16 @@ const settings = {
function generate_img_element(svg_text) {
const v_img = document.createElement('img');
v_img.src = 'data:image/svg+xml;base64,' + btoa(svg_text);
v_img.width = 20;
v_img.height = 20;
v_img.width = 16;
v_img.height = 16;
return v_img
}

//使用img元素生成div元素
function generate_div_element(svg_text, class_names) {
const v_div = document.createElement('div');
v_div.appendChild(generate_img_element(svg_text))
v_div.classList.add('semi-button', 'semi-button-primary', 'semi-button-size-small', 'semi-button-borderless', 'semi-button-with-icon', 'semi-button-with-icon-only')
v_div.style.cursor = 'pointer';
class_names.forEach(
(item) => {
Expand Down