I modified the browser extension to work for Macs. It might also work for PCs, but I'm not on one right now, so I can't tell.
This plugin also solves a related problem with cutting and pasting. Feel free to modify this to your heart's desire.
To install this in Chrome, just create a new folder and save these files to it. Then go to chrome://extensions/ and enable Developer mode. Just click Load Unpacked Extension, and select the folder!
contentscript.js
document.addEventListener('keydown', function(e) {
if (e.metaKey||e.ctrlKey) {
switch (e.keyCode) {
case 70: // F find
case 71: // G find-next
case 86: // V paste
case 88: // X cut
case 90: // Z undo
e.stopImmediatePropagation();
return;
}
}
}, true);
manifest.json
{
"name": "Stack Overflow shortcut disabler",
"manifest_version": 2,
"version": "1.0",
"content_scripts": [{
"js": ["contentscript.js"],
"matches": [
"http://stackoverflow.com/*",
"http://*.stackoverflow.com/*",
"http://superuser.com/*",
"http://meta.superuser.com/*",
"http://serverfault.com/*",
"http://meta.serverfault.com/*",
"http://askubuntu.com/*",
"http://meta.askubuntu.com/*",
"http://*.stackexchange.com/*",
"http://mathoverflow.net/*",
"http://*.mathoverflow.net/*",
"http://stackapps.com/*"
]
}]
}
OK, I'll also edit the user script:
// ==UserScript==
// @name Stack Overflow shortcut disabler
// @version 1.0
// @match http://stackoverflow.com/*
// @match http://*.stackoverflow.com/*
// @match http://superuser.com/*
// @match http://meta.superuser.com/*
// @match http://serverfault.com/*
// @match http://meta.serverfault.com/*
// @match http://askubuntu.com/*
// @match http://meta.askubuntu.com/*
// @match http://*.stackexchange.com/*
// @match http://mathoverflow.net/*
// @match http://*.mathoverflow.net/*
// @match http://stackapps.com/*
// @run-at document-end
// @grant none
// ==/UserScript==
(typeof unsafeWindow !== 'undefined' ? unsafeWindow : window).$(function() {
document.addEventListener('keydown', function(e) {
if (e.metaKey||e.ctrlKey) {
switch (e.keyCode) {
case 70: // F find
case 71: // G find-next
case 86: // V paste
case 88: // X cut
case 90: // Z undo
e.stopImmediatePropagation();
return;
}
}
}, true);
});
Cmd
+B
orCmd
+I
for the expected bold and italic shortcuts? – Alexander O'Mara Jun 4 '16 at 4:17