bat替换脚本_用脚本替换“主页”按钮

bat替换脚本

bat替换脚本

Robert Ames commented on my previous post suggesting replacing the Home button with my little site search bookmarklet. I didn't even know this was possible, but I found it pretty cool, so I just had to try.

罗伯特·艾姆斯( Robert Ames )在我的上一篇文章中发表了评论,建议用我的小型站点搜索书签代替“主页”按钮。 我什至不知道这是可能的,但是我发现它很酷,所以我不得不尝试。

浏览器 (x-browser)

I tried this in Firefox/Mac and IE/Windows and it works just fine.

我在Firefox / Mac和IE / Windows中尝试过此方法,但效果很好。

好的,那是什么(ok, what is it?)

Well, the idea is simple: when setting the homepage in your browser, instead of providing an http://... URL, you can use the javascript:... pseudo-protocol. So for example you can type:

好吧,这个想法很简单:在浏览器中设置首页时,可以使用javascript:...伪协议来代替提供http:// ... URL,而无需使用http:// ... URL。 因此,例如,您可以输入:

javascript:alert(document.title)

And then every time you hit the Home button in the browser, an alert with the page title will pop up. How cool is that!

然后,每次在浏览器中单击“主页”按钮时,都会弹出带有页面标题的警报。 多么酷啊!

Naturally, you can replace the simple javascript with any sophisticated bookmarklet of your choosing (hint, hint)

自然地,您可以用您选择的任何复杂的bookmarklet( hinthint )替换简单的javascript。

如何 (how-to)

In Firefox on the Mac you go Firefox / Preferences. On Windows: Tools / Options. Then in the Main tab, you type/paste the bookmarklet code.

在Mac上的Firefox中,您可以进入Firefox /偏好设置。 在Windows上:工具/选项。 然后在“主要”选项卡中,键入/粘贴小书签代码。

Setting the Home to a javascript bookmarklet in Firefox

For IE/Windows go Tools / Internet Options and select the General tab

对于IE / Windows,请转到“工具” /“ Internet选项”,然后选择“常规”选项卡

Internet Explorer - setting the Home button to a javascript bookmarklet

Tell your friends about this post on Facebook and Twitter

FacebookTwitter上告诉您的朋友有关此帖子的信息

翻译自: https://www.phpied.com/replace-the-home-button-with-a-script/

bat替换脚本

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值