Question for people that write their own scripts (Just need advice)

Discussion in 'General' started by thatdudegrim, Jun 25, 2015.

  1. thatdudegrim

    Joined:
    Jun 18, 2015
    Messages:
    128
    Likes Received:
    0
    So I was trying to autofocus a text box in a particular batch penny hit so I could save the time of scrolling. It works on first page load and if I refresh the page but it doesn't work in successive hits with auto-accept on.

    That's with Tampermonkey configured to place the script within the frame.

    If I configure the script to be placed within the amazon page, I can't access the contents of the IFRAME because of same-origin policies (it's a security measure to prevent sniffing of activity within an iframe because of the potential of phishing).

    It's rather odd to me that it only works on the first page load/refresh, but not continually. Because I'm lazy, I included jQuery and did this

    Code:
    $(document).ready(function() {
        $("input[name=tag1]").focus()
    });
    I'm quite capable in javascript, jQuery, and stackOverflow :)P) but I've never really bothered with Tampermonkey.
     

Share This Page