revert: disable alipay open platform (#120)

This commit is contained in:
Neo
2026-01-19 18:12:51 +08:00
committed by GitHub
parent db33f1df27
commit c019c381c2
4 changed files with 12 additions and 10 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "COSE - 多平台文章同步",
"version": "1.1.10",
"version": "1.1.10.1",
"description": "Create Once, Sync Everywhere. 一键将文章同步到多个平台",
"permissions": [
"tabGroups",
+6 -4
View File
@@ -1,6 +1,6 @@
// 平台配置
import { PLATFORMS, LOGIN_CHECK_CONFIG } from './platforms/index.js'
import { fillAlipayOpenContent } from './platforms/alipayopen.js'
// [DISABLED] import { fillAlipayOpenContent } from './platforms/alipayopen.js'
// 当前同步任务的 Tab Group ID
let currentSyncGroupId = null
@@ -121,7 +121,7 @@ async function checkPlatformLogin(platform) {
return { loggedIn: false, error: '未配置检测' }
}
// 支付宝开放平台特殊处理:静默创建后台 tab 检测登录状态
/* [DISABLED] 支付宝开放平台特殊处理:静默创建后台 tab 检测登录状态
if (platform.id === 'alipayopen') {
let tempTab = null
try {
@@ -220,6 +220,7 @@ async function checkPlatformLogin(platform) {
return { loggedIn: false, error: e.message }
}
}
[DISABLED] */
// 微博特殊处理:通过 cookie 检测登录,通过 fetch HTML 获取用户信息
if (platform.id === 'weibo') {
@@ -1897,7 +1898,7 @@ async function syncToPlatform(platformId, content) {
return { success: true, message: '已同步到百度云千帆', tabId: tab.id }
}
// 支付宝开放平台:使用 ne-engine 富文本编辑器,支持 Markdown 转换
/* [DISABLED] 支付宝开放平台:使用 ne-engine 富文本编辑器,支持 Markdown 转换
if (platformId === 'alipayopen') {
// 先打开发布页面
tab = await chrome.tabs.create({ url: platform.publishUrl, active: false })
@@ -1924,7 +1925,8 @@ async function syncToPlatform(platformId, content) {
await new Promise(resolve => setTimeout(resolve, 2000))
return { success: true, message: '已同步到支付宝开放平台', tabId: tab.id }
} else if (platformId !== 'wechat') {
} else [DISABLED] */
if (platformId !== 'wechat') {
// 其他平台(排除微信,因为微信在上面已经处理)
let targetUrl = platform.publishUrl
+1 -1
View File
@@ -87,7 +87,7 @@
{ id: 'huaweidev', name: 'HuaweiDev', icon: 'https://developer.huawei.com/favicon.ico', title: '华为开发者文章', type: 'huaweidev', url: 'https://developer.huawei.com/consumer/cn/blog/create' },
{ id: 'twitter', name: 'Twitter', icon: 'https://abs.twimg.com/favicons/twitter.3.ico', title: 'Twitter Articles', type: 'twitter', url: 'https://x.com/compose/articles/edit/' },
{ id: 'qianfan', name: 'Qianfan', icon: 'https://bce.bdstatic.com/img/favicon.ico', title: '百度云千帆', type: 'qianfan', url: 'https://qianfan.cloud.baidu.com/qianfandev/topic/create' },
{ id: 'alipayopen', name: 'AlipayOpen', icon: 'https://www.alipay.com/favicon.ico', title: '支付宝开放平台', type: 'alipayopen', url: 'https://open.alipay.com/portal/forum/post/add#article' },
// [DISABLED] { id: 'alipayopen', name: 'AlipayOpen', icon: 'https://www.alipay.com/favicon.ico', title: '支付宝开放平台', type: 'alipayopen', url: 'https://open.alipay.com/portal/forum/post/add#article' },
{ id: 'modelscope', name: 'ModelScope', icon: 'https://img.alicdn.com/imgextra/i4/O1CN01fvt4it25rEZU4Gjso_!!6000000007579-2-tps-128-128.png', title: 'ModelScope 魔搭社区', type: 'modelscope', url: 'https://modelscope.cn/learn/create' },
]
+4 -4
View File
@@ -23,7 +23,7 @@ import { HuaweiCloudPlatform, HuaweiCloudLoginConfig } from './huaweicloud.js'
import { HuaweiDevPlatform, HuaweiDevLoginConfig } from './huaweidev.js'
import { TwitterPlatform, TwitterLoginConfig } from './twitter.js'
import { QianfanPlatform, QianfanLoginConfig } from './qianfan.js'
import { AlipayOpenPlatform, AlipayOpenLoginConfig } from './alipayopen.js'
// [DISABLED] import { AlipayOpenPlatform, AlipayOpenLoginConfig } from './alipayopen.js'
import { ModelScopePlatform, ModelScopeLoginConfig } from './modelscope.js'
// 合并平台配置
@@ -52,7 +52,7 @@ const PLATFORMS = [
HuaweiDevPlatform,
TwitterPlatform,
QianfanPlatform,
AlipayOpenPlatform,
// [DISABLED] AlipayOpenPlatform,
ModelScopePlatform,
]
@@ -82,7 +82,7 @@ const LOGIN_CHECK_CONFIG = {
[HuaweiDevPlatform.id]: HuaweiDevLoginConfig,
[TwitterPlatform.id]: TwitterLoginConfig,
[QianfanPlatform.id]: QianfanLoginConfig,
[AlipayOpenPlatform.id]: AlipayOpenLoginConfig,
// [DISABLED] [AlipayOpenPlatform.id]: AlipayOpenLoginConfig,
[ModelScopePlatform.id]: ModelScopeLoginConfig,
}
@@ -112,7 +112,7 @@ function getPlatformFiller(hostname) {
if (hostname.includes('developer.huawei.com')) return 'huaweidev'
if (hostname.includes('x.com') || hostname.includes('twitter.com')) return 'twitter'
if (hostname.includes('qianfan.cloud.baidu.com')) return 'qianfan'
if (hostname.includes('open.alipay.com')) return 'alipayopen'
// [DISABLED] if (hostname.includes('open.alipay.com')) return 'alipayopen'
if (hostname.includes('modelscope.cn')) return 'modelscope'
return 'generic'
}