Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改隐身模式下对storage的处理 #17

Closed
wants to merge 6 commits into from

Commits on Dec 18, 2018

  1. QuotaExceededError的处理

    主要分为两种情况:
    
    1. 比如在开启隐身模式情况下,```localStorage```的大小被设置为0,这样使用 ```setItem```去存储数据是会报错的,采取的是通过检测该种情况,然后采取用一个缓存对象去代替内存,并重写```setItem```, ```getItem```等 API 进行hack的方式解决。
    
    2. 在正常情况下,浏览器是有大概 5 M 的```localStorage```使用空间(不同浏览器不同),如果存的东西比较多,就存在超出内存空间的情况,这种情况只能通过每一次执行 ```setItem```的时候去判断是不是超出内存限制了,这里使用了兼容的判断方式,不只是通过```e.name```去判断,如果出现这种错误就给用户一个提示,这里还可以继续完善就是可以让用户传一个回调,在超出内存限制的时候可以去删除一些不重要的数据进而释放空间(当然也可以直接 clear)。
    cbbfcd committed Dec 18, 2018
    Configuration menu
    Copy the full SHA
    c483d7e View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2018

  1. update with store.js@v1.0.22

    cbbfcd committed Dec 19, 2018
    Configuration menu
    Copy the full SHA
    22ea958 View commit details
    Browse the repository at this point in the history
  2. bobi: add private mode hack

    cbbfcd committed Dec 19, 2018
    Configuration menu
    Copy the full SHA
    c80f47d View commit details
    Browse the repository at this point in the history
  3. bobi: update dist file

    cbbfcd committed Dec 19, 2018
    Configuration menu
    Copy the full SHA
    3fa6428 View commit details
    Browse the repository at this point in the history
  4. add test case and remove incognito mode hack

    黄腾 authored and 黄腾 committed Dec 19, 2018
    Configuration menu
    Copy the full SHA
    1070372 View commit details
    Browse the repository at this point in the history
  5. fixed code position

    黄腾 authored and 黄腾 committed Dec 19, 2018
    Configuration menu
    Copy the full SHA
    abe6018 View commit details
    Browse the repository at this point in the history