TorrentBD Theme Engine

Customize the theme/colors of the TorrentBD website. Supports both light mode and dark mode.

当前为 2022-06-20 提交的版本,查看 最新版本

这些是此脚本变更过代码的版本。 显示所有版本。

  • v0.3509 2022-04-29

    I've brought down the default color choices to just 10. This should make it easy for anyone to customize colors.

  • v0.3508 2022-04-29

    Login page completely reworked to fit the theme engine. TorrentBD did not have a light mode login page, until now. If it's your first time logging in, i.e., you have never logged in from that browser before, you will find the dark theme. However, if you are a light mode user and you logged out, you will be greeted by the beautiful light theme.

  • v0.3507 2022-04-29

    Settings panel done. Messages done. Notifications done.

  • v0.3506 2022-04-29

    Oooh. A lot of color and design changes in the settings panel. The new birthday picker looks much better than the original.

  • v0.3505 2022-04-28

    Lots of color value changes for the tv show page. I've updated how the tables look in that section.

  • v0.3504 2022-04-28

    Updated the spotlight color for new comments.

  • v0.3503 2022-04-28

    Updated the loader icon color in the shoutbox.

  • v0.3502 2022-04-27

    Lots of color changes. Can't really name them one by one. Compare with the previous update to see.
    I've reached a point where major structural changes are unlikely to happen any further.
    We'll be doing these color changes for a while.

  • v0.3501 2022-04-26

    Updated the colors of the flashing message container.

  • v0.3500 2022-04-26

    Another major update! Okay, maybe semi-major. Version bumped by 500. Hehe.

    So. The TBD logo is now an svg, and the user can change the color of the logo alongside the rest of the theme colors. Isn't that fun?
    Incorporated some color changes to the "movies" section.
    And I have finally removed that awful, awful "white shadow wave" that was everywhere in the site. That won't happen anymore.

    I'm thinking that the user should have less color choices. Next version will remove the user choices for account buttons.
    Or maybe I won't. Not quite sure yet.

  • v0.3003 2022-04-25

    A step in the right direction. I'm maintaining an excel file that will become simpler over time. This update allows changing all accepted colors through localStorage JSON values. I've switched to a DuckDuckGo inspired theme (not default) and will be enhancing the colors further.

  • v0.3002 2022-04-25

    I just realized that I could've just set run-at document-body to get everything to work right. That error wouldn't even be here. But here we are. I found a roundabout solution instead. Never mind. I wanna use my solution, since it doesn't depend on the add-on.

    With this update, the engine station is outside of the main script. So, it runs faster than the other stuff.

  • v0.3001 2022-04-24

    I don't understand how 0.3 is a downgrade from 0.2***. GreasyFork has a weird way of counting versions.

  • v0.3 2022-04-24

    BIG NEWS!

    So. Remember that bug where the script executed before the head tag even appeared? I was previously using a reload escape to force the page to keep reloading until the head tag appeared properly. But on one of my slower computers, this led to an endless reload loop till I focused on the tab. Only then the loading finished properly.

    Now. I am using an observer function to execute the script exactly when the body tag first appears in the DOM, before body is finished loading. This works because none of the body is loaded at this time, but the head is fully loaded.

    If you're curious, here's the magic code that made the bug go away for me:



    Because I'm so happy, I just version bumped to 0.3. Cheers!

  • v0.2646 2022-04-24

    Switched a JS change with only CSS. Better transition.

  • v0.2645 2022-04-23

    Updated forum table list colors.

  • v0.2644 2022-04-22

    Card icons were being bolded on hover. Ugh. Stock TBD CSS has so many issues. Fixed.

  • v0.2643 2022-04-22

    Testing local storage JSON saving and retrieving. Works for now. I need to create an excel file to keep track of all these color values.
    I intend to create a default light and dark theme that's inspired by the original themes, but clearly different.

  • v0.2642 2022-04-22

    Updated the hover color value for the buttons in the forum and the thumbs up.

  • v0.2641 2022-04-22

    Updated stats color, torrent progress color.
    Updated forum title colors. Updated breadcrumb colors.

  • v0.2640 2022-04-20

    updated nav button color. updated search button color. updated color values. created new entries.
    updated color variable to allow changing nav button colors.
    ensured that it works for all surfaces.
    matched title background with cnav background.
    matched title color with cnav color.

  • v0.2639 2022-04-17

    Updated torrent approval notice box and colors.

  • v0.2638 2022-04-17

    Updated the default and hover colors for forum titles in the sidebar and titles of torrents in lists. Light and dark mode are now in sync.

  • v0.2637 2022-04-16

    Incomplete new torrent tags fixed for light mode. Seriously, TorrentBD...

  • v0.2636 2022-04-16

    Updated footer color bug in light mode.

  • v0.2635 2022-04-16

    Updated the colors for new torrents.

  • v0.2634 2022-04-14

    Updated license info.

  • v0.2633 2022-04-13

    Switched from @include to @match because tampermonkey said so.

  • v0.2632 2022-03-29

    Updated cnav height.

  • v0.2631 2022-03-29

    Small bug fix with the last update. Same changes, but actually works for a change.

  • v0.263 2022-03-29

    Updated the tabs in torrent details page for better display on mobile.

  • v0.262 2022-03-29

    Updated how the poll results look.

  • v0.261 2022-03-29

    Made dark mode default when the body tag doesn't say which theme is active. This is the case for the login page.

  • v0.260 2022-03-19

    Updated how the cutomize theme button is shown. Now it's in the personal links section instead. Much nicer. Anyway, I also changed the icon of the script, but I'll probably change it again in the future before I finalize. Nevermind.

  • v0.259 2022-03-17

    Put the theme engine settings inside an auto-invoking function.

  • v0.258 2022-03-16

    The rank below your name in the account card is now hyperlinked to the user classes info page.

  • v0.257 2022-03-16

    I was ripping my hair off trying to figure out how to fix that bug. The fail-safe I used in my last update works, but you can still see the unmodified website for a little while. It seems that the bug is happening when the userscript is executed before the head tag even loads. Therefore, the CSS and JS injection function now reloads the page is head tag is not found. This reloads the page before any content can load, thereby making everything appear to be seamless. However, the bug is still in there, and it's not because of my code. I just don't have a better way to fix this issue.

  • v0.256 2022-03-15

    So, I couldn't remove the bug even after all that. It seems like it's a tampermonkey issue, unless I'm missing something. Nevertheless, my fail-safe mechanism, as mentioned in the last update, is working as intended. I really can't do it any better, at least for now.

    For this update, added some table css for the top uploaders.

  • v0.255 2022-03-15

    So. Last update didn't fix that issue after all. This one probably did. I haven't faced the issue in the past hour. Seems like I cannot have naked JS going around. I don't know why that's an issue. Probably a tampermonkey thing. Nevertheless, I've put nearly everything inside a function container and then called them when appropriate. Meanwhile, the checktheme function always showed error when that bug appeared, but wasn't causing the bug. So, I've used that as an anchor to force enable my implementations by catching its error and invoking some functions.

  • v0.254 2022-03-15

    Introduced a function just for catching errors because I have yet to solve that issue bothering my code. Changed how online users are counted. It's now appearing on time without a random preset delay.

  • v0.253 2022-03-15

    I was very wrong about everything I said in the last update log. So, catch is just another JS function, and it is possible to do a naked invocation without putting a variable in brackets. I realized this after I got the same bug again. The bug doesn't always come, so it's hard to reproduce for me. Nevertheless, I think my theme adjustment invocation needed a try catch container, and seems like it's solved for now. I hope.

  • v0.252 2022-03-15

    I was making a very noob mistake with the try and catch thingy. UserScript loaded perfectly sometimes and not at all other times. Fixed that bit of code and now it's dandy. Weird that TamperMonkey won't call it a bug outright.

    How it should be-
    try {random code;} catch(error) {}

    I had mistakenly shortened the code to this-
    try {random code;} catch {}

    You gotta tell catch what variable to put the error inside. Here, the variable is 'error' as well.

  • v0.251 2022-03-15

    Oh, I didn't wanna push a minor update. But I keep forgetting what I changed, so here it is. Removed some unnecessary variables, simplified code execution a bit. No visible changes to the website.

  • v0.25 2022-03-15

    No more checking for refresh. As both the dark and light themes are now loaded into the head tag, there is no need to refresh to change which theme is active. That change happens instantly, and even faster than TorrentBD's own server-side theme change. You might feel that it is still refreshing, but it's not because of my script. That's just the server-side theme change.

  • v0.24 2022-03-05

    Additional changes to colors, especially for seed, leech, and completed texts. Original theme switch toggle is now hidden through CSS, which is then replaced by JS. So, the original button is never visible.

  • v0.23 2022-03-01

    Updated some CSS classes with JS to improve appearance. Because all JS changes now take place during the "interactive" session, everything looks as though they just finished loading.

  • v0.22 2022-03-01

    Adjusted several color factors in both light and dark themes. It's mainly going to be color changes until I've got all the colors done. Since it's two themes together now, it'll take a while.

  • v0.21 2022-02-28

    Added rounded edges to various img tags.

  • v0.2 2022-02-28

    In v0.1 of the script, only the CSS for the active theme would be loaded. Hence, the CSS for light mode wouldn't be present if dark mode is active. With v0.2, both CSS are present all the time. Here, the non-active CSS is disabled by default, so the colors don't clash. But because the non-active CSS is still available and loaded, the script can toggle between them without the need for a refresh.

    Fixed some padding issues on mobile. Added a resident JS tag for easier usage of onclick JS. Added hide/show tags to the theme toggle, so it changes with CSS instead of JS. Also fixed the first load issue.

    First load issue: When the script is installed for the first time, it cannot know which theme is active (dark/light) before the website loads. Hence, neither themes will be applied on first load. Instead, the script will determine the active theme and refresh the page once. Unless cookies are erased, this will not happen again.

  • v0.1 2022-02-26

显示所有脚本版本