This repository has been archived by the owner on Nov 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
252 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,41 @@ | ||
const { type, api } = require('clipcc-extension'); | ||
|
||
//=========================================================== | ||
//2.0.1 | ||
|
||
/** | ||
* @param {String} name | ||
* @param {String} link | ||
*/ | ||
function jumpto(name, link){ | ||
if(window.confirm(`你确定要跳转到${name}吗?\n${link}`)){ //弹窗确认 | ||
window.open(link); | ||
} | ||
} | ||
|
||
//=========================================================== | ||
|
||
/**@param {string} category_id*/ | ||
module.exports = ( category_id )=>{ api.addBlocks([ | ||
// 创建一个不能被程序触发的积木,点击它就会直接跳转到github仓库地址。 | ||
{//2.0.0 | ||
// 创建不能被程序触发的积木,鼠标点击才能触发。 | ||
{//2.0.1 | ||
opcode: `${category_id}.jumptogithub`, | ||
messageId: `${category_id}.jumptogithub`, | ||
categoryId: category_id, | ||
type: undefined, | ||
function: (args,util)=>{ | ||
if(window.confirm("你确定要跳转到github吗?")){ //弹窗确认 | ||
window.open("https://github.com/bddjr/clipcc-extension-bddjr_toolbox_v2"); | ||
} | ||
}, | ||
function: ()=> jumpto( | ||
'Github', | ||
"https://github.com/bddjr/clipcc-extension-bddjr_toolbox_v2/" | ||
), | ||
}, | ||
{//2.0.1 | ||
opcode: `${category_id}.doc`, | ||
messageId: `${category_id}.doc`, | ||
categoryId: category_id, | ||
type: undefined, | ||
function: ()=> jumpto( | ||
'文档', | ||
"https://btbv2.ccext.bddjr.cn" | ||
), | ||
}, | ||
]);} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.