4 ms·
In-case anyone needs it, the following uBlock blocks some of the changes Microsoft made to github, like the cursor and symbol viewer. github.com##.code-navig
by yuumei 3y ago
In-case anyone needs it, the following uBlock blocks some of the changes Microsoft made to github, like the cursor and symbol viewer.
github.com##.code-navigation-cursor
github.com###symbols-pane:upward(1)
Unfortunately searching is still broken. This greasemonkey script blocks the capture of keyboard shortcuts like / ctrl space:
keycodes = [191, 17, 32]
document.addEventListener('keydown', function(e) {
if (keycodes.indexOf(e.keyCode) != -1)
{
e.cancelBubble = true;
e.stopImmediatePropagation();
}
return false;
});
- ck2 3y agoI wish ublock could do basic url rewrites without having to use greasemonkey/scripts/plugins Things like rewriting www.reddit to old.reddit without anything extra.
- Grom_PE 3y agoAfter switching browsers, I never actually reinstalled Greasemonkey as uBlock Origin has the capability to inject custom JavaScript. Check "I am an advanced user", then in "Advanced settings" set the parameter to something like: userResourcesLocation file://localhost/home/user/stuff/scriptlets.js And in the scriptlets.js file, text between the line "/// ScriptName.js" and an empty line is considered a separate scriptlet, which you can add to an URL in "My filters" like: news.ycombinator.com##+js(ScriptName.js) The annoying bit is that scriptlets are cached, and to update them, you have to edit the "userResourcesLocation" setting, for that reason I made "scriptlets1.js" a symlink to the original file and switch back and forth whenever I edit it.
- ffpip 3y agoThanks for this! But is a file URL working for you on Windows? http:// http:// URLs are working but file:// urls are not being parsed for me.
- Grom_PE 3y agoIt certainly worked for me when I used Windows. Try either of these: file:///C:/stuff/scriptlets.js file://localhost/C:/stuff/scriptlets.js I must say I wouldn't want to add a remote 3rd party URL to this setting, what if it updates with bad code?
- ffpip 3y agoAre you using Firefox? Those URLs do not work for me when using Firefox + Windows. But the code works perfectly fine when I upload it to github gists and use the raw url. And yeah, like you said do not want to inject remote JS into every site I visit so won't be using a remote URL.
- Grom_PE 3y agoNo, I'm using Vivaldi. Chromium-based browsers have an option "Allow access to file URLs" for extensions. In Firefox this functionality is missing. But it might be possible to patch omni.ja to get it anyway: https://bugzilla.mozilla.org/show_bug.cgi?id=1266960#c43 https://bugzilla.mozilla.org/show_bug.cgi?id=1266960#c43
- ffpip 3y agoYeah, figured the file access permission was the issue. Thanks for the help!