|Socky the Moogle (sockymcsockerson) wrote in dw_nifty,|
@ 2012-06-04 08:38 am UTC
|Entry tags:||browser extension, user scripts, user styles|
I don't know about you, but one of the few changes I actually did like in LJ was the handy 'new' comment things that popped up when you revisted a page. Fortunately, there is a way to implement them in DW and make them work in the same way. The steps I'm going to detail have been tried and tested in both Firefox and Chrome, and should work without much problems.
1. If you're using Firefox, go grab Greasemonkey, and if you're using Chrome, Tapermonkey is the equivalent! It'll make it easier for what we're going to do next.
2. Mosey on over to LJ New Comments on userscripts.org. Don't worry about the name, it works just fine for Dreamwidth too. Click install, and everything should take care of itself. Now, what'll happen if you go to the comments page of a post is that new comments will show up like so:
That's good, but I think we can do a little better. Also, clicking the 'NEW' link to expand comments doesn't really seem to be necessary, since the 'expand' button works fine on Dreamwidth, so we'll look into taking that out as well. It won't affect the functionality of the script, I promise.
3. What you're going to do now is to open the script up. In Tapermonkey this should be fairly straightforward- click on the small icon, go to options, then double click on the 'LJ New Comments' script, which'll bring you straight to the Editor. In Firefox, you'll have to go to Manage User Scripts and edit it from there. (If just selecting 'Edit this User Script' doesn't work, right click on the script itself and select 'Show Containing Folder', then select '60535.user'. It should automatically open up in Notepad.)
4. Now do a case sensitive search for "NEW". That should bring you to a section of the code that looks like this:
See that highlighted bit there? That's what you're going to replace now. What you replace it with depends on whether you want a bright yellow appearance in your new script, or a more normal yellow tone. Take a look at both of those!
5. Replace that highlighted bit in the last point with either:
<b><font color=yellow>*NEW*</font></b> for the bright yellow version
<b><font color=FDD017>*NEW*</font></b> for the normal yellow version, depending on what you prefer.
6. Hit save, and refresh your page! You should be good to go.
If you have any other questions about this, leave a comment and I'll see what I can do. Much thanks to pw201 for making the script in the first place, and to majorshipper for bringing it up. The code I've described should work as it does in the screenshots, but I'm sure you could edit it however you want- if you'd prefer a bright neon pink new, for instance, then just swap out FDD017 to FF69B4 instead, and if you'd rather it say 'HEY, HEY LISTEN', then just put that instead of '*NEW*'.
I hope this works out for you!
P.S.: In case you're wondering why the screenshots I have look a lot more like they were taken on LJ than they were on Dreamwidth (and if you're wondering how to get that look for yourself), I couldn't recommend rainfall's wonderful Tropospherical Blue site style reskin for Dreamwidth enough. Her particular version fixes some of the bugs found in emiri's earlier code, and so far I have it working perfectly well in Google Chrome, widescreen. The only small problem there might be is that the original page colours (i.e. Tropospherical Purple) might display for a brief half-second or two while the page is loading, but I've found that DW pages do load really quickly and apart from that, everything's very good. For more site styles and other things, I also made a comment yesterday with a bit more information regarding all that, as well.
Edit: Just a note, if you're using Chrome, installing the script directly into the browser will probably not work. When I tried this, all the comments kept continuously showing up as new, no matter how many times I refreshed the page. hornpile reported something similar here, and since we're both using Chrome and both had the same issue, that does seem to have been the cause of the problem. On the other hand, script confirmed to work in Chrome on Macs! That's good news, too.
(original comment here / DW post here)