Skip to content

Commit

Permalink
Update date picker code (#2)
Browse files Browse the repository at this point in the history
Fixes the script to work on the current versions of Google Photos.

The two problems were:
 - When a new timezone is selected, the dropdown field was not updated
 - The script failed to verify the current timezone
  • Loading branch information
pawitp authored and grubyak committed Jun 10, 2018
1 parent 4f23699 commit 53c18a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions google-photos-tz-fix.js
Expand Up @@ -216,12 +216,12 @@
})
.done(function() {
setTimeout(function() {
$(dialog).find(FIELD_TZ).filter(':contains("' + EXPECTED_TZ + '")').click();
$(dialog).find(FIELD_TZ).filter(':contains("' + EXPECTED_TZ + '")').last().click();
}, rand(800, 500));
});
},
verify: function() {
return ($(dialog).find(FIELD_TZ).attr('aria-label') || '').indexOf(EXPECTED_TZ) !== -1;
return ($(dialog).find(FIELD_TZ).filter('[aria-selected="true"]').attr('aria-label') || '').indexOf(EXPECTED_TZ) !== -1;
},
value: EXPECTED_TZ
},
Expand Down

0 comments on commit 53c18a0

Please sign in to comment.