4 ms·
You can make unselectable text on a webpage selectable by going into the browser inspector and disabling any "user-select" or similar CSS property. You can also
by bdw5204 3y ago
You can make unselectable text on a webpage selectable by going into the browser inspector and disabling any "user-select" or similar CSS property. You can also inject a "user-select: all" into the HTML element containing the text if you can't find which parent element has the "user-select: none".
You can also disable any right click blocking JavaScript or other user-hostile JavaScript in the browser inspector by running JavaScript code in the console to remove any HTML event listeners for right click (typically its oncontextmenu so just set "document.body.oncontextmenu" or "{element that has the property set}.oncontextmenu" to something like null or return true).
*The specific procedure will be slightly different for every site because it is written differently.
- Raidion 3y agoSometimes sites have code that triggers in debug mode and keeps it in a loop. Any tips there, or is the "break and modify source to remove it" the only way?
- TeMPOraL 3y agoOne should be able to put code for both removing listeners and adding the CSS override into a bookmarked. That will not trigger the anti-debugging crap.
- savolai 3y agoAdd this as bookmarklet i.e. url contents in bookmark: javascript:(function(){var style=document.createElement('style');style.type='text/css';style.innerHTML='* { user-select: all !important; }';document.head.appendChild(style);document.body.oncontextmenu=function(){return true;};})(); (Untested)
- chrismorgan 3y ago> style.type='text/css'; Superfluous. I don’t understand why people often do this on stylesheets or scripts (type="text/javascript"), because it has never at any time been necessary or useful.
- StingyJelly 3y agoThis somehow breaks text selection for me (just selects all text). Here are some useful bookmarklets including a working one to enable right-click and text selection: https://github.com/alanhogan/bookmarklets https://github.com/alanhogan/bookmarklets
- StingyJelly 3y agoJust a note, run them trough https://alanhogan.github.io/bookmarkleter/ https://alanhogan.github.io/bookmarkleter/ before creating the bookmark
- netsharc 3y agoDisable stopping on breakpoints: https://i.stack.imgur.com/xr0X9.png https://i.stack.imgur.com/xr0X9.png
- Jap2-0 3y agoIn Firefox, shift+right click to bypass anything blocking right click (or providing a non-browser context menu)
- alex_duf 3y agoI had no idea, thanks for the tip!
- ajsnigrutin 3y agoWhy is this even a feature in browsers?
- wenebego 3y agoIn case you dont want a user selecting some text or you want to implement a custom context menu
- neuralRiot 3y agoGreasemonkey or tampermonkey is a great tool to create scripts (or download them if you don’t know how) to do these tricks automatically.