certainperformance / stack-exchange-userscripts Goto Github PK
View Code? Open in Web Editor NEWUserscripts for Stack Exchange
License: MIT License
Userscripts for Stack Exchange
License: MIT License
Which userscript
Stack Highlight Unfolded Comments
Describe the bug
When using the Threaded Comments userscrpt from here the comments that were already shown are unthreaded.
To Reproduce
Steps to reproduce the behavior using both usesrcripts:
Expected behavior
After loading the highlight for new comments should be preserved but also the nesting
Environment (please complete the following information):
Additional context
I tracked down the problem to two lines in Stack Highlight Unfolded Comments
comment.children[0].removeAttribute('style');
comment.children[1].removeAttribute('style');
Removing these lines makes the behaviour correct:
Both userscripts change the style
directly on comments, the threaded comments script does it to add margin-left
for the indentation.
I would need to investigate more for a better fix. I assume the style
attribute is removed to drop the highlight after a subsequent reload. If that's all that's needed, then perhaps only the backgroundColor
can be wiped. Or the opposite - maybe only the margin-left
needs to be preserved.
Which userscript
StackHighlightUnfoldedComments
Describe the bug
With dark mode it makes highlighted comments unreadable.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Highlighting color is dependant on mode
Environment (please complete the following information):
Which userscript
Comment History Checker.
Describe the bug
Newly deleted comments are not visible in the history anymore. I've noticed this for a while but thought maybe they get deleted before they're picked up by the script or something. But I just deleted a comment two hours after posting it and it was still removed from the "All actions" tab. I tried to delete an old comment (over a month old) and it was kept in the history, which suggests that new comments are not being stored locally.
To Reproduce
Steps to reproduce the behavior:
Environment (please complete the following information):
The code to rectify paragraph spacing in your compact line height script is incomplete:
/* Spacing between paragraphs: */
.s-prose p {
/* 15px (equal to 1em) was the old margin-bottom, 1.4em (equal to 21px); is the new margin-bottom */
margin-bottom: 15px !important;
}
Tried using it in my Chrome extension, but noticed a lot of weird spacing. Compared a lot with the old formatting and discovered some things:
<p>
tags inside <blockquote>
also get the margin-bottom
from .s-prose p
, which is good. But the last element's margin-bottom needs to be 0px
, otherwise the bottom part of blockquote looks uneven1em
translates to different px
values depending on element. Headings are specifically affected by this, because of their varying font-size
<pre>
and <li>
Here's the code I landed on in the end:
/* old paragraph spacing */
.s-prose p, .s-prose ol, .s-prose ul, .s-prose blockquote, .s-prose hr {
margin-bottom: 15px!important;
}
.s-prose pre {
margin-bottom: 13px!important;
}
.s-prose ol li, .s-prose ul li {
margin-bottom: 7.5px!important;
}
.s-prose ol li:last-child, .s-prose ul li:last-child {
margin-bottom: 0!important;
}
.s-prose h1 { margin-bottom: 21px!important; }
.s-prose h2 { margin-bottom: 19px!important; }
.s-prose h3 { margin-bottom: 17px!important; }
.s-prose h4 { margin-bottom: 15px!important; }
.s-prose blockquote *:last-child {
margin-bottom: 0!important;
}
There are some more edge cases with last elements inside lists, etc., but they're not apparent so I skipped them for now.
Hope this helps :)
Ask Dates Everywhere is probably not compatible with some recent site redesign.
Neither front page nor explicit "Newest" tab displays any question date information at all, even though Tampermonkey shows the script is active for the page.
Which userscript
Ask-Dates-Everywhere
Describe the bug
The displayed "asked" dates are misaligned, and appear either left-aligned or concatenated to the displayed modified dates.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect the asked dates to align with the modified dates, just like the userscript's example screenshot:
Environment (please complete the following information):
Additional context
I don't think it's related, since this dates issue appears to occur regardless of tag/ title/ subtext length, but there's an active UI bug on Stack right now where profile info is being pushed by a long-enough line of tags. Since it's in the same area, I thought I'd mention it, just in case it could affect css that this userscript depends on.
Which userscript
Stack Sidebar Question Stats
Stacks recently deprecated grid
/grid--cell
classes (ref. StackExchange/Stacks#689) and SE recently replaced them with d-flex
and flex--item
respectively. This has broken Stack Sidebar Question Stats.
https://www.stackoverflow.com/*
because the script wasn't "activating".Which userscript
Stack Preview Antifocus
Describe the bug
When trying to create/edit a post with spoilers with this userscript enabled, clicking the spoiler to reveal it no longer works.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Clicking the spoiler should reveal it (works when the userscript is disabled).
Environment:
Which userscript
Stack Three Columns
Describe the bug
When using Greasemonkey and the dark theme for Stack Overflow, the three column edit view that opens has a white background which makes many elements hard to read.
To Reproduce
Steps to reproduce the behaviour:
Expected behavior
The three column layout to be dark. Preferably recognising the theme used the site.
Environment (please complete the following information):
Additional context
The issue is somehow connected with how Greasemonkey handles the script. Most likely something to do with the isolation it applies. The issue doesn't show up in Tampermonkey (tested in ChromeVersion 75) nor in Violentmonkey (tested in Firefox 77).
The script is using background-color: var(--white);
here . This matches the declaration the following rule from primary.css:
body {
min-height:100%;
display:flex;
flex-direction:column;
background-color:var(--white);
/* truncated the rest for brevity */
}
Where the the --white
is defined in stacks.css:
body.theme-dark {
--white:#2d2d2d;
--black:#fff;
/* truncated the rest for brevity */
}
So, the --white
should work and it does in other userscript managers, however GM has a different handling of styles from the userscript with regards to styles on the main site.
I don't know if there is an easy fix for this. My current workaround is to just use Violentmonkey for this script
Which userscript
Three Column Adjustable
Describe the bug
When switch to three column layout, the middle column textarea is short and can only show 3 lines. It isn't able to drag to enlarge. Screenshot is attached below.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The textarea should fill the space or is able to resize by dragging.
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
Which userscript
Stack Three Columns
Describe the bug
When editing a question, the three columns are displayed, which isn't really helpful
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Either the first column should be hidden, or else have a much smaller width.
Environment (please complete the following information):
Additional context
Thanks for sharing this very useful script. Let me know if you would like assistance with this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.