印象笔记书签
我正在集成一个按钮,该按钮将在我的项目中启动 Evernote Bookmarklet。小书签的代码是:
javascript:(function() {
EN_CLIP_HOST='http://www.evernote.com';
try{
var x=document.createElement('SCRIPT');
x.type='text/javascript';
x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+ (new Date().getTime()/100000);
document.getElementsByTagName('head')[0].appendChild(x);
}catch(e) {
location.href=EN_CLIP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);
}
})();
通过 HTML 链接上的 onClick 事件调用该代码。我的问题是,当 Evernote 剪辑并保存样式时,去除样式的最佳方法是什么?这样它可读吗?
I'm integrating a button that will launch the Evernote Bookmarklet in my project. The code for the bookmarklet is:
javascript:(function() {
EN_CLIP_HOST='http://www.evernote.com';
try{
var x=document.createElement('SCRIPT');
x.type='text/javascript';
x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+ (new Date().getTime()/100000);
document.getElementsByTagName('head')[0].appendChild(x);
}catch(e) {
location.href=EN_CLIP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);
}
})();
The code is called with an onClick event on a HTML link. My problem is what is the best way to strip off the styling for when the Evernote clips it and saves it? So that it readable?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
剥离造型永远不会安全,也永远不会安全。如果 Evernote 更改其响应,您的代码可能会崩溃。
您应该查看他们的 API。
Stripping the styling is never safe and never will be. If Evernote changes its response, your code will probably break.
You should take a look at their API instead.