afuna_archive: (Default)
Really simple script for you guys today: Support: Summary in Title.

That appends the the request summary into the window title which lets you the request summary show up in your browser history. Meaning, you can just type in a partially remembered request summary in your browser address bar, and it'll (hopefully) pop up the URL to the request you're thinking of.

Works on Dreamwidth and LiveJournal. (Note that it may be conflicting with some other scripts? I had to drag it to the beginning of my list in the Greasemonkey settings for it to work on LiveJournal)
afuna_archive: (Default)
Three new scripts. Wrote them late last year, never got around to publishing them:


  • LiveJournal Default Memory Security
    Set a default initial security when creating new memories.

  • LiveJournal Rage Goggles
    Inspired by Google's Mail Goggles, this script makes you solve a math problem, before you post that comment you know you're going to regret later. "Rage-goggled" ljuser-head shows up in the comment form to indicate that the script is active. Click on it for options: you can whitelist a journal temporarily or permanently.

  • LiveJournal Track from Navbar
    Adds a convenience link to the navbar, pointing to the track this journal's entries page.



As always, the rest of my scripts can be found on my site.
afuna_archive: (Default)
One thing that has frustrated me about interacting with LiveJournal programmatically, is that ?format=light does not work on all pages. It's not really something that affects most users would notice, but certain (Greasemonkey) scripts would be much much easier to write if the entry/journal pages could be guaranteed to follow the same format.

Mostly I've kludged around it by working off of the archive pages, which respond to ?format=light, so I could get data consistently. I have a script which scrapes the lj-cut text, so it can be seen in the inbox which does this. [livejournal.com profile] murklins has done me one better, with a script which lj-cuts your inbox, like the entry text. I do not know how I ever lived without this. Lifesaver. Adore, love. Seriously.

But for other pages, it's been a process of trial and error, trying to figure out whether ?format=light is supported (tag page supports it, showing a page based on s1shortcomings). Uh. Archive pages, as mentioned above. Reply pages and entry pages, obviously, using core, I think.

Not affected by ?format=light are friends and recent entries. LJ site scheme pages, meanwhile depend on the user's site scheme, unless you append ?usescheme=blah, which I always forget to /o\

It's all possible, but it can get messy depending on what you're trying to do. Which is why I love that LJ offers a mobile view. Love <3

The gist of it is that LiveJournal offers a minimalistic view for mobile phones/browsers (I suspect screenreaders could benefit). No header graphics, less junk overall, more consistent look/feel, and most importantly if you're hijacking it for scripting, it works consistently! To trigger, you need to supply the appropriate user agent:

GM_xmlhttpRequest({
   method: "GET",
   headers: {"User-Agent":"w"},
   url: $url_here,
   onload: function(details) {
       // do something with details.responseText
   });



The important part is the useragent line. The rest is just the normal stuff you need to fetch and process a page.

I haven't used it in an actual script. And since I don't play around with LJ much anymore, I'm not sure when I will. But it is a potential solution to what has up to now been a tedious problem.
afuna_archive: (Default)
I was going through my list of script suggestions, trying to move them over to a more organized list, and I've realized I promised a *lot*, but given the way things stand, I won't be doing most of them.

It's probably not a big deal at this point, since most have been standing so long, they've been forgotten! But if there's anything you asked for before, and still haven't forgotten about/still do want, poke me so I can move it to a todo list I'm actively looking at, rather than let the idea molder (and die).

Thanks!
afuna_archive: (Default)
I've moved over my scripts to my site (after months of putting it off. Thank you, [livejournal.com profile] ciaran_h for hosting them this past year <3).

Old site: http://afuna.theblob.org/greasemonkey/
(redirects to)
New site: http://afunamatata.com/greasemonkey/

I also spent some time cleaning up naming conventions and namespaces. These changes break all old direct links to scripts, and may prevent many scripts from being recognized as the same script if you have to reinstall for any reason (which means duplicate scripts in the list, or preferences not carrying over).

But this is the last time I'm doing something like this, and it won't cause any problems for any scripts newly installed or written from this point forward. (And should not cause problems for the majority of existing scripts, either).

The best part about reorganizing is that I've managed to consolidate new scripts and script updates which had previously been scattered across three different sites! And some of these scripts weren't linked to from anywhere else, so it was all a mess.

It feels good to have them all neatly referred to from one location. This page will likely remain more updated than my userscripts.org account :-)

I've announced most of my scripts before, but I think LJ Search Defaults was only done through PM, and the autocomplete for the taglister hadn't gone public before. Some others I brought up in IRC, but might not have brought up in an entry or added to the old site.

Anyway, take a look if you're interested! It's all red and white now, too: here be scripts

All changes can be tracked with http://www.afunamatata.com:8000/atom-log/, though that includes the website updates as well...it's possible to track individual scripts by going to (note ending "?"), which I should mention, but I'm too lazy to add a link beside each script at the moment:

http://www.afunamatata.com:8000/atom-log/tip/scriptname.user.js?
afuna_archive: (Default)
I just found an alternative to Greasemonkey, called Chickenfoot. I think... it may abstract away some of the more technical language, and it is less sandboxed than Greasemonkey. So basically, more like an extension than a script. If that is true, I wonder how they stop malicious websites or scripts from gaining access? I'm curious; must set aside time (I don't actually have) to play.
afuna_archive: (Default)
Finally managed to finish a script I've been wanting to use for a while: Admin Console for Requests

It basically inserts a form below each request, where you can type in your desired commands, and then takes advantage of LJ's CSP to submit these. Your currently logged-on username is automatically detected, so no configuration is required.

I've integrated it with the synedit and synmerge Automator (though each script can also work as a standalone). If you are a Syn SH+ and have the admin console script installed, it will place the syn_* command in the console instead of as an IC. My goal is to reduce the effort it takes to respond to synedits -- also other things, but synedit is the only support-related console command I regularly use.

(All my scripts are available on this page.)

Also, trying not to babble on too much here, but I found the XMLRPC format interesting. However arrays are a pain and a half to work with.
afuna_archive: (Default)
Abby, I'm making this for you (though anyone else can join in if they want). Post new script suggestions, ideas for improving current scripts, and bug reports here. Take a look at my current Greasemonkey scripts my current Greasemonkey scripts, and see if you think of anything!

(Poor man's tracker, ahaha)
afuna_archive: (Default)
[livejournal.com profile] aveleh, damn you for putting the idea in my head. Was bored in the car while running errands, so I ended up working on the script you asked me to do. I think this does what you wanted (possibly with a few additions).

Right now, you can hide all requests with a certain tag or view only those requests with a certain tag, and you can choose whether your filter is applied persistently (on a new pageload) or will go away once you close the tab.

User interface is rough, but I think it's self-explanatory, though I'd welcome suggestions to improve it. Can't handle filters like "entries|styles", and can't handle both an inclusive filter and an exclusive filter at the same time, but it should be enough for normal boardwork.

Tell me if I got your demands request wrong? ;-)

ETA:
Forgot the link to the script, but it's there now, as well as a brief explanation of what it actually does ;-)
afuna_archive: (what does this button do)
Google recently published an API for Greasemonkey scripts. I haven't had a chance to test it yet, or to even look closely, but if it's possible to use it to easily access and edit content in a message, that would be perfect.

(And even if it isn't, just the concept excites pleases me very much.)

Update:
Yes, it is possible, because I've just managed to add in a userpic input field for LJ comment notifications. It took me longer to figure out how to get the script to load in Greasemonkey, than it took to figure out the logic to add in the input textbox. I should have scrolled down -- there's a sample script on the API page which explains that you have to add an onload event listener.

Still not done, as I'm too lazy to do the three items on the todo list for the script:

// TODO: make it a dropdown (Can use this and then store it, I suppose)
// TODO: check that it *is* a comment notification ;-0
// need to add something for when a message is expanded, if it's possible via the API

But I now have a fair grasp of the way around the API. Want to play with it so badly, but I need to sleep because I promised myself I would get that student's license by tomorrow.
afuna_archive: (Default)
The support requests status tracker script used to hang at around 300 total requests modified (or once around a hundred requests moved off the board.) Today, it processed "525 updated and 483 moved off this view for a total of 1008 requests changed" in an instant.

The changes I made to the code have worked out much better than I ever planned :-) Of course, the real problem was that earlier versions of the code were complete and utter crap. See, I made a couple of embarrassing rookie mistakes with arrays and string handling )

Note: pseudocode is because I'm too lazy to remember how I actually coded it in old versions. Real code is because I'm too lazy to figure out how to convert my current code to pseudocode.
afuna_archive: (Default)
And the site has Greasemonkey scripts :-)

I really need to fix up some of the scripts and expand the variety of scripts that I've worked on, because that's a sad, sad total (especially since most of those were pretty trivial to do!), but the site itself is not too bad for my first time creating a site from scratch.

Unless you count using the Geocities web tools back in 2000? In which case, this is not my first site ;)

(I'm on Ciaran's server and have spent today hammering at both site and scripts with his help ♥)

debug love

Jul. 17th, 2007 10:38 pm
afuna_archive: (Default)
Ciaran just fixed my taglister script*. There were several annoying bugs with tag matching, etc, that I was complaining to him about the other day. I haven't had a chance to test it (I plan on going over it line by line just because :DDD), but Ciaran tells me that they're fixed, and I trust him absolutely.

I think it's the most romantic thing anyone has done for me ever, and I'm not embarrassed to say it <33 (some context in this none-too-coherent squeeful entry, but basically it was the script's fault that we even met each other in the first place.)

Words cannot express how giddy I am right now. Or rather, words could express, but the words would have to look like this: asdfghjkl;jasjdhfjkl;


* the version up on us.o isn't the updated version yet. It's still the ugly buggy one, but I plan to replace it with the new version soon <3333

crashing

Jun. 28th, 2007 01:44 pm
afuna_archive: (Default)
Note to self:

Body needs more than an hour and a half of sleep a night. Moreover, no longer (as) young (as before). Cannot live on less than three hours a night every night for half a week straight.

(Events past midnight regularly send adrenaline rushing through my veins, but I pay the next morning :D)

set mode=CRASH


----
Note to self:
Edit grease, fix arrays.
Edit grease, fix autocomplete,
New grease, i.&t.
Help T_T.

---
I have big plans for tonight. First step: curl up in bed. Everything follows :)

---
Global I2s are excellent.

(I keep nodding off to sleep and then waking up when certain keywords run through my head :D (I promise I shall stop spazzing out over support soon, at least in entries (I seriously hope tomorrow will be a more coherent day (is it period inside or period outside? The inconsistency is bugging me.).).))

---

[livejournal.com profile] murklins, I have an idea bouncing in my head and need to talk code <3 But do not let me do it tonight, for the sake of my sanity, please! But remind me if you remember? And if you don't, I'll pounce on you if I do remember.

---

Hard drive still dead. Still haven't recovered from when I lost all my data two months ago, so this latest failure didn't hit me as hard. I hope I can get a new one (covered under warranty).

--- 3:37pm ---
Took a nap! Reenergized!
afuna_archive: (Default)
In case anyone wants to comment on the script but doesn't feel comfortable doing so on us.o, here is a good place. I'm assuming that anyone who wants to use that script has an LJ account, since the script itself is made to work with LJ!

---

Because it seems fitting, here's a script (not written by me!) which restores the appearance and formatting of the old update.bml page.

Also, I've finally posted the script to add a tagslist to update.bml. There's an easter egg in there of a sorts -- didn't bother to remove my uglification code, but it can't be activated unless you know the exact steps.

Ah, the stupid thing is that my script is not compatible with the first one, so unless someone (else) is willing to figure out how to fix that, you'll have to choose one or the other.

The information below is outdated; most updated info is in the script itself and probably also in the extended description over at us.o.
Rough docu for my script. This text is also found within the script itself )
afuna_archive: (Default)
I've been lurking around [livejournal.com profile] news/[livejournal.com profile] lj_design/[livejournal.com profile] lj_releases, hoping for any news that the userpic has been dragged back down to the bottom by sheer force of gravity, if nothing else. I even made a couple of comments saying that having the userpic at the top seriously disrupts my workflow (I tried to stop myself, honestly I did).

Then I realized that I didn't need to wait for the powers that be to change their minds; I could work on my own solution. So in between studying for my polsci long test and studying for my theo quiz, I tried my hand at modifying update.bml and I came up what has to be the world's ugliest update.bml page ever. And it only really works for me because I don't think that anyone else wants to lose their music and location fields, or to have their mood icon preview and userpic preview side by side.

world's ugliest update.bml page EVER )

But see, I don't care! AHAHAHA.

I have a list of tags! I can change my icon without having to scroll up! Everything that I need is right where I need it, and life is good.

Welcome to my world, my personally tweaked update.bml. Bless your ugly little Greasemonkied face heart.

I could move the music and location fields to the right instead of removing them entirely, but right now that's more trouble than it's worth, considering that I don't ever use them. For me, they're icing on the pudding -- that is to say, don't like, don't use, don't need.

Oh and I still feel guilty over the screenscraping involved in fetching those tags so still not making the (tag-related) code public until I've added even a tiny measure against overdoing that. Unless I don't need to. Gah! Help!

Profile

afuna_archive: (Default)
afuna_archive

June 2009

S M T W T F S
  1 2 3 4 5 6
7 8 9 10 11 1213
14151617181920
21222324252627
282930    

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 3rd, 2025 11:47 pm
Powered by Dreamwidth Studios