让 JavaScript 书签在新选项卡/窗口中打开?
我从 Dirpy 那里得到了一个书签。当您观看 YouTube 视频并单击它时,它会自动带您前往 Dirpy 网站下载该视频。有没有办法让它在新窗口/选项卡中打开? 我尝试了一些非常简单的事情,但我对 JavaScript 不了解,所以它们不起作用。
这是脚本:
javascript:%20/*_Dirpy_Studio_Bookmarklet_*/(function(){var%20b=document.getElementsByTagName("head")[0];var%20c=new%20Date().getTime() ;var%20a=document.createElement("script");a.src="http://dirpy.com/js/studio-b ookmarklet.js?"+c;a.onload=a.onreadystatechange=function(){if(!loaded&&(!this.readyState||this.readyState=="已加载"||this.readyState=="完成")){a.onload=a.onreadystatechange=null;b.removeChild(a)}};b.appendChild(a)})();
谢谢!
I got a bookmarklet from Dirpy. When you're on a YouTube video, and you click it, it automatically takes you to the Dirpy website to download the video. Is there a way to make it open in a new window/tab?
I've tried a few very simple things, but I have no idea about JavaScript, so they didn't work.
Here's the script:
javascript:%20/*_Dirpy_Studio_Bookmarklet_*/(function(){var%20b=document.getElementsByTagName("head")[0];var%20c=new%20Date().getTime();var%20a=document.createElement("script");a.src="http://dirpy.com/js/studio-bookmarklet.js?"+c;a.onload=a.onreadystatechange=function(){if(!loaded&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){a.onload=a.onreadystatechange=null;b.removeChild(a)}};b.appendChild(a)})();
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
到 dirpy.com 的重定向是在外部脚本中完成的,因此除非您重写它,否则不会。
The redirect to dirpy.com is done in the external script, so unless you rewrite that, no.