Changeset 3245262
- Timestamp:
- 02/23/2025 05:43:10 PM (13 months ago)
- File:
-
- 1 edited
-
wp-typography/trunk/js/clean-clipboard.min.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-typography/trunk/js/clean-clipboard.min.js
r3245261 r3245262 1 /*! wp-typography clean-clipboard.js 2025-02-23 6:42: 11PM */1 /*! wp-typography clean-clipboard.js 2025-02-23 6:42:48 PM */ 2 2 window.getSelection&&document.addEventListener("copy",function(){var n=window.getSelection();if(!n.isCollapsed){for(var t=n.rangeCount,o=[],e=0;e<t;e++)o[e]=n.getRangeAt(e);var i=document.createElement("div");i.appendChild(n.getRangeAt(0).cloneContents()),i.style.position="absolute",i.style.left="-99999px",i.innerHTML=i.innerHTML.replace(/\u00AD/gi,"").replace(/\u200B/gi,""),document.body.appendChild(i),n.selectAllChildren(i),window.setTimeout(function(){i.remove(),n.removeAllRanges();for(var e=0;e<t;e++)n.addRange(o[e])},0)}});
Note: See TracChangeset
for help on using the changeset viewer.