V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  hackpro  ›  全部回复第 2 页 / 共 148 页
回复总数  2955
1  2  3  4  5  6  7  8  9  10 ... 148  
@wowh 老哥顺便请教下你的 1p mini 浏览器小窗口也是 dark 背景吗
我记得原版的好像不是这样还是脚本改了什么东西 每次扒拉账号信息看起来好吃力😄
@wowh 感谢老哥
我测了手头俩台设备 好像只有 M 系列才有这个问题 intel 10.15 没问题🤣
和官网原始版本( 6.8.9 )最大的不同就是现在完全不需要输入 master 密码解锁
Alfred launch 后直接就解锁了🔓

不知道有其他大佬也是这样的情况吗😄😄
我用 Gemini 把 https://github.com/wowh/1password
和之前的代码 https://github.com/scramblr/1password 做了比对

大家可以参考一下


While they are both versions of the Stanford JavaScript Crypto Library (SJCL) and share about 99% of the same logic, Code 2 contains environment-safety modifications that are missing in Code 1.

Specifically, Code 2 has been updated to be more "environment-aware" (likely to prevent crashes in Node.js or Server-Side Rendering environments), whereas Code 1 is a more traditional browser-only minification.

Key Logical Differences
Here are the specific areas where the logic differs beyond simple formatting:

1. Environment Safety Checks (window and document)
In the sjcl.random.startCollectors and stopCollectors functions, Code 2 adds checks to see if window or document are defined before accessing them.

Code 1:

JavaScript

if(window.addEventListener){ ... }
else if(document.attachEvent){ ... }
Logic: This will throw a ReferenceError in environments like Node.js because window is not defined.

Code 2:

JavaScript

if (typeof window !== "undefined" && window.addEventListener) { ... }
else if (typeof document !== "undefined" && document.attachEvent) { ... }
Logic: This is safe. It checks the type first, so it won't crash in non-browser environments.

2. Error Handling Removal
In the startCollectors function, Code 1 has a fallback error that Code 2 has removed.

Code 1:

JavaScript

else throw new sjcl.exception.bug("can't attach event");
Code 2: The else block is entirely removed. If it can't find window or document, it simply does nothing rather than throwing an exception.

3. Stop Collectors Logic
A similar change exists in stopCollectors:

Code 1: Directly checks window.removeEventListener.

Code 2: Checks typeof window !== "undefined" before attempting to access window.removeEventListener.



While they share the same core cryptographic libraries (SJCL) and general business logic, Code 2 is a significantly modified version of Code 1, specifically updated to be compatible with Chrome Extension Manifest V3 (MV3). Code 1 is written for the older Manifest V2 (MV2) standard.

Here are the specific logical and functional differences:

1. Global Scope Reference (window vs. self)
Since Manifest V3 uses Service Workers (which do not have access to the window object), the global scope references have been changed.

Code 1: Uses window (e.g., n='undefined'!=typeof window&&window===this?this... and window.OnePassword=r).

Code 2: Uses self or globalThis (e.g., n = 'undefined' != typeof self && self.self === self ? self... and self.OnePassword = r).

2. Browser Action API
Chrome changed the "Browser Action" API to a generic "Action" API in Manifest V3.

Code 1: Uses chrome.browserAction (e.g., chrome.browserAction.onClicked... and chrome.browserAction.enable()).

Code 2: Uses chrome.action (e.g., chrome.action.onClicked... and chrome.action.enable()).

3. Navigation Interception (webRequest vs. tabs)
This is the most significant logical rewrite. Manifest V3 restricts the use of blocking webRequest.

Code 1: Uses chrome.webRequest.onBeforeRequest with the ['blocking'] attribute to intercept URLs containing onepasswdfill.

Code 2: Completely removes the webRequest logic and replaces it with a chrome.tabs.onUpdated listener. It now watches for tab updates to detect those specific URLs instead of intercepting the network request.

4. Context Menus Implementation
Code 1: Uses the onclick property directly inside the chrome.contextMenus.create object.

Code 2: Removes the onclick property from the creation object (as it's forbidden in MV3) and implements a centralized listener using chrome.contextMenus.onClicked.addListener. It also adds a mandatory id to the menu item.

5. URL API Modernization
Code 1: Accesses the URL constructor via window.URL || window.webkitURL.

Code 2: Accesses it via globalThis.URL || URL.
我倒是觉得窗口切不切换的无所谓
但是自己写了一款应用把高频使用的软件磁吸在窗口边缘 即点即用
2025 年 12 月 27 日
回复了 XavierOops 创建的主题 Apple iPod touch 16 到祸啦
确实很香 我的是 18.6.2😄
2025 年 12 月 23 日
回复了 tmf4ck 创建的主题 macOS 现在 Mac 下有啥免费听歌软件
@HENQIGUAI 网站直接报毒?
2025 年 12 月 12 日
回复了 Jungeer 创建的主题 Apple 有准确消息 M6 或者 M5 max 啥时候出吗
笔记本 OLED 不得瞎眼 出了正好买 M5😄
@hahaFck #30 老哥具体说说
我有 MAS 版 Version 3.10.23 (11360)
如果官网买这个版本的话 有 OCR 和 Ai 那些功能吗?
2025 年 11 月 24 日
回复了 shimanooo 创建的主题 iPhone 外版 iPhone 是不是可以频繁 Transfer eSIM?
@PhDMartin 找错人了吧
不错 圆润了很多
为啥是俩个脚本啊
2025 年 11 月 12 日
回复了 shimanooo 创建的主题 iPhone 外版 iPhone 是不是可以频繁 Transfer eSIM?
Yes 没有限制🚫
2025 年 11 月 10 日
回复了 Tiberisino 创建的主题 奇思妙想 我们真的需要一个「发现脚本的脚本」
@suhu

https://github.com/jae-jae/Userscript-Plus
和这个比有啥优势或者区别吗
2025 年 11 月 5 日
回复了 cyersvet 创建的主题 Apple 苹果网页版 App Store 源代码发布
难怪最近 iOS 抓包断点不起作用了😄
2025 年 11 月 5 日
回复了 summerhot 创建的主题 iPad iPad 海外 蜂窝版本 可以安装 esim 吗
都没号码 哪来的短信
2025 年 10 月 30 日
回复了 l1ve 创建的主题 MacBook Pro 手持 M1 Max,换到 M5 Max 是否会有明显提升
现在哪来的 M5 Max😂🤣
@Amex 但凡能克服点 我都不至于来发这个帖😂
哪个网站 爆出来避个雷
1  2  3  4  5  6  7  8  9  10 ... 148  
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   5233 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 43ms · UTC 06:57 · PVG 14:57 · LAX 22:57 · JFK 01:57
♥ Do have faith in what you're doing.