?

Log in

No account? Create an account

Finally Figured it Out

Perhaps "finally" isn't the proper word, because it's not as if I've been trying to get this working ever since last time I mentioned it, but after looking around for a guide again tonight, I was able to get a Greasemonkey script that replaces the icons for friends-only and custom security entries on here to newer, more compact ones. My version of it can be seen here, and obviously it would be quite trivial to replace the icons with your own or change the colors of those keys. Thus, for posterity, and in case anybody else wants to use it, the script is as follows:

// ==UserScript==
// @name Change LiveJournal Secured Entry Images
// @namespace Karadur
// @description Change the images for friends-only and custom security entries
// @include http://*.livejournal.com
// @include http://*.livejournal.com/*
// ==/UserScript==

var allImgs,thisImg;
allImgs = document.evaluate('//img[@src]',
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);

for (var i=0;i<allImgs.snapshotLength;i++) {
var thisImg = allImgs.snapshotItem(i);
var src = thisImg.src;
var srcMatch = src.match('^http://l-stat.livejournal.com/img/icon_groups.gif' );
if (srcMatch != null) {
thisImg.src = 'http://pics.livejournal.com/karadur/pic/001sxgeh';
thisImg.height= '10';
thisImg.width= '10';
}
}

for (var i=0;i<allImgs.snapshotLength;i++) {
var thisImg = allImgs.snapshotItem(i);
var src = thisImg.src;
var srcMatch = src.match('^http://l-stat.livejournal.com/img/icon_protected.gif' );
if (srcMatch != null) {
thisImg.src = 'http://pics.livejournal.com/karadur/pic/001sy68s';
thisImg.height= '10';
thisImg.width= '10';
}
}

for (var i=0;i<allImgs.snapshotLength;i++) {
var thisImg = allImgs.snapshotItem(i);
var src = thisImg.src;
var srcMatch = src.match('^http://l-stat.livejournal.com/img/icon_private.gif' );
if (srcMatch != null) {
thisImg.src = 'http://pics.livejournal.com/karadur/pic/001t2f64';
thisImg.height= '10';
thisImg.width= '10';
}
}


Mind you, I'm sure there's a more efficient way to do that instead of using three separate 'for' statements, but until I have time to fiddle with it again (not right now because it's after 5:30 already), that'll do :3 I submitted a suggestion for it too, adding that it could be implemented as both updated icons (not necessarily mine), and / or the ability to upload your own or choose from a gallery so all visitors to your journal would see the same images. It's not the most practical feature ever, but where customizing things is concerned, I'm more in it for the proof of concept - figuring out how to accomplish [x] is the gratifying part.

Work today was decent, and it's really been a long time since I was told I could go home early. We weren't busy though, so I left at 10 without even touching the dining room (I thought that's when I was done tonight, but as it turns out, that's tomorrow instead), but the walk in and freezers were completely rotated for them, so they couldn't fuss about that. As for wanting me to close, nothing else came of it, because Sheila apparently called Chelsea telling her we were closed at 1 tonight, so she agreed to come in, then was a little upset upon finding out we were open two hours longer than she expected. It's the same tomorrow night though, and Sheila works 'till midnight, so it wouldn't surprise me if we hear about that then. Still, getting done in time to be home before midnight really is nice, and I get one more night on the next schedule that's the same way (5-11), so I'm definitely going to make the most of them <3

That is, not to as great an extent as I'd like, because I finally started Christmas shopping earlier tonight, insofar as I bought one gift then several more for myself, and above and beyond anything I want to make sure I have around $100 in reserve for our trip this month, and buying too much right now really won't be good for that. In the past two days, it's been close to $300 (one third of which was for my stuff, and the other two thirds for that one gift which I am almost positive will be received well), so I'm probably going to go to Harveys tomorrow night if they're open, then 7-11 on Saturday, Sunday, or Monday, and the rest of the nights I will make do with what can be found at home.

I should probably be getting to sleep now though, just so I'm less tired when I wake up tomorrow than I was this afternoon~

Comments