[英]Create html bookmarklet instead of javascript?
Is there a way to create a bookmarklet without javascript?有没有办法在没有 javascript 的情况下创建书签? Maybe with HTML?
也许用HTML? Javascript bookmarklets won't work in chrome new tabs.
Javascript 书签在 chrome 新标签页中不起作用。 What it does is it creates a javascript link to my website.
它的作用是创建一个指向我网站的 javascript 链接。 Here's the current javascript bookmarklet:
这是当前的 javascript 书签:
javascript:(function () {var script=document.createElement('script');script.src='https://MY.SITE/URL'; document.body.appendChild(script)})();
Is there a way to do it with data/html
?有没有办法用
data/html
做到这一点? Thanks in advance!提前致谢!
您可以在data:
scheme URL和书签中对 HTML 文档进行编码(尽管它不会是书签,因为它们根据定义是 JS)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.