使用 Bookmarklet 显示确认,然后根据响应继续
Use Bookmarklet to display confirmation, then continue based on response
我想制作一个小书签,以消除工作场所中一些重复出现的步骤。我们的分析师会在网上找到重大新闻,并通过电子邮件在内部将其作为快速警报发送。
我通过创建下面的小书签使它更快一些,但现在它只发送一封电子邮件。
我最终要寻找的是当他们点击时如何执行以下操作
- 在确认表单中向用户显示标题和URL
- 如果用户点击是,则执行一个功能,例如稍微编辑 Title/URL 然后发送电子邮件。
- 通过在我们的服务器上调用 .js 来执行此操作,这样代码就全部集中了
请问有没有人有见识
小书签
<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)()">
为了将来参考,这就是我所做的。
javascript:(function(){var a=window,b=a.open("http://websiteurl/en/administration/bookmark?url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title),"ec_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=600px,width=900px,resizable=1,scrollbars=1,alwaysRaised=1");})();
此表单包含 post 对 api 的 ajax 调用所需的一切。
我想制作一个小书签,以消除工作场所中一些重复出现的步骤。我们的分析师会在网上找到重大新闻,并通过电子邮件在内部将其作为快速警报发送。
我通过创建下面的小书签使它更快一些,但现在它只发送一封电子邮件。
我最终要寻找的是当他们点击时如何执行以下操作
- 在确认表单中向用户显示标题和URL
- 如果用户点击是,则执行一个功能,例如稍微编辑 Title/URL 然后发送电子邮件。
- 通过在我们的服务器上调用 .js 来执行此操作,这样代码就全部集中了
请问有没有人有见识
小书签
<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)()">
为了将来参考,这就是我所做的。
javascript:(function(){var a=window,b=a.open("http://websiteurl/en/administration/bookmark?url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title),"ec_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=600px,width=900px,resizable=1,scrollbars=1,alwaysRaised=1");})();
此表单包含 post 对 api 的 ajax 调用所需的一切。