Results 1 to 5 of 5

Thread: Greasemonkey script

  1. #1
    Join Date
    Mar 2012
    Posts
    78
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default Greasemonkey script

    I want to make a greasemonkey script, but I have little knowledge of any webstuff ie DOM etc.

    I want to replace a link that appears on facebook in a stream with my own on, but I need to replace non ASCII characters /hex or something (at least I think so)

    like %25 = %
    and http%3A%2F%2F = http://

    Is there some nice little thing that can do this? I am thinking regex but I don't understand that at all.
    And also what crazy DOM stuff or whatever it is called do I use to make it check for new links when they appear on the 'dynamic page' that is Facebook

  2. #2
    Join Date
    Apr 2007
    Posts
    581
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Can't you just replace the hexadecimal like you would normally with a string?

    Ex: replace("%3A", "%2F");

  3. #3
    Join Date
    Mar 2012
    Posts
    78
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by ShawnjohnSJ View Post
    Can't you just replace the hexadecimal like you would normally with a string?

    Ex: replace("%3A", "%2F");
    Yes I could but I would've thought there would be a built in thing for it, since all the ASCII codes must be readable somehow.

  4. #4
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    escape(stringhere);
    I made a new script, check it out!.

  5. #5
    Join Date
    Mar 2012
    Posts
    78
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Thanks for that!
    enscape() and unescape() is exactly what I was looking for.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •