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

能否增加删除单条数据的功能?或者有什么替代解决方案? #537

Closed
kfbyhyq opened this issue Jun 5, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@kfbyhyq
Copy link

kfbyhyq commented Jun 5, 2020

您的功能请求是否与问题有关? 请描述一下。

昨天keepfrds一直打不开,但是刷新数据的时候不知道怎么读出了一条奇怪的数据,看下图积分:
微信图片_20200605125324
现在我的数据统计的积分一栏,被这个搞崩了比例。我尝试备份数据,在备份文件里删掉单独这一条,但是存在校验码,无法恢复。

描述你想要的解决方案

不知道有没有什么方法可以解决这一问题?如果没有的话能不能增加一个删除单条数据的功能?

描述您考虑过的替代方案

其他附加信息

@kfbyhyq kfbyhyq added the enhancement New feature or request label Jun 5, 2020
@Rhilip
Copy link
Collaborator

Rhilip commented Jun 5, 2020

emmm,目前来说没有,不过可以用背景页方法的形式临时解决。
执行命令前请保存一份备份,具体如下

let data_key = 'PT-Plugin-Plus-User-Datas';
chrome.storage.local.get(data_key, (result) => {
    delete result[data_key]['pt.keepfrds.com']['2020-06-04'];
	chrome.storage.local.set(result, () => {
        console.log('UPDATE');
    });
});

然后由于扩展内部有缓存,所以把扩展禁用再启用应该就可以了。
关于增加删除单条数据,这个得看,因为目前 #421 #327 等issue还未解决。

@kfbyhyq
Copy link
Author

kfbyhyq commented Jun 5, 2020

emmm,目前来说没有,不过可以用背景页方法的形式临时解决。
执行命令前请保存一份备份,具体如下

let data_key = 'PT-Plugin-Plus-User-Datas';
chrome.storage.local.get(data_key, (result) => {
    delete result[data_key]['pt.keepfrds.com']['2020-06-04'];
	chrome.storage.local.set(result, () => {
        console.log('UPDATE');
    });
});

然后由于扩展内部有缓存,所以把扩展禁用再启用应该就可以了。
关于增加删除单条数据,这个得看,因为目前 #421 #327 等issue还未解决。

感谢大佬!弱弱地问一下,用什么执行这个命令orz

@Rhilip
Copy link
Collaborator

Rhilip commented Jun 5, 2020

参考Wiki说明 https://github.com/ronggang/PT-Plugin-Plus/wiki/how-to-open-background-page
在背景页的Console选项卡里面输入命令

@kfbyhyq
Copy link
Author

kfbyhyq commented Jun 5, 2020

搞定了,多谢!顺便我发现 #421 #327 的问题在我这里不存在,少一天是可以平滑连过去的。
微信图片_20200605194157

@183011781
Copy link

经过十几次操作,终于搞定了。。。感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants