Forum › Dynasty Reader Userscripts

joined Feb 21, 2017

When you edit something in the inspect element tool it's not always perfectly analogous to an actual stylesheet

I see. Yeah, I really have no idea how that kind of stuff. I'll try to make my own Stylish page for it, but I doubt it'll turn out well.

Thanks for the advice, though.

Sakamoto%20nichijou%20tissues-min
joined Jan 20, 2016

When you edit something in the inspect element tool it's not always perfectly analogous to an actual stylesheet

I see. Yeah, I really have no idea how that kind of stuff. I'll try to make my own Stylish page for it, but I doubt it'll turn out well.

Thanks for the advice, though.

Do you think this will work for you? https://pastebin.com/9tfPZjrE
I knew someone wanted a dark theme. I couldn't find the post for a bit. Anyway it should work on most of the site. I haven't tested it completely, but it should work on most of the site.

joined Feb 21, 2017

Do you think this will work for you? https://pastebin.com/9tfPZjrE
I knew someone wanted a dark theme. I couldn't find the post for a bit. Anyway it should work on most of the site. I haven't tested it completely, but it should work on most of the site.

Good stuff, it looks nice. Thank you. Works fine as far as I can tell.
I appreciate it.

Thiaguinho-sama
Ratana%20avatar%203.3%20dynasty
joined May 11, 2012

Alice Cheshire
Are you still working in the userscript? Asking cause only today I noticed it doesn't seem to be working for me, Tampermonkey seems to be executing it, but nothing appears in the screen anymore, so I'm not sure what to do.

Alice Cheshire Moderator
Dynasty_misc015
joined Nov 7, 2014

Thiaguinho-sama posted:

Alice Cheshire
Are you still working in the userscript? Asking cause only today I noticed it doesn't seem to be working for me, Tampermonkey seems to be executing it, but nothing appears in the screen anymore, so I'm not sure what to do.

If you're having the same issue as I am you may try refreshing the page. I'm not sure what the issue is but around the time the site switched to https I started having issues where the script would randomly fail to work at times. If that still fails you might try reinstalling the script. If that still fails then I probably screwed something up. I released an update a few days ago which fixed a few https support issues (most notably the quick quote button not working since the site switched to https) so that might have somehow broken something in Chrome despite the fact I literally only changed a few instances of http to https.

Thiaguinho-sama
Ratana%20avatar%203.3%20dynasty
joined May 11, 2012

Tried refreshing and reinstalling but it didn't make any difference, Tampermonkey continues to execute it but nothing shows up.

Alice Cheshire Moderator
Dynasty_misc015
joined Nov 7, 2014

Thiaguinho-sama posted:

Tried refreshing and reinstalling but it didn't make any difference, Tampermonkey continues to execute it but nothing shows up.

I just checked and there's definitely something going on. I'm not sure what the issue is though. It seems like there might be some conflict between one (or more since the debugger seems to jump to different scripts depending on the page?) of the site's scripts and my userscript. I'll have to have a more in-depth look at it within the next couple of days.

In the mean time you could click the install button on this page to install the previous version instead. Though you'd need to manually update to the new version when I figure out the issue. Since I can't tell where the problem actually is (Chrome's debugger is infuriatingly unhelpful for whatever this error is) I'm not sure how long it'll take to fix.

Thiaguinho-sama
Ratana%20avatar%203.3%20dynasty
joined May 11, 2012

Tried previous version and nothing either, I'm starting to wonder if the problem is my Chrome.

Alice Cheshire Moderator
Dynasty_misc015
joined Nov 7, 2014

Thiaguinho-sama posted:

Tried previous version and nothing either, I'm starting to wonder if the problem is my Chrome.

That's actually pretty odd then since the one I just linked was an update from back in April. (One whose only change was to switch the script include from http to https and nothing else.) Perhaps it's an issue that was actually introduced in a recent Chrome update then. Or one of Dynasty's devs updated something on the site that broke it for Chrome. I think that a Chrome update breaking it is more likely though.

Thiaguinho-sama
Ratana%20avatar%203.3%20dynasty
joined May 11, 2012

I blame Chrome being unhelpful for no reason, hope you won't have much problem fixing it, cause that sure looks like a pain in the ass. :(

Cinnabar-profile
joined Aug 3, 2015

I believe I've found the issue with the script not functioning for some users. See MDN: Javascript 1.6's for-each-in loops are deprecated. Looks like it's no longer supported in recent browser versions.

Changing line 505 to

for (var key of keys) {

got the script running for me in latest Chrome/Safari.

Where do I submit a pull request? :P

last edited at Aug 8, 2017 8:58PM

Alice Cheshire Moderator
Dynasty_misc015
joined Nov 7, 2014

cyricc posted:

I believe I've found the issue with the script not functioning for some users. See MDN: Javascript 1.6's for-each-in loops are deprecated. Looks like it's no longer supported in recent browser versions.

Changing line 505 to

for (var key of keys) {

got the script running for me in latest Chrome/Safari.

Where do I submit a pull request? :P

Oh hell. I didn't realize I'd used for each there, lol. I don't have it uploaded in a place where you can submit pull requests but I'll get it fixed up tomorrow morning and that'll hopefully fix the script breaking in Chrome. I was intending to put the new version on Github when I finally get around to rewriting it. There's a lot of issues with the way I handled a lot of stuff in the current version so I've been procrastinating way too badly on it since it'd need such a comprehensive rewrite.

Cinnabar-profile
joined Aug 3, 2015

Dynasty Gallery Viewer userscript (v2.1.0)

This is a userscript that allows you to browse images on this site much more easily using a modal image viewer with next/previous buttons, similar to Instagram et al. See screenshots!

Installation

  1. Install the Tampermonkey browser extension.
  2. Install link. This should open a Tampermonkey prompt for you to install the script. Do so.
  3. Enjoy!
  4. Note: versions prior to 1.6 do not autoupdate. To update from a previous version, click the install link again.

Screenshots/Howto

Hovering over an image thumbnail now shows an expand icon.

Click on the icon to open the viewer. Click on the left/right of the image to go back/forward. Click anywhere outside the image or press Escape to close.

Changelog

  • 2.1.0: Show loading progress bar in loading indicator.
  • 2.0.4: Prevent arrow key navigation from triggering when editing a comment box.
  • 2.0.1: Fix bug where tags/comments would fail to update on Safari.
  • 2.0.0: Added arrow key next/prev navigation to viewer.
  • 1.9.0: Added image source and open image buttons to viewer. Styling adjustments.
  • 1.8.5: Comments button now shows number of comments. Eliminated comment loading time.
  • 1.8.0: Can now view and post image comments directly in the viewer.
  • 1.7.0: Breaking change - now uses async-await for asynchronous requests.
  • 1.6.4: Added small delay before loading indicator appears.
  • 1.6: Enabled autoupdate. Resolve issue with reduced scrolling performance even when viewer is not open (Safari/Chrome).
  • 1.5: Added image prefetching for improved performance.
  • 1.4.5: Fix "???" tags not being parsed correctly.
  • 1.4.4: Tags now link to their respective pages.
  • 1.4.3: Fix scroll position carrying over between images (changing images now always starts at top)
  • 1.4.2: Minor style changes to be more consistent with site style.
  • 1.4.1: Fix tag list showing "undefined" for images opened from some parts of the site (tag list now hidden in these cases)
  • 1.4: Now displays tag list when hovering over the image.
  • 1.3.1: No longer causes annoying page reflow when viewer is opened/closed on non-macOS platforms.
  • 1.3: Tall images now scroll without scrolling the entire page.
  • 1.2: Now displays a loading indicator.
  • 1.1: Performance improvement.
  • 1.0: Initial release.

last edited at Mar 8, 2020 9:29AM

Cinnabar-profile
joined Aug 3, 2015

Dynasty Mark Read userscript (v2.6)

This is a userscript that visually marks chapters on your Read and To Read lists on the site.

Installation

  1. Install the Tampermonkey browser extension, or Greasemonkey if you're on Firefox.
  2. Install link. Tampermonkey should prompt you to install the script; do so.
  3. Add or remove any chapter from your Read list to activate the script. You only need to do this once per install.
  4. Note: Versions prior to 2.0 do not autoupdate. To update to the latest version, click the install link again.

Screenshots

Changelog

  • 2.6: significantly decreased size of cache, which should help prevent running into browser storage limits for voracious readers.
  • 2.5: adding/removing from a list now shows the change immediately when the next page is loaded. Performance should now be near-instantaneous in most cases.
  • 2.4: slight performance improvement. Refactored to use ES8 async-await.
  • 2.3: chapters can now inherit Read status from their parent groupings.
    • Mechanism for cache reloading has changed. To force a cache reload, remove or add an item from a list using the list drop down, then navigate to the front page or any chapter list.
  • 2.2: Subscribed items now marked in red.
  • 2.1: now enabled for list views. Chapters on To Read list now marked in blue.
  • 2.0: implement caching for significant performance improvement. Enabled script autoupdate.
  • 1.9: log performance stats to console.
  • 1.8: improved performance by skipping checking links with no text (e.g. image links).
  • 1.6: significant performance enhancement, especially on short lists.
  • 1.5: now also works on chapters shown as thumbnails as well (e.g. on the main page).
  • 1.2: now applies to search results pages.
  • 1.1: significant performance enhancement on large lists.
  • 1.0: initial release.

last edited at Feb 21, 2020 2:46AM

Nezchan Moderator
Meiling%20bun%20150px
joined Jun 28, 2012

You guys need me to rename the thread or anything?

Cinnabar-profile
joined Aug 3, 2015

Alice Cheshire posted:

Oh hell. I didn't realize I'd used for each there, lol. I don't have it uploaded in a place where you can submit pull requests but I'll get it fixed up tomorrow morning and that'll hopefully fix the script breaking in Chrome. I was intending to put the new version on Github when I finally get around to rewriting it. There's a lot of issues with the way I handled a lot of stuff in the current version so I've been procrastinating way too badly on it since it'd need such a comprehensive rewrite.

Such is life in yavascript-land... I'm glad that's someone else's job where I work :)

Alice Cheshire Moderator
Dynasty_misc015
joined Nov 7, 2014

Nezchan posted:

You guys need me to rename the thread or anything?

If you don't mind. Something like "Dynasty Scans User Scripts" or something along those lines would work.

cyricc posted:

Such is life in yavascript-land... I'm glad that's someone else's job where I work :)

In my defense this user script is literally the first place I'd ever used a for in loop anyways, lol. The whole thing was quite a learning experience for me.

Edit: OP updated. If you'd like me to change anything up with your descriptions just let me know.

last edited at Aug 9, 2017 11:35AM

Alice Cheshire Moderator
Dynasty_misc015
joined Nov 7, 2014

Dynasty Thingifier Direct Download


This Tampermonkey userscript adds some pretty useful functionality to the Dynasty forums. Its main purpose is to allow you to retrieve links to specific posts as well as make quoting people a lot better. Post timestamps will link directly to a given post and quotes will add the quoted user's name as well as liking that name to their post.

Alice Cheshire posted:

Quotes will look something like this when using my script.

In addition there's a few other completed features. Once you install it you'll notice a menu shows up on the left side of the site.The X button on this will allow you to collapse the menu to a small button along the side if you don't like it being there. There's 9 things here so far but four of those are things I haven't yet started one.

  1. The first is an option to unhide all spoilers. This will turn the text in them white and make the black background a lighter grey. (This is so you can read the spoilers but still tell they're spoiler tagged.)
  2. The second option will fix the navbar to the top of your screen. On most sites I find this kind of navbar rather annoying but since the navbar is so small on Dynasty this one is pretty useful in my opinion.
  3. The third option copies the page controls to the top of the page rather than only having it at the bottom of the page.
  4. The fourth option adds buttons to the quick reply and new post screen to allow you to format your posts without having to remember the markup the forums use.
  5. The fifth option will quote straight to the quick reply instead of the new post page. (The normal quote button is still there to open the reply page in a new tab.)
  6. The sixth option moves the quick reply to beneath the post you're quoting so you don't have to go all the way to the bottom of the page.
  7. Font size slider. You can change the size of text in posts here. The reset button will completely reset the font size to the site's default.
  8. A link to access your own posts. This one will take some work on your end. You'll need to find one of your own posts and copy the url (for example mine is http://dynasty-scans.com/forum/posts?user_id=17437) then you'll need to copy the numbers after the user_id= and paste those into the text field next to the "submit user id" button. After you click the submit button it will replace those things with a link to your post history. Unfortunately there's no decent way for me to automate this part currently.
  9. This option is there as a sort of fail-safe. This will reset all the stored variables in the extension disabling all the options in the menu and making it so you'll have to set your user id again.

Planned features and updates:

  • Possibly a feature that will allow you to bookmark threads in a submenu for quick access.
  • Sorting for your list view. (This one's going to be low priority because it's not the most useful and it's something outside my current experience.)
  • Multiquote ability for the "quote to quick reply" option. (Also the ability to close the quick reply after opening it.)

If anyone has suggestions for other features I'm always up for considering them.


Known issues:

  • Pagination on the main page should be adjusted when having the page select at the top of the page enabled, though that's not a huge issue regardless.

Dynasty Thingifier can be found here, just click the "install this script link" if you have Tampermonkey on Chrome/Opera or Greasemonkey on Firefox installed. (Note: You have to make an account on Greasyfork to download the script since Dynasty is considered an adult website and any scripts tagged for adult websites aren't available to guests.)

last edited at Nov 16, 2017 1:04PM

Alice Cheshire Moderator
Dynasty_misc015
joined Nov 7, 2014

cyricc posted:

I believe I've found the issue with the script not functioning for some users. See MDN: Javascript 1.6's for-each-in loops are deprecated. Looks like it's no longer supported in recent browser versions.

Changing line 505 to

for (var key of keys) {

got the script running for me in latest Chrome/Safari.

Where do I submit a pull request? :P

Looks like you were right on the mark. Just submitted an update to Greasyfork and am posting this from Chrome with no issues. Kinda strange that Chrome's console would freak out like it did instead of just saying "yo, you've got a deprecated for each loop in your code!!" though.

Nezchan Moderator
Meiling%20bun%20150px
joined Jun 28, 2012

Nezchan posted:

You guys need me to rename the thread or anything?

If you don't mind. Something like "Dynasty Scans User Scripts" or something along those lines would work.

Done and done.

Alice Cheshire Moderator
Dynasty_misc015
joined Nov 7, 2014

Nezchan posted:

Done and done.

Thanks!

67351033_10220293459155029_8283322322757091328_n
joined Jul 22, 2015

Hey Alice, I've noticed you updated the Thingifier. If you could just quickly insert the code I gave you for that extra feature, that would be much appreciated. It literally only requires copy, paste, save, and upload.

Also, why not try uploading the project to GitHub so people like me can make pull requests and such?

Alice Cheshire Moderator
Dynasty_misc015
joined Nov 7, 2014

gwennie-chan posted:

Hey Alice, I've noticed you updated the Thingifier. If you could just quickly insert the code I gave you for that extra feature, that would be much appreciated. It literally only requires copy, paste, save, and upload.

Right, I completely forgot about that. It was a quick update to try and fix things breaking on Chrome so I didn't bother looking through my notes beforehand which is where your code is at the moment. I'll try to get to this in the next day or two.

Also, why not try uploading the project to GitHub so people like me can make pull requests and such?

I was intending to put it there instead of Greasyfork when I code the next version but since I keep procrastinating on the next version I never get around to it. I may just end up putting it up on Github eventually the way it is now.

Alice Cheshire Moderator
Dynasty_misc015
joined Nov 7, 2014

gwennie-chan posted:

Hey Alice, I've noticed you updated the Thingifier. If you could just quickly insert the code I gave you for that extra feature, that would be much appreciated. It literally only requires copy, paste, save, and upload.

Got this added. Sorry that took so long. I'd actually completely forgotten about it until you mentioned it.

Edit: I'll look into putting it up on Github in the next few days.

last edited at Aug 25, 2017 12:52AM

67351033_10220293459155029_8283322322757091328_n
joined Jul 22, 2015

Firefox 57/Quantum is in Beta currently. It fully releases in November. If you're a Firefox user, you'll need to delete Greasemonkey and install Tampermonkey from the Add-On website, otherwise you won't be able to use userscripts.

To reply you must either login or sign up.