userscripts icon indicating copy to clipboard operation
userscripts copied to clipboard

Avatar-Score-Sender bug

Open skaematik opened this issue 6 years ago • 0 comments

Browser: Chrome
Plugin: Tampermonkey 4.5
Script: https://github.com/w35l3y/userscripts/tree/master/scripts/Neopets_Avatars_Flash_Games_%5BBETA%5D
Accessed url: http://www.neopets.com/games/game.phtml?game_id=381
Installation url: From the github URL
Error Message: cannot setAttribute of undefined
Obs.: The Monkey button shows up but doesnt open, and is not clickable

Example of code: (Optional, only if you know what it means)

"gr-ctp-settings": {
                                rename: ["settings", "avatar"],
                                execute: function(node, p) {
                                    var btn = xpath("id('ctp-avatar-save')/img", node)[0]
                                      , table = xpath("./ancestor::table[1]", btn)[0];
                                    table.setAttribute("style", "margin: 0 20px;");
                                    btn.src = btn.src.replace("use-these-settings", "submit");

the variables, btn and table, are undefined after execution. The document does not contain a tag with an id of ctp-avatar-save

skaematik avatar Apr 30 '18 07:04 skaematik