Tampermonkey® by Jan Biniok

近期变动

5.1.0
2024-03-15
It will soon be necessary to enable developer mode to run userscripts via Tampermonkey.
Instructions on how to enable it can be found here.
This release includes significant updates for future Manifest V3 compatibility. Please report any issues here.
General
Updated GM_download to initiate downloads in parallel again
Resolved a failure when accessing xhr.responseXML of HTTP responses
UI
Repaired the 'Sync Now' button
Corrected the 'Save To Disk' button in the editor
Sync
Implemented anonymous requests for WebDAV to prevent overwriting of browser sessions
Fixed WebDAV-based sync in cases of unexpected existing folder structures
Reworked to reduce some authentication requests
Locales
Updated Danish translation | thanks to jhertel
Updated Chinese (simplified) translation | thanks to PaperStrike
5.0.1
2024-01-03
General
Resolved issue with GM_notification url property when no onclick listener is set
No longer displaying script modification conflict warnings when there's no conflict
Resolved an issue with Instant Injection mode when a script requires a local file
Addressed problems related to script installation from certain Gitlab URLs
Removed warning about script updates being disabled upon script modification
UI
Restored application of custom CSS to installation pages
Resolved quirks in the darker theme
Corrected 'replace all' functionality in code editor for certain strings
Locales
Updated Russian translation | thanks to adem4ik
Updated Vietnamese translation | thanks to IoeCmcomc
Updated Japanese translation | thanks to maboroshin and shirayuki
Updated Italian translation | thanks to bovirus
Known Issues
GM_download starts downloads serialized
5.0.0
2023-11-30
此版本包含了对未来Manifest V3兼容性的重大更新。请在这里报告任何问题。
Microsoft Edge
内容安全策略(CSP)指令默认不再放宽
注:
  • 脚本注入应该按预期工作,但是一些用户脚本可能依赖于放宽的CSP
  • 通过将'修改现有内容安全策略(CSP)头'设置为'是',可以恢复之前的行为
已经抑制了警告消息'现在无法编辑标签'
General
解决了可能导致崩溃的几个内部问题
重构了版本号解析器以支持ISO格式日期
注意:由于这个变化,1.0-0.3现在被认为是比1.0低的版本号
修复了window.showDirectoryPicker
引入了GM_notification tag以覆盖现有通知
添加了GM_notification url属性以在点击时打开新标签页(可以通过onClick事件通过preventDefault取消)
当用户脚本卸载时,通知现在会自动关闭,前提是没有指定urltag
添加了GM_registerMenuCommand id参数以更新现有命令
引入了GM_registerMenuCommand title参数
GM_registerMenuCommand中添加了一个选项,以防止点击时自动关闭弹出窗口
修复了GM_download以防止onload触发过于频繁
进行了与Instant Navigation相关的重构
现在在ESLint配置中接受用户定义的全局变量
增强了沙箱window addEventListener以支持EventListenerObjects
在将脚本保存到磁盘时添加了脚本版本号
本地修改的脚本将不会自动更新,但现在可以通过手动更新和确认进行还原
修复了GM_xmlhttpRequest FormData键值顺序
调整了ESLint以允许顶级等待
解决了由于getPlatformInfo响应不正确导致的BSD问题
现在检测到新的GreasyFork脚本URL
UI
只有在更改被保存后,才能启用立即同步和重置同步
修复了脚本搜索徽章模式以显示准确的数字
当标签过多时,现在可以水平滚动标签
即键即搜始终从当前位置开始
Locales
更新了意大利语翻译 | 感谢 bovirus
更新了巴西葡萄牙语翻译 | 感谢 igorruckert
更新了日语翻译 | 感谢 shirayuki
更新了俄语翻译 | 感谢 ACherepkov1989
更新了土耳其语翻译 | 感谢 selimsumlu
更新了繁体中文翻译 | 感谢 5idereal
更新了法语翻译 | 感谢 Juknum
Known Issues
即时注入模式目前与需要本地文件的脚本不兼容
当在Firefox中启用'始终使用私人浏览模式'时,可能会发生崩溃。建议禁用此设置或降级到版本4.19.0
4.19.0
2023-05-24
General
如果安装了Tampermonkey编辑器扩展,在vscode.dev支持用户脚本编辑
允许下载云备份
修复嵌入帧移除时活动脚本计数的问题
修复'添加GM函数到this或window'选项的自动检测模式
修复'修改现有内容安全策略头'选项的'是'值消失的问题
修复 GM.download(url, name)
修复 GM_setValue 处理二进制内容的问题
修复堆栈跟踪中的用户脚本链接有时无法打开的问题
修复菜单命令监听器有时被执行多次的问题
修复 GM_deleteValue 在背景中真正删除值的问题
使存储编辑器也显示 undefined
修复调用 document.write 后出现的问题
为manifest v3进行内部清理和重构
改善黑名单脚本的可视化
将ESLint更新到8.32.0
UI
引入Tam,您的入门帮助助手
每个脚本显示更多站点图标
输入时搜索编辑器
确保编辑器搜索结果在视图中滚动
如果垃圾箱被禁用,在仪表板中删除脚本时进行确认
Sync
无论启动顺序如何,使TamperDAV 脚本更改检测正常工作
使用WebDAV时,按照规范将尾部斜杠符号添加到集合名称
修复启用和禁用同步的问题
Locales
本地化扩展名和描述
更新意大利语翻译 | 感谢bovirus
更新日语翻译 | 感谢shirayuki
更新简体中文翻译 | 感谢gin3715
更新俄语翻译 | 感谢Tyemak
更新丹麦语翻译 | 感谢jhertel
Experimental
添加实验性的GM_info.userAgentData,其中包含NavigatorUAData的所有属性以及一些"高熵"值
4.18.1
2022-11-13
如果在更新后遇到不可靠的脚本注入,请查看本常见问题条目
General
修复 GM_unregisterMenuCommand
修复 GM.saveTab
@sandbox 总是默认为 raw
console 方法再次变为可枚举
默认禁用 wrappedJSObject 兼容性选项
内部重构和清理
Sync
修复了在同步触发的变更导入时禁用脚本更新的问题
4.16.1
2022-05-03
General
Fix issues with heavily increased page loading time caused by some scripts or @requires
UI
Allow drag and drop inside the editor again
Locales
Update Chinese (traditional) translation | thanks to SiderealArt
Update Italian translation | thanks to bovirus
Update Danish translation | thanks to will2022
4.16
2022-04-07
General
Sandbox improvements
Improved compatibility for userstyles installed as userscript
Add an option to control whether to bind GM API functions to the userscript's execution context and sandbox window (and do it by default only if necessary)
Details: Enabling this makes it very easy for a userscript to accidentally leak its granted powers to the page
Treat @include a little bit more like @match if :// is present and add an option to control @include's behavior
Details: Many script developers expect @include *://tmnk.net/* to match pages at tmnk.net only, but it also matches https://example.com/?http://tmnk.net/.
To improve this, @includes that contain a :// are now interpreted a little bit different. Every * before :// now only matches the URL scheme. Also, if :// is directly followed by a * or a / somewhere, then the first * or all until / are applied to the hostname only.
Fix encoding of userscript file and URL imports
External @require and @resource content is not updated by default anymore unless the script was updated
UI
Show script and external resources size in dashboard
Show last updated time as relative time if within 4 weeks or as absolute date otherwise
Fix darker theme quirk
Fix favicons with transparent background
Improve editor menu if advanced editor is disabled
4.15
2022-03-09
General
Allow userscript installation via drag and drop to options page also in case local file access is disabled
UI
Fix script positioning via drag and drop
Decrease extension size by removing jQuery dependency
Locales
Update Turkish translation | thanks to Tmp341
4.14
2022-01-22
General
Make trash configurable (on/off/session only)
GM_xmlhttpRequest.responseType 'stream' support
Improve GM_xmlhttpRequest event timings and make response readable on request errors as well
Fix GM_xmlhttpRequest to forward status and statusText in fetch mode once available
Fix cookie overwriting in anonymous GM_xmlhttpRequest mode
Allow GM_getValue to return undefined as value
Improve JavaScript scriptlet support via @unwrap tag
Make GM_notification.highlight focus the window as well
Add MouseEvent/KeyboardEvent argument to GM_registerMenuCommand callbacks
Add a focus method to the return value of GM_openInTab
Add a global and a per script setting to choose whether to run in incognito tabs
Add some more audio formats to the download file extension whitelist
Use up to ES2022 for linting if supported by the browser
Update ESLint
Add more second level domains (for .tld)
Always log an error at the page console if a @require or @resource couldn't be loaded
Fix several issues with older browser versions
Fix issues caused by extremely delayed setTimeout(..., 0) calls
Fix some userscript injection issues
Make cloud service re-authentication without user intervention less disturbing
Show an internal notification in case of an available extension update only*
* this will only affect the next update, sorry
Fix some rare exceptions happening in the wild
Sandbox improvements
Internal rework and cleanup
UI
Shift key + mouse click based multi select
Dark mode improvements
Prefer an explicit set @name:en over @name
Show localized userscript name and description if available where possible
Update page title if script is renamed by save
Keep CRLF line endings on edit
Make import from URL support zip, JSON and plain userscript files
Replace worker based image cache to avoid problems at some browsers
Use higher resolution if Google's favicons service is used
Fix opening of zero byte externals
Use eslint-plugin-userscripts to highlight userscript header issues
Fix storage 'Reload' button and add 'Reset'
Fix ESLint to allow top-level await
Sync
Add a button to force a sync
WebDAV improvements
Fix unnecessary repeated exports
Trigger sync on move to trash
Fix TamperDAV double sync issue
Locales
Update Russian translation | thanks to wvxwxvw
Update Chinese (traditional) translation | thanks to ndbiaw and SiderealArt
Update Chinese (simplified) translation | thanks to xiaopangju and dnknn
Update Italian translation | thanks to bovirus
Update French translation | thanks to omerien
Update Portuguese-Brazil translation | thanks to igorruckert
Update Hindi translation | thanks to Yash-Singh1
Update Japanese translation | thanks to shirayuki
4.13.6138
2021-05-04
General
Userscript Search integration
(search on popup menu entry click, on popup menu open or always)
Improve topbar announcements to not hide existing messages
@antifeature support
Add Userscript menu commands to the page's context menu
`@run-at context-menu scripts now require a @include or @match statement (like all other scripts)
Speed up extension storage operations
Sandbox fixes
Speed up injection
Speed up and fix handling of large GM_xmlhttpRequest responses
GM_xmlhttpRequest data might be available at readyState 3 now
Fix GM_download calls in non-native mode if executed too quickly one after the other
Add option whether to import script data and/or externals
Fix SHA-256 calculation for sub-resource integration (SRI) check of some files
Fix GM_xmlhttpRequest authentication via user and password (including fetch mode)
Fix a continuing script execution problem of scripts running on browser start
Fix GM_notification sometimes not using the given image
Fix a sandbox issue which caused DOMContentLoaded being fired after the load event
Fix GM_setStyle/GM_addElement of document-start scripts in case of very early script execution
Update CodeMirror editor to version 5.58.2
Update JSZip to 3.5.0
UI
Add script trash
Add script removal entry to popup menu
Improve search bar to not hide script content
Add option to automatically highlight selected or hovered words
Fix the 'Find Next' button after search was opened
Fix flashing layout shift if an @include's favicon can't be loaded
Fix tab layout issue at very high zoom-levels at MacOS and Windows
Add a default @icon tag showing the domain's favicon if a URL is available
Add an option to add the current domain to the blacklisted pages list
Add a reload button to the script storage tab
Remember the last chosen cloud storage at the 'Utilities' tab
Make the 'Dashboard' item's alt action (Ctrl+Click, middle or right mouse click) open it with the current tab's URL as filter
Update darker theme | thanks to narcolepticinsomniac
Sync
Various improvements
Experimental
Top-level await support
Allow experimental GM_addElement to operate on shadow DOM
Locales
Add Danish translation | thanks to will2022
Update Italian translation | thanks to bovirus
Update Japanese translation | thanks to shirayuki
Update Turkish translation | thanks to Tmp341
Update Portuguese-Brazil translation | thanks to igorruckert
Update Chinese (simplified) translation | thanks to xiaopangju
Update Chinese (traditional) translation | thanks to asthzh
Update Chinese (simplified) translation | thanks to ff98sha
Update Russian translation | thanks to wvxwxvw
Update Vietnamese translation | thanks to IoeCmcomc
Update Chinese (simplified) translation | thanks to CaveNightingale, Vstory and xiaopangju
Update Russian translation | thanks to vanja-san
Update French translation | thanks to omerien
4.11.6120
2020-09-17
Chrome >= 59
General
Fix script export if many or large scripts are installed
Make @match hostname and scheme case insensitive by default
Update ESLint
Use ES2020 for linting if supported by browser
Allow downloads to subfolders again
Experimental window.onurlchange support
Disable automatic script update on script modification
Fix @run-at context-menu at some pages and after scripts were enable or disabled
Fix GM_xmlhttpRequest exceptions related to responseType 'document' and 'text'
Fix fetch-based GM_xmlhttpRequest.details.revalidate
Improve @connect permission request handling
Fix GM.notification promise never being resolved
Fix GM_xmlhttpRequest.abort and GM_download.abort
Make limited host permissions work for redirected GM_xmlhttpRequest requests
Fix setting GM_download.details.headers
Fix GM.setClipboard
Fix GM_deleteValue
Replace experimental GM_addScript by GM_addElement support to workaround page CSP issues
Add option to entirely remove CSP if userscripts are supposed to run
Add .co.za to .tld list
Add ESLint rule id to error messages
UI
Dark theme update
Allow tab size configuration
Show incognito mode warning at script installation and import pages as well
Add script update item to editor file menu
'Darker' theme update
Add script version to tab description
Locales
Update Arabic translation | thanks to naqqo6i
Update Indonesian translation | thanks to ReksaTresna
Update Japanese translation | thanks to shirayuki
Update Vietnamese translation | thanks to IoeCmcomc
Update Ukrainian translation | thanks to toplinden
Update Serbian translation | thanks to zoranzoki21
Sync
Improve OneDrive request error handling
Fix Yandex.Disk authentication
Change backup file name to avoid character issues with some WebDAV servers
4.10.6111
2020-02-18
Chrome >= 45
General
Update ESLint
Allow to derive custom linter config from eslint:recommended
GM_xmlhttpRequest.onloadend support
Fix GM_xmlhttpRequest.overrideMimeType of anonymous requests
Fix GM.getTab and GM.getTabs
GM_xmlhttpRequest: Fix protocol-relative URLs
GM_xmlhttpRequest: Fix reported status of requests in progress
Add robustness to sandbox creation
Allow plain scripts to be imported via file import as well
Add GM_info.isFirstPartyIsolation
Allow scripts to be recognized more easily at the developer tools
Internal cleanup and speedup
Fix an issue that user *cludes caused script update confirmation dialogs
UI
Fix WebDAV credentials being used for import and export
Accept more WebDAV server URLs formats
Improve popup menu layout when warnings or hints are shown
Fix several editor search issues
Speed up script search
'Darker' theme update
Fix an popup menu issue when GM_registerMenuCommand is executed
Allow scripts to be removed via editor menu
Sync
Fix an issue that some remote source code changes were not applied correctly
Locales
Update Japanese translation | thanks to shirayuki
Update Chinese (traditional) translation | thanks to austin-chang
Update Italian translation | thanks to bovirus
Update Indonesian translation | thanks to Azhe403
Update Portuguese-Brazil translation | thanks to igorruckert
4.9
2019-11-15
General
Dark theme including OS support
Request host access if runtime permissions are limited
Fix installation of UTF-8 encoded local files
Allow more GM_xmlhttpRequest headers to be modified
Make GM_xmlhttpRequest.finalUrl available on progress events as well
Fix GM_openInTab.close when the tab is currently moved
Implement GM_notification silent option
Fix GM_notification onclose listener
Make GM_notification user interaction mandatory if possible
Speed up script execution after iframe reload/navigation
Add .co.nz to .tld
Fix sometimes not working second level domain check
Allow multiple @webRequest tags
Sandbox fixes
Support SHA-256 subresource integrity hashes independently of the browser's crypto API
Update FileSaver.js
tab.pendingUrl support
Remove functionality to import native scripts to reduce the number of used permissions
Remove unused contentSettings permission
UI
Scroll tab view content instead of page
Speed-up initialization
Always show 'Search' and 'Add new script' menu items
Add a more obvious (Ctrl+Click or middle mouse click) way to edit scripts from the popup menu
Outline executed but inactive scripts at the popup menu
Fix script filter icon visibility
Fix version number based sorting
Fix drag and drop based script ordering at high-DPI screens
Fix script editor height and resulting problems
Check for unsaved changes before tab close/reload | thanks to narcolepticinsomniac
Add an option to enable/disable scripts at their settings tab
Remember script storage export setting
Sync
Yandex.Disk support
Add script synchronization using OneDrive
Add a button to revoke Google Drive access tokens
Use refresh tokens for less Google Drive re-authorization requests
Note: you need to revoke existing access tokens at the utilities tab to make use of this
Locales
Add Belarusian translation | thanks to bogachenko
Add Dutch translation | thanks to The947thTokay
Update Russian and Ukrainian translation | thanks to bogachenko
Update Indonesian translation | thanks to ReksaTresna and Azhe403
Update Vietnamese translation | thanks to vigov5
Update Italian translation | thanks to bovirus
Update Portuguese-Brazil translation | thanks to igorruckert
Update Turkish translation | thanks to Tmp341
Update Japanese translation | thanks to shirayuki
Update Chinese (traditional) translation | thanks to PeterDaveHello, cedarkuo and hsuan1117
Update Spanish translation | thanks to TBM13
Update French translation | thanks to zek0faws
4.8.41
2019-05-06
General
Re-enable persistent storage in incognito mode
Fix GM_xmlhttpRequest onabort callback
Fix GM_xmlhttpRequest blob response type property
Fix an issue where uBlock Origin prevents script execution
Sandbox fixes
Sync
Fix cloud services authentication