Jan. 2nd, 2009

Bye 2008

Jan. 2nd, 2009 03:10 am
afuna_archive: (Default)
Waited for the other shoe to drop all throughout 2008 (after the mess that was 2007). But nothing (very) bad happened. Maybe this is a good sign for the future?

Hello, 2009!
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)
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)
03:47:24 — @gameboyguy13 orchids!<3
03:47:47 — @marcelle42 I misread that as Bond, was waiting for you to work a "stirred" into the tweet somehow
03:55:39 — @marcelle42 it was a typo? OH! *sloooooow*
11:59:43 — @exor674 I knew she was going to get it back. I just thought she would wait until March :-(
12:02:38 — @iruka11 some kind of film called a SIM protector or something of the sort.
12:08:41 — going to be without a cellphone for the next couple of days.
12:19:03 — @iruka11 sa ahia ko :)
14:31:31 — @danielefton CSI you mean? Not yet! I'm still playing catch up with old ones (on 9x06)
15:13:55 — @azurelunatic are you in SF permanently, now?
16:07:15 — @azurelunatic I thought you were visiting for the holidays! *G* hope you find a great place <3
16:49:03 — @gumoz hi! @rickybuchanan said I should talk to you :-)

Total: 11 tweets

You can find me as afuna on Twitter.

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    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 4th, 2025 03:50 pm
Powered by Dreamwidth Studios