上传文件至「/」

这个提交包含在:
2026-07-30 02:56:51 +08:00
父节点 0659ecf59e
当前提交 a37b0cd377
修改 4 个文件,包含 120 行新增15 行删除
+16 -13
查看文件
@@ -1,18 +1,21 @@
MIT License
Copyright (c) 2026 Xiaoxiaobai5724
Copyright (c) 2021 Golden
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+30 -2
查看文件
@@ -1,3 +1,31 @@
# clipboardjs
# XXB Clipboardjs
Add a modern approach to copy code to clipboard with code language display.
![License](https://img.shields.io/badge/license-MIT-blue.svg) [![Latest Stable Version](https://img.shields.io/packagist/v/xxb5724/clipboardjs.svg)](https://packagist.org/packages/xxb5724/clipboardjs)
A [Flarum](https://flarum.org) 2.0 extension. Use [Clipboardjs](https://clipboardjs.com/) to add copy code approach with code language display to your Flarum. You can choose 7 different button styles, like GitHub, SegmentFault, etc.
Supports 47 common languages by default:
.properties, apacheconf, bash, bbcode, c, csharp, css, cpp, coffeescript, diff, django, docker, dockerfile, git, go, html, ini, java, javadoc, js, json, less, lua, makefile, markdown, nginx, objectivec, perl, php, powershell, properties, python, python-repl, regex, ruby, rust, sass, scss, sql, stylus, swift, typescript, vim, visual-basic, vue, xml, yaml.
### Installation
Install manually with composer:
```sh
composer require xxb5724/clipboardjs
```
> **Migrating from ffans/clipboardjs**
> This extension was transferred to XXB and was previously published as `ffans/clipboardjs`. The XXB line begins at **2.0.0**, continuing the version history (the previous package reached 1.0.0).
> For forum admins, migration is a one-line change — swap the package, keep your settings and stored SEO data:
> ```sh
composer remove ffans/clipboardjs
composer require xxb5724/clipboardjs
php flarum cache:clear
> ```
### Updating
```sh
composer update xxb5724/clipboardjs
```
+47
查看文件
@@ -0,0 +1,47 @@
{
"name": "xxb5724/clipboardjs",
"description": "Add a modern approach to copy code to clipboard with code language display.",
"keywords": [
"flarum",
"clipboardjs",
"code language"
],
"type": "flarum-extension",
"license": "MIT",
"require": {
"flarum/core": "^2.0.0"
},
"authors": [
{
"name": "Golden",
"email": "littlegoldenjin@gmail.com",
"role": "Developer"
},
{
"name": "Xiaoxiaobai5724",
"email": "odoorbell@163.com",
"role": "Developer"
}
],
"support": {
"issues": "https://git.parlz.com/Xiaoxiaobai5724/clipboardjs/issues",
"source": "https://git.parlz.com/Xiaoxiaobai5724/clipboardjs"
},
"homepage": "https://git.parlz.com/Xiaoxiaobai5724",
"autoload": {
"psr-4": {
"FFans\\ClipboardJS\\": "src/"
}
},
"extra": {
"flarum-extension": {
"title": "XXB Clipboardjs",
"category": "feature",
"icon": {
"name": "far fa-clipboard",
"backgroundColor": "#00BFFF",
"color": "#ffffff"
}
}
}
}
+27
查看文件
@@ -0,0 +1,27 @@
<?php
/*
* This file is part of ffans/clipboardjs.
*
* Copyright (c) 2021 Golden.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
namespace FFans\ClipboardJS;
use Flarum\Extend;
return [
(new Extend\Frontend('forum'))
->js(__DIR__.'/js/dist/forum.js')
->css(__DIR__.'/resources/less/forum.less'),
(new Extend\Frontend('admin'))
->js(__DIR__.'/js/dist/admin.js'),
new Extend\Locales(__DIR__ . '/resources/locale'),
(new Extend\Settings())
->serializeToForum('themeName', 'ffans-clipboardjs.theme_name')
->serializeToForum('isCopyEnable', 'ffans-clipboardjs.is_copy_enable', 'boolVal')
->serializeToForum('isShowCodeLang', 'ffans-clipboardjs.is_show_codeLang', 'boolVal'),
];