离线使用Google Gears书签“保存所有内容”

Here's a little bookmarklet I came up with, I called "SAT", stands for "Save AnyThing (for offline reading)". It uses Google Gears and works like this:

这是我想出的一个小书签,我称为“ SAT”,代表“保存任何内容(供离线阅读)”。 它使用Google Gears ,其工作方式如下:

  • you're about to go offline (maybe boarding a plane) and want to catch up on some reading

    您将要离线(也许登机),并想继续阅读
  • you visit any page

    您访问任何页面
  • you click the SAT bookmaklet

    您单击SAT小册子
  • it saves all the pages that are linked from the current page (only those on the same domain, you know, security and stuff)

    它会保存从当前页面链接的所有页面(仅知道同一域中的页面,安全性和内容)

  • you disconnect from the Net and read offline

    您断开网络连接并脱机阅读

Pretty cool, eh?

很酷吧?

Initially I wanted to experiment with Google Gears and write a phpBB extension to save the latest forum topics for offline reading. But after thinking about it a bit I thought it can be done in an even more generic way and save anything for offline reading. All you need is a page that has a bunch of links, any page - a forum, a blog, the array section of the PHP manual... anything. After you run the bookmaklet, you'll have an offline copy of all the linked pages. Gotta love those bookmarklets, nothing to install, just a click in the favourites.

最初,我想尝试使用Google Gears并编写phpBB扩展名以保存最新的论坛主题以供离线阅读。 但是经过一番思考后,我认为可以用一种更通用的方式完成此操作,并保存任何内容以供离线阅读。 您需要的是一个包含一堆链接的页面,任何页面-一个论坛,一个博客,PHP手册的array部分...等等。 运行小册子后,您将具有所有链接页面的脱机副本。 一定喜欢那些小书签,无需安装任何东西,只需在收藏夹中单击即可。

演示版 (Demo)

satdemo.png

» Click here for a recorded demo

»单击此处查看录制的演示

(demo is kinda clumsy, my first attempt in screen recording, I used Adobe Captivate, pretty bad I couldn't upload the result to youtube)

(演示有点笨拙,这是我第一次尝试进行屏幕录制,我使用了Adobe Captivate,非常糟糕,无法将结果上传到youtube)

For a live demo, you can also test the bookmarklet by simply clicking the download links below.

对于现场演示,您还可以通过单击下面的下载链接来测试小书签。

下载 (Download)

Drag those two links to your favorites/bookmarklets. The first one is to store offline pages, the second is to remove the stored versions.

将这两个链接拖到您的收藏夹/书签中。 第一个是存储脱机页面,第二个是删除存储的版本。

  • SAT

    SAT考试

  • SAT -d

    SAT

源代码 (Source code)

If you want to take a peek at the source code, the human-friendly versions are here:

如果您想看一看源代码,可以在这里找到人类友好的版本:

请注意不会离线存储的页面(Note on pages that will not be stored offline)

Not all pages will be stored offline. I'm aware of these reasons why (there might be others)

并非所有页面都将离线存储。 我知道这些原因(可能还有其他原因)

  • same-origin security policy

    同源安全策略
  • Gears won't follow redirects

    Gears不会跟随重定向

注释,错误(Comments, bugs)

Thanks for reading, any comments are appreciated. My guess is the bug count will be pretty low, due to the fact that when the sh..., er, the bug hits the fan, you'll be offline and cannot report it 🙂

感谢您的阅读,任何评论表示赞赏。 我的猜测是,由于当………………………………………………………………………………………………………………………………………………………………。

Now that I'm all set with stuff for offline reading for my short LAX-SJC flight tomorrow, I cannot help but wonder - should I still take with me a plain old reliable hardcopy of a piece of pulp fiction? You know... software breaks 🙂

现在,我已经准备好明天放下LAX-SJC短途航班供离线阅读的东西,我不禁要问-我是否仍应随身携带一份纸浆小说的普通旧可靠纸质版? 你知道...软件坏了🙂

Tell your friends about this post on Facebook and Twitter

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

翻译自: https://www.phpied.com/save-anything-offline-with-a-google-gears-bookmarklet/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值