News for hackers. Stuff that matters.
Re:Show HN: Minimal Twitter – drastically simplify and declu... by miguelmota on Wednesday July 24, 2019 @06:26PM (#20520611)
Random tip: If you have the tamper monkey browser extension [1], you can simply add `document.querySelector('[data-testid="sidebarColumn"]').remove()` to remove the second sidebar on page load to make it feel minimal without much effort.

[1] https://www.tampermonkey.net/

Re:Show HN: Minimal Twitter – drastically simplify and declu... by bscphil on Wednesday July 24, 2019 @09:49PM (#20521928)
Or you can just do this in Stylus:

    div[data-testid="sidebarColumn"] {
        display: none;
    }
Also, since Tampermonkey is closed source, it's probably better to use Greasemonkey or Violentmonkey.
Re:Show HN: Minimal Twitter – drastically simplify and declu... by usonian on Thursday July 25, 2019 @02:50PM (#20528250)
Have you been able to get this to work? I can't get Stylus to override any styles on the new Twitter site.
Re:Show HN: Minimal Twitter – drastically simplify and declu... by bscphil on Thursday July 25, 2019 @07:22PM (#20530839)
Yep, it's working for me now. Latest Firefox on MacOS. Maybe check if the "test" CSS class appears in the source for you. If not there's probably an obfuscated class you can target instead.
Re:Show HN: Minimal Twitter – drastically simplify and declu... by usonian on Friday July 26, 2019 @11:11AM (#20535371)
Interesting - this works just fine in Firefox, but the same styles in the Stylus extension for Chrome aren't working. I can see them in the DOM, they just aren't having any effect on the page. I've tried targeting both the testid and the classes and neither seem to work on Chrome.
Re:Show HN: Minimal Twitter – drastically simplify and declu... by bscphil on Monday July 29, 2019 @11:28AM (#20555566)
As I recall Twitter has some fairly strict CSP rules, and extensions have had problems with them in the past. Maybe the Stylus extension can bypass rules in Firefox that it's not able to in Chrome?
Re:Show HN: Minimal Twitter – drastically simplify and declu... by miguelmota on Wednesday July 24, 2019 @10:18PM (#20522059)
Great suggestion. Didn't know that
Re:Show HN: Minimal Twitter – drastically simplify and declu... by nihonde on Wednesday July 24, 2019 @07:28PM (#20521167)
Does Twitter really publish its test selectors in production?
Re:Show HN: Minimal Twitter – drastically simplify and declu... by jazzyjackson on Wednesday July 24, 2019 @07:43PM (#20521261)
is there a good reason that this would be bad practice? it's much more friendly to the end user than uglifying your html with randomly generated ids on every div!
Re:Show HN: Minimal Twitter – drastically simplify and declu... by nihonde on Friday July 26, 2019 @10:03PM (#20539926)
I usually strip them out during builds that target production. They’re just noise in that environment.