Recently I found a extension: Github
I found the these code in the source
app.initializers.add('capomod/pullrefresh', () => {
PullToRefresh.init({
mainElement: 'body',
triggerElement: 'body',
onRefresh() {
window.location.reload();
},
instructionsPullToRefresh: '<span style="color: var(--control-color);font-size: 13px;">下拉将要刷新</span>',
instructionsReleaseToRefresh: '<span style="color: var(--control-color);font-size: 13px;">松开将会刷新</span>',
instructionsRefreshing: '<span style="color: var(--control-color);font-size: 13px;">正在刷新</span>',
iconArrow: '<i class="fa-solid fa-arrow-up" style="color: var(--control-color);font-size: 13px;"></i>',
iconRefreshing: '<i class="fa-solid fa-spinner" style="color: var(--control-color);font-size: 13px;"></i>',
distThreshold: 95,
distMax: 120,
distReload: 100,
distIgnore: 0,
});
});
I think there are some things that don't make sense:
- When you pull refresh, you should not refresh the entire page, but load a new discussion
- Pull down refresh If you load directly onto the body, style occlusion will occur
But i can't fix it, so please help me.