Javascript how to click a button on youtube

Discussion in 'Mixed Languages' started by stevemk14ebr, Dec 17, 2012.

  1. stevemk14ebr

    stevemk14ebr MDL Senior Member

    Jun 23, 2010
    267
    48
    10
    #1 stevemk14ebr, Dec 17, 2012
    Last edited by a moderator: Apr 20, 2017
    i'm attempting to write a very simple greasmonkey plugin for firefox (uses javascript) to click the My subscriptions button all the way to the left. Capture.PNG The problem is this is literally the first time i've ever even looked at javascipt, and my poor attempt at the code doesn't work, could anyone help me write code to click that button
    Code:
    document.getElementByName('My subscriptions').onclick();
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Alhaitham

    Alhaitham MDL Novice

    Jul 31, 2009
    20
    11
    0
    you can ask in the official forums

    userscripts.org/forums
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...