Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Hacking the Web with Greasemonkey

Posted by Zonk on Mon May 16, 2005 07:37 AM
from the rolling-your-own-interweb dept.
plasticmillion writes "Greasemonkey is a revolutionary Firefox extension that many feel has enormous implications for the future evolution of the web. By making it easy to write client-side scripts that modify webpages as you surf, it shifts the balance of power from content creators to content consumers. Since its inception, it has given rise to an impressive array of scripts for everything from enhancing Gmail with one-click delete functionality to preventing Hotmail from spawning new windows when you click on external links. In recent Greasemonkey news, Mark Pilgrim just published a comprehensive primer called 'Dive Into Greasemonkey', a must-read for those who want to try their hand at writing their own scripts. It should be noted that Greasemonkey is not without controversy, but this has done nothing to reduce its popularity among web programmers. Even Opera has jumped on the bandwagon with their own version of user scripts. To illustrate the principle to /.ers, I whipped up a handy little script called 'Slashdot Live Comment Tree', which lets you expand and collapse entire threads in an article's comments."
+ -
story
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • Paid articles? (Score:5, Insightful)

    by akadruid (606405) <<slashdot> <at> <thedruid.co.uk>> on Monday May 16 2005, @07:40AM (#12542077) Homepage
    If other articles are drawing notice to free registration for articles such as the NYT, why is this one linking to an article trying to charge $34?
  • by glesga_kiss (596639) on Monday May 16 2005, @07:42AM (#12542099)
    It should be noted that Greasemonkey is not without controversy, but this has done nothing to reduce its popularity among web programmers.

    It should also be noted that the person claiming controvesy is also charging $49.00 for the "research" he has written. Do people buy these things?

    Any, the summary of it reads as basically "users might install extensions that don't work with your own corporate pages". Personally, if an end user is installing applications without understanding the implications, you should ask whether that user should be allowed to install applications. The "researcher" claims that this risk should delay Firefox roll-outs in the enterprise.

    • by tweek (18111) on Monday May 16 2005, @07:56AM (#12542227) Homepage Journal
      The real problem is blanket deployments of firefox as is.

      You wouldn't deploy IE without locking it down so why not firefox?

      We have a deployment of about 2000 workstations with a highly customized build of firefox out there. I say customized but what I mean is that it's had various GUI elements stripped, keyboard shortcuts stripped and implements locked preferences. One of those preferences is software install. The only site that can install software is our internal update site.

      Somebody paid him to write this, possibly as part of an internal migration plan but he failed to notice that in a corporate environment, a well thought-out mozilla implementation would implement things like locked preferences and other customization. Combine this with workstation security and his point is probably moot. I'm not going to spend 50 bucks to find out.
  • by Quarters (18322) on Monday May 16 2005, @07:42AM (#12542102)
    Who's going to write the "Hide Roland Pipe" stories from Slashdot.
  • For several months, I labored under IE. 20 windows open everywhere, because it has no tabs. Even though I had managed to install Firefox (don't you love apps that don't require registry keys?), it was no help, because the applications department writes javascript that looks like it was squeezed from between Ballmer's asscheeks.

    It was difficult. Took me two months of working with greasemonkey, of 3 minutes stolen here, and 5 minutes borrowed there in between calls (did I mention I'm only a phone monkey for a DSL ISP?). But in the end, not only can I use our main webapp in Firefox, it has features that the standard one doesn't. It often helps to shave up to a minute off of calltimes.

    Which may be why I'm in trouble for using Firefox at that job. Dunno.
  • You can fix rendering bugs that the site owner can't be bothered to fix themselves.

    Could be useful for Slashdot then :)
  • content debate (Score:5, Insightful)

    by enjahova (812395) on Monday May 16 2005, @08:02AM (#12542277) Homepage
    Websites are a strange medium. Things like greasemonkey and adblock and google toolbar have been spurring these debates about content control.

    I would not be suprised if this debate grew bigger as the popularity of client side controll apps gets bigger.

    Alot of people want their webpage to look the way they intended it to look, but I think the truth is that you can not count on that. Different browsers, different computers, different monitors...

    I am in favor of client side tools, I think that a user getting the best use possible out of a site is a good thing, in fact that is my goal when designing a website. If they think they can do it better, be my guest.
  • by tezza (539307) on Monday May 16 2005, @08:13AM (#12542387)
    I've been an active member of the Greasemonkey mailing list. Mark Pilgrim is a very regular contributer there.

    One very interesting thread has been misuse of Greasemonkey(GM). GM allow script authors to use an XML_HTTPrequest() type functionality. This is often to look up information services, such as google, de.li.ci.ous, weather etc.

    With a poorly coded script, there could be thousands of http connections spawned per page transition. A DDOS of sorts. This will be an interesting one to tackle.

    Any ideas out there??

  • I recently started playing around with Greasemonkey. I love it, but there is one issue that I have with it. It injects its scripts at the end of the web page.

    I have a web page that runs a little javascript at the end, where it pops up an alert window, then redirects to another page. I would like to write a greasemonkey script to remove this redirection. Unfortunately, the page's javascript gets run before greasemonkeys. Any ideas about how get my greasemonkey script to run sooner?

  • by darkmyst (590375) on Monday May 16 2005, @08:15AM (#12542414)
    In order to avoid $50 articles, I found this [com.com] article which did talk about some potential security problems with greasemonkey. It seems hackers could make scripts that behave maliciously. According to the article, even the original greasemonkey developer has expressed concerns along those lines.
  • password power? (Score:5, Interesting)

    by MrLint (519792) on Monday May 16 2005, @08:17AM (#12542443) Journal
    Is this sting powerful enough to take back control of your passwords? The day that autocomplete became enforced users lost the power to manage their passwords. can GM be used to removed this directive?
  • by nafmo (147094) * <sector3@gmail.com> on Monday May 16 2005, @08:26AM (#12542535)
    "Even Opera has jumped on the bandwagon with their own version of user scripts." Well, considering that Opera previewed a similar technology back in early 2003 [opera.com], I'm not so sure you could call that "jumping the bandwagon". But still, it's a nice edition, both to Firefox and Opera.
    • by Anonymous Coward on Monday May 16 2005, @07:44AM (#12542112)
      Achtung! You vill sit in ze CHAIR ven you read my book, NOT ON ZE COUCH!!!

      Sieg heil!
    • by Eccles (932) on Monday May 16 2005, @07:44AM (#12542113) Journal
      That said, I am going to use this guide to disable Greasemonkey.

      Step 1. Slashdot my own site.
    • by Guy LeDouche (713304) on Monday May 16 2005, @07:46AM (#12542129)
      Ah, good morning Mr. Ballmer.
    • by Albanach (527650) on Monday May 16 2005, @07:50AM (#12542160) Homepage
      I don't want them to see my site the way they want to see it. I want them to see it the way it was meant to be seen. That way I can provide content based on expectations of standards compliance.

      But the web is about sending content to the user - it's up to the user how they want to display it. Unles you're supplying a locked down PC with your own browser configuration you have absolutely no control over what the end user does with the content you send, or how they interpret it.

      Sure you can send CSS to the broser, but your visitor using links isn't going to see the result of you work. The visitor using a screen reader or mobile phone will be equally ignorant of your efforts.

      These are user installed scripts, and this is the web not television. The folk visiting sites are not their passively, they're there to interact and if they want your site to function a little differently so it better fits with their expectations what rights do you have to stop them?

        • by Darren Winsper (136155) on Monday May 16 2005, @08:19AM (#12542461) Homepage
          "Remember, this like this never happened before this FF extension"
          Bollocks. You could write bookmarklets, or user CSS files. Hell, you could disable CSS or Javascript, you could use a browser that displays things a certain way. You could write your own browser. You could use man-in-the-middle programs to rewrite code before it reaches the browser.

          The web is about information. The presentation of that information is ultimately up to the user.

          Having said all that, I should point out that I am somewhat uncomfortable with the blind adoption Greasemonkey is seeing. A lot of web sites use Javascript that makes assumptions about the structure of the page. By changing the structure of the page, you're going to potentially break pages that dynamically change themselves.
    • I don't want them to see my site the way they want to see it. I want them to see it the way it was meant to be seen.

      That's why GreaseMonkey exists. It allows firefox to do the work your eyes and hands must otherwise do - it gets you the information you're after, not what the designer fancies.

      (I actually like your site design, and I think it is great you are releasing your work under the GPL and your content under a CC license)
    • by Tx (96709) on Monday May 16 2005, @07:55AM (#12542207) Journal
      This seems to be another step in the battle that's as old as the web, over who gets final say as to how a web page is presented.

      I feel the (Firefox) user should, and generally is going to have the edge, what with the uriid extension to apply site-specific CSS, greasemonkey, and other tools. But page producers always have wanted to dictate exactly how their pages appear to the user, however misguided that is, and I doubt the battle will ever be over.
    • by masklinn (823351) <slashdot.org@NOsPAm.masklinn.net> on Monday May 16 2005, @08:09AM (#12542352)
      I don't want them to see my site the way they want to see it. I want them to see it the way it was meant to be seen.
      Doesn't the fact that it's plain and simply impossible kinda suck?
      Greasemonkey is nothing but "the easy way", but client side modification of a website has been live for years:
      • Proximitron allows advanced filtering
      • Specific Firefox extensions do, too (think about Slashfix)
      • Bookmarklets are fairly powerful, check MODI [slayeroffice.com] for example
      • For god's sake, there are so much differences from one browser to another one that one can tweak what he seens by changing browser
      • Custom/client side CSS, Opera has had them for a very long time, Firefox has that too, and you can more than likely find bookmarklets allowing you to load custom CSS in your browser
      The fact is that you seem not to know an important rule of web design: the way you indent your website to be displayed is nothing but a mere suggestion, and the surfer is 100% free to fully ignore your hints if he doesn't want it [evpc.biz]
      Don't want that? don't create websites. Your websites are not here for you and if they are they shouldn't be online, websites are for the visitor and he can do whatever he wants with the data he receives (including sending the whole content of your website to /dev/null if he finds it funny)
        • by wfberg (24378) on Monday May 16 2005, @08:09AM (#12542347)
          Your analogy is flawed. Artists have never had a right to prevent you from looking at their work in a certain way. Painters can't stop the colorblind or those wearing sunglasses to look at their paintings. Anyone can skip entire chapters when reading a book. I can play Beethoven and Britney Spears at the same time if I please.

          What I do with those works in the privacy of my own home is my business. I might just prefer it that way, and there's nothing you can do about it.

          Artists do have recourse against people redistributing altered ("raped") works, but that is also limited.

          In the case of greasemonkey, it's just a tool you use to view the web; other people might use other tools, like lynx for example, which renders a page completely differently from firefox or internet explorer. It's personal use. So lay off of it.
        • by masklinn (823351) <slashdot.org@NOsPAm.masklinn.net> on Monday May 16 2005, @08:12AM (#12542378)
          I don't believe that's what he meant. His concern was that he wants his information presented a certian way and to leave it that way preventing others from changing it into something he didn't intend or desire for his content.
          And it's not how it's supposed to work.
          You can suggest, tell the visitor 'look, this is supposed to look like that', but ultimately the choice is the user's, just as in a book the reading order is merely a hint, if one wants to read the book backwards more power to him, and the author is not supposed to come at him with a big stick saying "no no, you're not supposed to read backwards, you can't skip pages either or i'll beat you to a bloody pulp you crackwhore", which is exactly what mfh intends to do...
      • Crap (Score:5, Funny)

        by mfh (56) on Monday May 16 2005, @08:30AM (#12542585) Journal
        Hell, if I want to print it out and use it as toilet paper, I will.

        Now that you've said this, everyone is going to use my site as TP. Thanks, buddy.