imc

Greasemonkey!

May 23, 2008 12:54

LiveJournal Thread Expander with Expand All
http://userscripts.org/scripts/show/27128
I've hacked up a Thread Expander script for Greasemonkey. It has only been tested on a small number of layouts, but it seems to work for me so please bang on it and report any breakages here.

For recent updates see below. What does it do?
We've all ( Read more... )

computers, lj

Leave a comment

Comments 43

captainmarveljt November 24 2009, 06:19:31 UTC
If I wanna use this script on Opera, do I have to download the Greasemonkey script as well? Because it says that that script is for Firefox and I could only download it using Firefox.

Reply

imc November 30 2009, 16:53:37 UTC
You don't have to install Greasemonkey itself because that's a Firefox extension that Opera mostly has already; you do have to install a Greasemonkey compatibility script for Opera called gmfunctions (thanks to an above comment for this info - see the comment for a link to gmfunctions and also one change you have to make to my script to make it work, until I get round to uploading a fixed version).

Reply


legolegs November 30 2009, 17:27:37 UTC
Patch for opera (also you must install this):

--- userjs_off/LJ_Thread_Expander.js 2009-11-30 18:55:28.000000000 +0300
+++ userjs/LJ_Thread_Expander.js 2009-11-30 20:23:01.152321910 +0300
@@ -21,14 +21,24 @@
// @include http://*.dreamwidth.org/*
// ==/UserScript==

+/*
+ globals
+*/
+
+var myWindow;
+var info;
+var needIndent;
+var allExpand;
+
+function LJ_Thread_Expander_init()
+{
/* Experimental feature: don't handle nested frames (e.g. the ads).
However, this means you can't embed your journal in a frameset. */
-if (window != window.parent) exit;
+if (window != window.parent) return;

/* unsafeWindow is a GreaseMonkey variable that gives you access to
the document's original window object. If it's not defined
(Opera?) then try defaulting back to the original window. */
-var myWindow;
if (typeof unsafeWindow == "undefined") myWindow = window;
else myWindow = unsafeWindow;

@@ -38,14 +48,14 @@

/* Need the "LJ_cmtinfo" meta-info from the original ( ... )

Reply


stansult December 11 2009, 23:22:24 UTC
tried that on Chrome - unfortunately doesn't work...
it adds (to developer's version of Chrome), but doesn't unfold anything
any plans for Chrome?

Reply

stansult December 11 2009, 23:23:00 UTC
btw (forgot to add), you don't need greasemonkey for developer's version of Chrome
it adds itself, and many scripts work fine

Reply

imc December 11 2009, 23:33:11 UTC
I completely ignored Chrome when it launched because they didn't launch with a Linux version. I'm aware they have one now, but I haven't investigated it yet.

Reply

stansult December 12 2009, 00:51:01 UTC
oh, i didn't know that (i'm windows user)
i really like the way Thread Expander works in firefox, so would be cool to have it work for Chrome

Reply


amblinwiseass January 20 2010, 13:47:10 UTC
This is awesome. Thank you!

Yes, I'm aware that I'm probably the only person in the world who browses with Greasemonkey enabled and JavaScript disabled…

Now there's an intriguing thought.

Reply


discopanda March 6 2010, 15:05:22 UTC
Any chance of getting it to work with whatever layout girlgeniuscomic uses in their entries?

Reply

imc March 30 2010, 14:53:21 UTC
Sorry, I'd meant to look at this but haven't got round to it yet. I think that journal's style is 3column; as far as I can tell it does have Expand links (presumably because it's a permanent account) but the script doesn't know where to place the Expand All link. Stylistically this should probably be a button rather than a text link.

Reply


Leave a comment

Up