XMOJ-Script-dev / XMOJ-Script

XMOJ增强脚本
https://www.xmoj-bbs.tech
GNU General Public License v3.0
4 stars 5 forks source link

[Feature Request] Use push notifications #335

Open boomzero opened 5 months ago

boomzero commented 5 months ago

检查项

描述

see https://web.dev/articles/push-notifications-overview

also we can remove the stupid getbbsmention and use the push API: https://developer.mozilla.org/en-US/docs/Web/API/Push_API

原因

No response

langningchen commented 5 months ago

You said that my function GetBBSMention is stupid? 😆

PythonSmall-Q commented 5 months ago

知道了。

PythonSmall-Q commented 5 months ago

assign我干嘛???

boomzero commented 4 months ago

@PythonSmall-Q 快干活

boomzero commented 4 months ago

一切皆有可能 -- @langningchen

不可能

boomzero commented 4 months ago

一切皆有可能 -- @langningchen

不可能

除非你能向xmoj服务器上传文件

langningchen commented 4 months ago

一切皆有可能 -- @langningchen

不可能

除非你能向xmoj服务器上传文件

没明白,为什么要上传文件?把文件做编码存到D1里面也可以啊

boomzero commented 4 months ago

需要service worker

On Feb 14, 2024, at 08:22, Langning Chen @.***> wrote:

一切皆有可能 -- @langningchen https://github.com/langningchen 不可能

除非你能向xmoj服务器上传文件

没明白

— Reply to this email directly, view it on GitHub https://github.com/XMOJ-Script-dev/XMOJ-Script/issues/335#issuecomment-1942896052, or unsubscribe https://github.com/notifications/unsubscribe-auth/AULMJZLVDYC5YWPYJ2MLCALYTP7U3AVCNFSM6AAAAABBPRLWJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBSHA4TMMBVGI. You are receiving this because you authored the thread.

langningchen commented 4 months ago

还是不懂......

boomzero commented 4 months ago

哦, 可能

langningchen commented 4 months ago

??? 更加疑惑了

boomzero commented 4 months ago

@langningchen https://notifications.xmoj-bbs.tech/

langningchen commented 4 months ago

@langningchen https://notifications.xmoj-bbs.tech/

langningchen commented 4 months ago

还是不知道,你这个现在里面什么也没有

boomzero commented 4 months ago

Subscribe 啊

On Feb 15, 2024, at 21:22, Langning Chen @.***> wrote:

还是不知道,你这个现在里面什么也没有

— Reply to this email directly, view it on GitHub https://github.com/XMOJ-Script-dev/XMOJ-Script/issues/335#issuecomment-1946088302, or unsubscribe https://github.com/notifications/unsubscribe-auth/AULMJZNKCB5YDFBWVHMYMCDYTYD2ZAVCNFSM6AAAAABBPRLWJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBWGA4DQMZQGI. You are receiving this because you modified the open/close state.

boomzero commented 4 months ago

image 等一会, 回自己跳出来

langningchen commented 4 months ago

然后呢?不过是不是这个网页关掉,它就不能正常工作了?是利用了系统的通知是吧?

boomzero commented 4 months ago

然后呢?不过是不是这个网页关掉,它就不能正常工作了?是利用了系统的通知是吧?

wait

boomzero commented 4 months ago

然后呢?不过是不是这个网页关掉,它就不能正常工作了?是利用了系统的通知是吧?

可以哦

langningchen commented 4 months ago

@boomzero 我也收到,你太棒了!

langningchen commented 4 months ago

恭喜你,通过这个方法,可以大大减轻服务器负担

boomzero commented 4 months ago

不对

boomzero commented 4 months ago

我不知道谁是谁

boomzero commented 4 months ago

只知道他们的subscription id, 不知道xmoj userid

langningchen commented 4 months ago

@boomzero 他是怎么发送消息的?API?

boomzero commented 4 months ago

有api

On Feb 16, 2024, at 14:19, Langning Chen @.***> wrote:

@boomzero https://github.com/boomzero 他是怎么发送消息的?API?

— Reply to this email directly, view it on GitHub https://github.com/XMOJ-Script-dev/XMOJ-Script/issues/335#issuecomment-1947821241, or unsubscribe https://github.com/notifications/unsubscribe-auth/AULMJZNLX43RG4KYUSWQ2OLYT327LAVCNFSM6AAAAABBPRLWJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBXHAZDCMRUGE. You are receiving this because you were mentioned.

langningchen commented 4 months ago

@boomzero 我发现这个文件没有弄好呢? https://notifications.xmoj-bbs.tech/OneSignalSDK.sw.js

~刚才不小心用了我同学的账号发了~

langningchen commented 4 months ago

And, did you see this? https://documentation.onesignal.com/docs/set-test-subscriptions#find-your-subscription-id-for-web-desktop

boomzero commented 4 months ago

Yes, I even filed a support ticket

On Feb 16, 2024, at 15:39, Langning Chen @.***> wrote:

And, did you see this? https:/.onesignal.com/set-test-subscriptions#find-your-subscription-id-for-web-desktop

— Reply to this email directly, view it on GitHub https://github.com/XMOJ-Script-dev/XMOJ-Script/issues/335#issuecomment-1947893060, or unsubscribe https://github.com/notifications/unsubscribe-auth/AULMJZOF7XNQOG5X3UP24YLYT4EMNAVCNFSM6AAAAABBPRLWJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBXHA4TGMBWGA. You are receiving this because you were mentioned.

boomzero commented 4 months ago

怎么了, 这是cf pages 的feature

On Feb 16, 2024, at 15:27, Langning Chen @.***> wrote:

@boomzero https://github.com/boomzero 我发现这个文件没有弄好呢? https://notifications.xmoj-bbs.tech/OneSignalSDK.sw.js

— Reply to this email directly, view it on GitHub https://github.com/XMOJ-Script-dev/XMOJ-Script/issues/335#issuecomment-1947881064, or unsubscribe https://github.com/notifications/unsubscribe-auth/AULMJZOPO7WRTOIW4QH5YBTYT4C63AVCNFSM6AAAAABBPRLWJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBXHA4DCMBWGQ. You are receiving this because you were mentioned.

langningchen commented 4 months ago

Cloudflare Pages 没法返回正常的这个文件?

boomzero commented 4 months ago

要加一个overlay=false

On Feb 16, 2024, at 15:43, Langning Chen @.***> wrote:

Cloudflare Pages 没法返回正常的这个文件?

— Reply to this email directly, view it on GitHub https://github.com/XMOJ-Script-dev/XMOJ-Script/issues/335#issuecomment-1947897054, or unsubscribe https://github.com/notifications/unsubscribe-auth/AULMJZKLR4P4MVL4NGZ7QXDYT4E3ZAVCNFSM6AAAAABBPRLWJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBXHA4TOMBVGQ. You are receiving this because you were mentioned.

boomzero commented 4 months ago

actually, I don't think I have time to fix this, so maybe @PythonSmall-Q can help me

PythonSmall-Q commented 4 months ago

没搞懂这玩意儿是怎么玩的

PythonSmall-Q commented 4 months ago

@boomzero

boomzero commented 4 months ago

FCM发自我的 iPhone在 2024年2月17日,10:53,Shan Wenxiao @.***> 写道: @boomzero

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

PythonSmall-Q commented 4 months ago

okay,but你要让我干什么

boomzero commented 4 months ago

写代码发自我的 iPhone在 2024年2月17日,10:57,Shan Wenxiao @.***> 写道: okay,but你要让我干什么

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

PythonSmall-Q commented 4 months ago

……c无语了有没有小小的提示,我已经被sitemap搞晕了

PythonSmall-Q commented 4 months ago

@boomzero https://scriptcat.org/invite-confirm?code=mbxkwt1a9jghf109

PythonSmall-Q commented 4 months ago

点一下这个链接

boomzero commented 4 months ago

提示: https://notifications.xmoj-bbs.tech

On Feb 17, 2024, at 11:01, Shan Wenxiao @.***> wrote:

……c无语了有没有小小的提示,我已经被sitemap搞晕了

— Reply to this email directly, view it on GitHub https://github.com/XMOJ-Script-dev/XMOJ-Script/issues/335#issuecomment-1949620027, or unsubscribe https://github.com/notifications/unsubscribe-auth/AULMJZMF6HIXKHZ4S4P6RJTYUAMSHAVCNFSM6AAAAABBPRLWJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBZGYZDAMBSG4. You are receiving this because you were mentioned.

boomzero commented 4 months ago

image

PythonSmall-Q commented 4 months ago

image

image

PythonSmall-Q commented 4 months ago

提示: https://notifications.xmoj-bbs.tech On Feb 17, 2024, at 11:01, Shan Wenxiao @.***> wrote: ……c无语了有没有小小的提示,我已经被sitemap搞晕了 — Reply to this email directly, view it on GitHub <#335 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AULMJZMF6HIXKHZ4S4P6RJTYUAMSHAVCNFSM6AAAAABBPRLWJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBZGYZDAMBSG4. You are receiving this because you were mentioned.

我知道,但是我不知道要干什么……