Skip to content

Commit

Permalink
feat(kill-watermark): 适配金山文档
Browse files Browse the repository at this point in the history
  • Loading branch information
maomao1996 committed Jan 6, 2025
1 parent fd772f9 commit ccebc7d
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/red-clouds-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'kill-watermark': minor
---

适配金山文档
5 changes: 3 additions & 2 deletions packages/kill-watermark/metablock.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name:en": "Kill Watermark",
"namespace": "maomao1996.kill-watermark",
"version": "0.0.2",
"description": "杀死水印(移除烦人的水印,还你一个干净清爽的页面);已适配360 智脑、腾讯文档、飞书、FreeBuf 网络安全行业门户、爱奇艺播放页(右上角 logo、暂停时的广告)、腾讯课堂播放页漂浮水印、哔哩哔哩直播左上角 logo、CSDN C 知道、腾讯视频播放页(右上角 logo、暂停时的弹窗广告)、优酷视频播放页(右上角 logo、暂停时的弹窗广告)、语雀",
"description": "杀死水印(移除烦人的水印,还你一个干净清爽的页面);已适配360 智脑、腾讯文档、飞书、FreeBuf 网络安全行业门户、爱奇艺播放页(右上角 logo、暂停时的广告)、腾讯课堂播放页漂浮水印、哔哩哔哩直播左上角 logo、金山文档、CSDN C 知道、腾讯视频播放页(右上角 logo、暂停时的弹窗广告)、优酷视频播放页(右上角 logo、暂停时的弹窗广告)、语雀",
"author": "",
"homepage": "",
"supportURL": "",
Expand All @@ -23,7 +23,8 @@
"*://so.csdn.net/*",
"*://*.feishu.cn/*",
"*://*.freebuf.com/*",
"*://chat.360.com/*"
"*://chat.360.com/*",
"*://365.kdocs.cn/*"
],
"grant": ["GM_addStyle"]
}
6 changes: 5 additions & 1 deletion packages/kill-watermark/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ export default createRollupConfig({
const exportSites = []
const source = files.reduce((str, file) => {
if (statSync(`./src/sites/${file}`).isDirectory()) {
const moduleName = camelCase(file)
let moduleName = camelCase(file)
if (/^\d/.test(moduleName)) {
moduleName = `m_${moduleName}`
}

str += `export { default as ${moduleName} } from './${file}'\n`
exportSites.push(`${moduleName}`)
}
Expand Down
3 changes: 3 additions & 0 deletions packages/kill-watermark/src/sites/365.kdocs.cn/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.uikit-watermark-container {
display: none !important;
}
16 changes: 16 additions & 0 deletions packages/kill-watermark/src/sites/365.kdocs.cn/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/******************************************************************************
** 金山文档
** - https://365.kdocs.cn
******************************************************************************/

import style from './index.css'

const site: SiteModule = [
'金山文档',
'365.kdocs.cn',
{
style,
},
]

export default site
1 change: 1 addition & 0 deletions packages/kill-watermark/src/sites/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { default as m_365KdocsCn } from './365.kdocs.cn'
export { default as chat360Com } from './chat.360.com'
export { default as docsQqCom } from './docs.qq.com'
export { default as feishuCn } from './feishu.cn'
Expand Down

0 comments on commit ccebc7d

Please sign in to comment.