Skip to content

Commit fd9111c

Browse files
committed
V1.3
1 parent 2d63baf commit fd9111c

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747

4848
- 可修改自定义牌组名称和按钮样式![image-20250302160456202](https://springrain-picturebed.oss-cn-shenzhen.aliyuncs.com/img/image-20250302160456202.png)
4949
- 可进行图片处理,因为flomo网站上的图床链接是有防盗链机制的(有效期内可访问),通过下载上传到私有第三方图床就可以长久访问,建议用PicGo批量上传下载的图片,当勾选迁移至私有第三方图床,配置好相关信息后,会自动修改发送Anki中的图床链接![image-20250302160443712](https://springrain-picturebed.oss-cn-shenzhen.aliyuncs.com/img/image-20250302160443712.png)
50+
- 批量下载网页中的原始图片,flomo卡片中显示的是缩略图,这里进行了处理为原图下载,若卡片图片较多时,为避免一个个另存为窗口,可以在浏览器中进行如下设置:![image-20250302161731717](https://springrain-picturebed.oss-cn-shenzhen.aliyuncs.com/img/image-20250302161731717.png)
5051

5152
## 使用说明
5253

flomo2Anki.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
downloadImages: false,
5454
migrateToOSS: false,
5555
// 第三方图床配置
56-
aliyunOSS: {
56+
yourselfOSS: {
5757
bucket: 'springrain-picturebed',
5858
region: 'oss-cn-shenzhen',
5959
folder: 'img/',
@@ -211,22 +211,22 @@
211211
<label style="display: block; margin-bottom: 5px;">第三方图床设置:</label>
212212
<div style="display: flex; margin-bottom: 5px;">
213213
<label style="width: 120px;">Bucket:</label>
214-
<input id="oss-bucket" type="text" value="${this.config.aliyunOSS.bucket}" style="flex: 1; padding: 5px;">
214+
<input id="oss-bucket" type="text" value="${this.config.yourselfOSS.bucket}" style="flex: 1; padding: 5px;">
215215
</div>
216216
<div style="display: flex; margin-bottom: 5px;">
217217
<label style="width: 120px;">Region:</label>
218-
<input id="oss-region" type="text" value="${this.config.aliyunOSS.region}" style="flex: 1; padding: 5px;">
218+
<input id="oss-region" type="text" value="${this.config.yourselfOSS.region}" style="flex: 1; padding: 5px;">
219219
</div>
220220
<div style="display: flex; margin-bottom: 5px;">
221221
<label style="width: 120px;">Folder:</label>
222-
<input id="oss-folder" type="text" value="${this.config.aliyunOSS.folder}" style="flex: 1; padding: 5px;">
222+
<input id="oss-folder" type="text" value="${this.config.yourselfOSS.folder}" style="flex: 1; padding: 5px;">
223223
</div>
224224
<div style="display: flex; margin-bottom: 5px;">
225225
<label style="width: 120px;">Endpoint:</label>
226-
<input id="oss-endpoint" type="text" value="${this.config.aliyunOSS.endpoint}" style="flex: 1; padding: 5px;">
226+
<input id="oss-endpoint" type="text" value="${this.config.yourselfOSS.endpoint}" style="flex: 1; padding: 5px;">
227227
</div>
228228
<div style="display: flex; margin-bottom: 5px; align-items: center;">
229-
<input id="save-without-dialog" type="checkbox" ${this.config.aliyunOSS.saveWithoutDialog ? 'checked' : ''}>
229+
<input id="save-without-dialog" type="checkbox" ${this.config.yourselfOSS.saveWithoutDialog ? 'checked' : ''}>
230230
<label for="save-without-dialog" style="margin-left: 5px;">自动保存图片(无弹窗)</label>
231231
</div>
232232
</div>
@@ -306,7 +306,7 @@
306306
this.config.migrateToOSS = document.getElementById('migrate-to-oss').checked;
307307

308308
// 第三方图床设置
309-
this.config.aliyunOSS = {
309+
this.config.yourselfOSS = {
310310
bucket: document.getElementById('oss-bucket').value,
311311
region: document.getElementById('oss-region').value,
312312
folder: document.getElementById('oss-folder').value,
@@ -828,7 +828,7 @@
828828
function buildOssUrl(filename) {
829829
// 确保文件名是纯文件名,不包含路径
830830
const pureName = filename.split('/').pop();
831-
return `https://${config.aliyunOSS.bucket}.${config.aliyunOSS.endpoint}/${config.aliyunOSS.folder}${pureName}`;
831+
return `https://${config.yourselfOSS.bucket}.${config.yourselfOSS.endpoint}/${config.yourselfOSS.folder}${pureName}`;
832832
}
833833

834834
// 下载单个图片
@@ -841,7 +841,7 @@
841841
GM_download({
842842
url: imageUrl,
843843
name: filename,
844-
saveAs: !config.aliyunOSS.saveWithoutDialog, // 是否显示保存对话框
844+
saveAs: !config.yourselfOSS.saveWithoutDialog, // 是否显示保存对话框
845845
onload: function() {
846846
console.log(`图片下载成功: ${filename}`);
847847
resolve(filename);

0 commit comments

Comments
 (0)