Skip to content

Instantly share code, notes, and snippets.

@thenoseman
Last active September 14, 2017 08:59
Show Gist options
  • Save thenoseman/e4c060b008039cebd32163673506cf11 to your computer and use it in GitHub Desktop.
Save thenoseman/e4c060b008039cebd32163673506cf11 to your computer and use it in GitHub Desktop.
Form-O-Fill : redirect after login
var rules = [{
"name": "Step 1 - do login",
"url": "https://someurl/login",
"fields": [{
"selector": "#loginname",
"value": "LOGINNAME"
}, {
"selector": "#password",
"value": "PASSWORD"
}, {
"selector": "input[type='submit']",
"value": Libs.h.click
}]
}, {
"name": "Step 2 - after login -> redirect",
"url": "https://someurl/login", // Or content: "" if the url stays the same
"autorun": true,
"setupContent": function() {
window.location.href = 'https://target.url';
},
"fields": []
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment