Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Monkey-patching browser APIs with ZeroFrame

Đang mở
#141 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
javascript
Lĩnh vực
frontend, web-dev

Hướng nghiên cứu

Bắt đầu từ việc monkey-patching API trình duyệt AJAX hiện có và theo dõi cách các hành động của wrapper ZeroFrame được gọi. Đánh giá tính khả thi của việc chặn localStorage và History, bao gồm cả việc viết lại URL, sau đó xem xét wrapperOpenWindow và wrapperSetTitle; được coi là hoàn tất khi các thư viện bên thứ ba được hỗ trợ có thể sử dụng các API này mà không cần sửa đổi dành riêng cho ZeroNet.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

ZeroFrame currently monkey-patches AJAX browser APIs to add AJAX key. It would also be good to monkey-patch some other browser APIs, like localStorage or history, to call ZeroFrame's wrapper actions instead of directly browser APIs. This would make it possible to use some third-party libraries (like JS routers which use History API, maybe some storage helpers) with ZeroNet without any modifications to them (this currently requires to modify them to use ZeroFrame instead of browser APIs).

Some of APIs which should be monkey-patched are:

  • localStorage: Use wrapper's wrapperGetLocalStorage and wrapperSetLocalStorage. However, I don't know if this is possible because browsers prevent accessing and modifying localStorage object in iframe sandbox.

  • History: Use wrapperGetState, wrapperPushState, wrapperReplaceState and correctly handle URL rewrites in other History's objects. This would be easier because you can access them inside sandbox, but they just don't do anything.

  • As well as some other wrapper actions like wrapperOpenWindow and wrapperSetTitle.

Ngôn ngữ chính
JavaScript
Star
73
Fork
69
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của HelloZeroNet/ZeroHello

Tất cả issue của HelloZeroNet/ZeroHello

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.