Remove RESser
This commit is contained in:
parent
2f94174353
commit
c13f837c62
10
README.md
10
README.md
|
@ -101,16 +101,6 @@ build logs to view them without logging in
|
||||||
|
|
||||||
![A man yelling "I DON'T WANNA", followed by sign up/login boxes](https://gitlab.com/blankX/userscripts/-/raw/master/accounts.jpg)
|
![A man yelling "I DON'T WANNA", followed by sign up/login boxes](https://gitlab.com/blankX/userscripts/-/raw/master/accounts.jpg)
|
||||||
|
|
||||||
## RESser
|
|
||||||
|
|
||||||
A script to add more keyboard shortcuts to old reddit that I feel too hacky to
|
|
||||||
add into RES (requires RES).
|
|
||||||
Keyboard shortcuts:
|
|
||||||
- `v`/`n`: Reveal all text spoilers
|
|
||||||
- `Enter`/`Shift+Enter` on a crosspoted item: Open a crossposted item instead
|
|
||||||
of its link (sometimes also opens its link, no idea how to fix)
|
|
||||||
- `Shift+Enter` on Continue this thread: Opens a thread in a new tab
|
|
||||||
|
|
||||||
## Wayback Machine Toolbar Toggler
|
## Wayback Machine Toolbar Toggler
|
||||||
|
|
||||||
A userscript that replaces the "close this toolbar" button with one that lets
|
A userscript that replaces the "close this toolbar" button with one that lets
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
// ==UserScript==
|
|
||||||
// @name RESser
|
|
||||||
// @namespace blankie-scripts
|
|
||||||
// @match https://old.reddit.com/*
|
|
||||||
// @grant GM_openInTab
|
|
||||||
// @version 1.4.1
|
|
||||||
// @author blankie
|
|
||||||
// @inject-into content
|
|
||||||
// @run-at document-start
|
|
||||||
// ==/UserScript==
|
|
||||||
|
|
||||||
document.addEventListener('keydown', function(e) {
|
|
||||||
switch (e.keyCode) {
|
|
||||||
case 86: // v
|
|
||||||
case 78: // n
|
|
||||||
// v/n to expose text spoilers
|
|
||||||
document.querySelectorAll('.RES-keyNav-activeElement .md-spoiler-text:not(.revealed)').forEach((e) => {
|
|
||||||
e.classList.add('revealed');
|
|
||||||
e.click();
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
case 13: // return/enter
|
|
||||||
// [shift-]enter on crossposted item to go to crossposted item instead of link
|
|
||||||
const crosspostA = document.querySelector('.RES-keyNav-activeElement .crosspost-preview a');
|
|
||||||
if (crosspostA !== null) {
|
|
||||||
e.stopImmediatePropagation();
|
|
||||||
if (e.shiftKey) {
|
|
||||||
// TODO fix duplicate link from res lmao
|
|
||||||
GM_openInTab(crosspostA.href, {active: true});
|
|
||||||
} else {
|
|
||||||
location.href = crosspostA.href;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// shift-enter on 'Continue this thread'
|
|
||||||
if (e.shiftKey) {
|
|
||||||
const continueThing = document.querySelector('.RES-keyNav-activeElement > span.deepthread > a');
|
|
||||||
if (continueThing !== null) {
|
|
||||||
GM_openInTab(continueThing.href, {active: true});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}, {capture: true, useCapture: true})
|
|
Loading…
Reference in New Issue