Skip to content
项目

关于

一款 Google Chrome 扩展,可防止输入框阻止粘贴操作。

其他项目

这些数字如何统计

实测星标增长

24小时
0
7天
+1
15天
+3
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Don't f*** with copy and paste

Don't F*** With Paste - Chrome Web Store

Background

It annoys me to no end when a web application prevents me from being able to paste content into an input field, or copy it out. If I paste an incorrect email address, that's my own damn fault. I use tools like 1Password to remember all kinds of things for me, and it's actually more error prone for me to type out all the characters than it is for me to copy from 1Password and paste into a text box.

Solution

This is a dead simple Google Chrome extension that removes copy, cut and paste blocking, by preventing sites from interfering with "copy", "cut", and "paste" browser events.

This extension does not try to prevent a site from also interfering with keyboard shortcuts related to those browser actions (control-v, command-v, etc.), nor does this extension prevent sites from interfering with the "contextmenu" event (right click menu). For those super annoying sites that interfere with keyboard shortcuts and context menu, using Edit -> Paste from the browser's menu might be required.

Usage

The easiest way to activate the extension for a given site is to click on the extension icon inactive
icon, then optionally edit the auto-generated pattern, lastly click "Save":

New pattern dialog
example

After that, the extension icon should now be blue, meaning the extension is active for your current tab: active
icon

Version 2 Upgrade

Version 2 is a major update to the extension. It makes it much easier to ensure the extension is only running on sites that are bad actors with copy & paste events and it also provides visibility into the active/inactive state of the extension for each tab.

In order to provide the smoothest experience as possible, the extension needs to know when you change active tabs. In order for the extension to know about that event, it needs the tabs permission, which Chrome describes as "can read and change all your data on websites you visit." That description is very scary, and is certainly not what this extension is doing. Being an open-sourced project, you can always read all the code to see how this extension works, and what it's [not] doing with your data.

To read more about the version 2 upgrade, see: the wiki page.

Bookmarklet

If for some reason you prefer to use a bookmarklet to accomplish the same goal, you can do so by adding a bookmark to the following URI:

javascript:forceBrowserDefault=(e=>{e.stopImmediatePropagation();return true;});['copy','cut','paste'].forEach(e=>document.addEventListener(e,forceBrowserDefault,true));

bookmarklet chrome bookmarks

Now if you encounter a problematic page, you can click on this bookmark (or enter a keyword like dfwp into the address bar) in order to liberate your clipboard once more. Using this method can also help to mitigate fingerprinting, even if you are using Chrome. Note: this will not prevent blocking of clipboard events in iframes.

探索相关项目

加载中…