我希望制作一个Bookmarklet,以便删除工作场所中的一些重复步骤。我们的分析师会在网上发现重要故事,并通过电子邮件在内部发送快速提醒。
我通过创建下面的书签来提高了这个速度,但现在它只发送一封电子邮件。
我最终要找的是点击
时如何进行操作有人有洞察力吗。
小书签
<a href="javascript:(function()%7Bvar%20bcc%20%3D%20%22email.com%22%3Bvar%20subject%20%3D%20%22News%20Alert%20%2F%20Alerte%20Nouvelles%3A%20%22%20%2B%20document.title%3Bvar%20title%20%3D%20document.title%20%2B%20%22%5Cn%22%3Bvar%20url%20%3D%20%20window.location.href%3Bwindow.location.href%20%3D%20%22mailto%3A%3Fbcc%3D%22%2Bbcc%2B%22%26subject%3D%22%2Bsubject%2B%22%26body%3D%22%2BencodeURIComponent(title)%20%2B%20encodeURIComponent(url)%7D)()">
答案 0 :(得分:0)
为了将来参考,这就是我所做的。
import * as deployApi from './deployApi'
let options = {
localBuildFolder: 'build',
domain: 'ourdomain',
branch: process.env.TRAVIS_PULL_REQUEST_BRANCH
}
const deployFeatureBranch = async (options) => {
console.log(green(`Deploying feature branch: ${options.branch}`))
let { failure, success, payload } = await deployApi.run(options)
return { failure, success, payload }
}
let { failure, success, payload } = deployFeatureBranch(options)
export {
options,
deployFeatureBranch
}
然后,此表单包含将apjax调用发送到api所需的一切。