Results 1 to 11 of 11
  1. #1
    Janitor's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Location
    MPGH Reports
    Posts
    16,255
    Reputation
    3259
    Thanks
    7,214

    Tampermonkey / Grease monkey

    I know this should be in the programming section "Java scripting" I guess , but i need some quick info.
    I need some quick help on this , i have no background in JS.
    Code:
    document.body.innerHTML= document.body.innerHTML.replace(/<td align="center" valign="middle" title="230">230</td>/g,"<td align="center" valign="middle" title="333">333</td>");
    Why ^ this doesn't work for example ?
    Code:
    <td align="center" valign="middle" title="230">230</td>
    is the part in the website that I want to edit the number in it to be 333 or any other number ?

  2. #2
    lockedalt's Avatar
    Join Date
    Oct 2013
    Gender
    male
    Location
    South of Heaven
    Posts
    1,562
    Reputation
    82
    Thanks
    176
    I'm a big greasemoney fan, Reek's anti ad-block killer is the bomb



  3. #3
    Janitor's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Location
    MPGH Reports
    Posts
    16,255
    Reputation
    3259
    Thanks
    7,214
    Quote Originally Posted by Acid View Post
    I'm a big greasemoney fan, Reek's anti ad-block killer is the bomb
    You're not helping tho

  4. #4
    Stack's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Posts
    1,705
    Reputation
    87
    Thanks
    272
    My Mood
    Relaxed
    I don't know what you're trying to do, document.body.innerHTML replaces everything inside the body tag.

    Only error I can see is that the argument of document.body.innerHTML.replace aren't inside a ' ' - other than that, I don't see anything wrong -.

    VOYAGE OF EMOTION AND DISCOVERY

    Graphics Shop - Web Design & Development

  5. #5
    Janitor's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Location
    MPGH Reports
    Posts
    16,255
    Reputation
    3259
    Thanks
    7,214
    Quote Originally Posted by Capi View Post
    I don't know what you're trying to do, document.body.innerHTML replaces everything inside the body tag.

    Only error I can see is that the argument of document.body.innerHTML.replace aren't inside a ' ' - other than that, I don't see anything wrong -.
    Let's say I want the script to change your Posts count "666" to "999". ?

  6. #6
    Stack's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Posts
    1,705
    Reputation
    87
    Thanks
    272
    My Mood
    Relaxed
    Quote Originally Posted by Ameer View Post

    Let's say I want the script to change your Posts count "666" to "999". ?
    document.body.innerHTML= document.body.innerHTML.replace('666', '999');

    VOYAGE OF EMOTION AND DISCOVERY

    Graphics Shop - Web Design & Development

  7. #7
    Janitor's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Location
    MPGH Reports
    Posts
    16,255
    Reputation
    3259
    Thanks
    7,214
    Quote Originally Posted by Capi View Post
    document.body.innerHTML= document.body.innerHTML.replace('666', '999');
    Banned you. because it didn't work.

  8. The Following User Says Thank You to Janitor For This Useful Post:

    john8734 (06-20-2016)

  9. #8
    FlexGod's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    SouthSide
    Posts
    1,445
    Reputation
    80
    Thanks
    530
    My Mood
    Aggressive
    Quote Originally Posted by Ameer View Post

    Banned you. because it didn't work.
    Damn is it that serious
    NightOwl


  10. #9
    Janitor's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Location
    MPGH Reports
    Posts
    16,255
    Reputation
    3259
    Thanks
    7,214
    Quote Originally Posted by flex1178 View Post
    Damn is it that serious
    No, it was just a coincidence.
    I'm no staff..

    /bump

  11. #10
    Stack's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Posts
    1,705
    Reputation
    87
    Thanks
    272
    My Mood
    Relaxed
    Quote Originally Posted by Ameer View Post

    No, it was just a coincidence.
    I'm no staff..

    /bump
    https://www.w3schools.com/jsref/prop_doc_body.asp
    https://developer.mozilla.org/en-US/...ment/innerHTML

    VOYAGE OF EMOTION AND DISCOVERY

    Graphics Shop - Web Design & Development

  12. #11
    Ryuk's Avatar
    Join Date
    Aug 2015
    Gender
    male
    Location
    GB
    Posts
    2,965
    Reputation
    545
    Thanks
    620
    My Mood
    Lurking
    I've already mastered C# I try not to help people with their lines if they break.

Similar Threads

  1. HELP me my monkey hits me
    By llvengancell in forum WarRock - International Hacks
    Replies: 9
    Last Post: 06-06-2007, 05:56 AM
  2. monkey
    By Gourav2122 in forum General
    Replies: 8
    Last Post: 03-27-2007, 10:49 PM
  3. The Monkey
    By AthlaS in forum Spammers Corner
    Replies: 13
    Last Post: 12-11-2006, 05:29 PM
  4. I Like Monkeys
    By Jackal in forum Spammers Corner
    Replies: 18
    Last Post: 12-11-2006, 04:59 PM
  5. Karate Monkey, not Bobo
    By arunforce in forum General
    Replies: 1
    Last Post: 07-19-2006, 10:40 AM