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

创建:Skydog-cookie #251

Open
wants to merge 399 commits into
base: main
Choose a base branch
from
Open

Conversation

MoreBugOfDog
Copy link
Contributor

// Name: Skydog's Cookie
// Version: 1.0.0
// ID: SkydogCookie
// Description: Manipulate cookies! Set expiration time!
// By: MoreBugOfDog
// License: MPL-2.0
// 本拓展经过开发者严格的法律审查,不涉及任何违法行为。
// 使用本拓展造成的任何后果与开发者无关。
// Cookie的读取和储存强制添加了唯一标识符和命名空间(ccw_custom_作品链接_用户输入的name),
// path强制为/ 防止随请求携带导致错误
// 编辑器内和编辑器外cookie不同步,这是为了方便肝酱开发,非Bug

与 白猫 数据助手 拓展的不同

白猫的拓展定死了要在作品里才能删,而我的Cookie是可以根据时间自动过期,无需开启作品,这适合做登录注册、现实道具等内容,更符合实际应用
如需永久储存,可设置时间为999999999
感谢CookieCloud给我的封面提供的灵感!

安全性

为保存的cookie设置了命名空间,并添加了作品的唯一标识符认证,确保不跨作品、跨网站读取。
path强制设为 / 防止网络请求携带用户cookie导致错误

方便开发

采用 编辑器 和 详情页 隔离的设计,方便肝酱测试、开发

积木预览

image

———————————————————————————————————————————————————————
// Name: Skydog's Cookie
// Version: 1.0.0
// ID: SkydogCookie
// Description: Manipulate cookies! Set expiration time!
// By: MoreBugOfDog
// License: MPL-2.0
// This extension has been examined by the developer and is not intended to violate any laws.
// The developer is not responsible for any consequences of using this extension.
// Unique identifiers and namespaces (ccw_custom_artwork_link_user_entered_name) are enforced for cookie reading and storage.
// path is forced to be / to prevent carrying it with the request from causing errors
// In-editor and out-of-editor cookies are not synchronized, this is for the convenience of Liver Sauce developers, not a bug.

Differences from WhiteCat's Data Helper extension

WhiteCat's extension can only be deleted in the work, while my cookie can automatically expire according to the time, without opening the work, which is suitable for login and registration, reality props, etc., and more in line with the actual application.
For permanent storage, you can set the time to 9999999999.
Thanks to CookieCloud for inspiring my cover!

Security

Namespaces are set for saved cookies, and unique identifier authentication of the artwork is added to ensure that they are not read across artworks and websites.
path is forced to / to prevent web requests carrying user cookies from causing errors

Convenient for developers

The editor and detail page are isolated for easy testing and development.

MoreBugOfDog and others added 22 commits March 10, 2024 09:07
* Update easy-struct.js

fix format

* Update easy-struct.js

* Update easy-struct.js

* Update easy-struct.js

* Update easy-struct.js

* Update easy-struct.js
* Create CommentBlocks.js

* Removed description blocks and reduce the use of block functions

* allow reporter to be droped everywhere

* comment blocks.js now 100% compatible with its tw version

* renamed a few blocks

* Removed unneeded translations

* Changed extension cover

* Moved commentblocks.js and its asset to a Turbowarp folder

* Update comment blocks.js
* Update easy-struct.js

* Update easy-struct.js

* Update easy-struct.js
feat(block):获取移动设备陀螺仪,加速度计的数据
* Input V2.8

feat(code):支持检测输入法的自定义快捷键的确认事件
feat(block):添加渐变色

* Input V2.8

pref(code):支持所有ccw的域名
feat(menu):可以单独设置字体了
* More_Mouse V3.2

fix(code):修复了显示提示被全屏遮挡的BUG
fix(code):修复了在隐藏动画播放时显示提示报错的BUG
fix(block):修复并重新上线全屏系列积木

* fix More_Mouse V3.2

fix(code):全屏可能导致的BUG
feat(block):检测是否全屏,当退出全屏

* More_Mouse V3.2

fix(block):下线全屏积木

* More_Mouse V3.2

fix(code):删除多余的函数

* More_Mouse V3.2

fix(code):修复设置分辨率导致gandi渲染出问题的BUG

* More_Mouse V3.2

pref(code):优化鼠标滚轮老是卡住的问题,减小概率
* Delete wit_cat/prism-css.min.js

* Delete wit_cat/prism-javascript.min.js

* Delete wit_cat/prism-markup.min.js

* Delete wit_cat/prism-python.min.js

* Delete wit_cat/BBcode.js

* BBcode V1.8

pref(file):更新为多目录结构
feat(block):增加设置阴影

* BBcode V1.8

fix(code):测试拓展的ID忘改回去了

* bbcode V1.9

feat(code):更新诸多新的标签
fix(code):修复通过带入参数进行注入的漏洞

* BBcode V1.9

feat(code):更新主程序

* fix bbcode V1.9

fix(code):修复了因为vsc自动格式化导致的报错BUG

* BBcode V1.9

fix(code):修复了报错
feat(block):获取/设置内容/滚轮宽高
feat(code):新tag,div

* bbcode V1.9

feat(code):删除哔哩哔哩Tag

* BBcode V1.9

pref(code):删除debug代码
@xiaochen004hao
Copy link

我喜欢😎

@MoreBugOfDog
Copy link
Contributor Author

不好意思,commit有点乱

@qxsck
Copy link
Contributor

qxsck commented May 26, 2024

你这commit是什么B动静

@MoreBugOfDog
Copy link
Contributor Author

你这commit是什么B动静

不好意思哈,我上传的时候不小心按了个变基()

@kukemc
Copy link
Contributor

kukemc commented May 29, 2024

有非得多的问题,从各种角度来看cookie都不适合应用在Scratch当中

  1. cookie可以很轻易的被修改&删除
  2. 同域名下cookie公用的是同一个存储空间 最多仅能存储4KB数据(也就是说所有作品共用的是同一个容量) 如果溢出网站大概率会直接炸
  3. 当网站请求时cookie信息会自动放到请求信息中 如果cookie过大会大幅度减缓网站整体访问速度

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

Successfully merging this pull request may close these issues.